Skip to content

布局插槽 ​

tsx
import type { ReactNode } from 'react';
import { ShellDefaultLayout } from '@selrux/shell';

/** 应用默认后台布局。 */
export default function Layout({ children }: { children?: ReactNode }) {
  return (
    <ShellDefaultLayout slots={{ headerActions: <a href="/about">帮助</a> }}>
      {children}
    </ShellDefaultLayout>
  );
}

每个布局默认独立 Redux store;可通过 store 注入 createShellStore()。勿引用壳内部路径。

精简版默认可用;完整壳需显式启用并配置私服。