1.1.9 • Published 7 months ago

@fusion-ops/layout v1.1.9

Weekly downloads
-
License
-
Repository
-
Last release
7 months ago

fusion ops layout

基于 ant design,作为 fusion ops 的 layout 组件库,满足中后台等业务场景通用性组件需求。

安装依赖

$ npm i @fusion-ops/layout

使用方式

在 umi 框架中配置 layout 使用

import { App, ConfigProvider } from "antd";
import { BaseLayout } from "@fusion-ops/layout"
 
export default function Layout() {
  const model = useModel("@@initialState");
  const initialState = model.initialState;
  const permissions = initialState?.currentUser?.permissions as string[];
  const { clientRoutes } = useAppData()

  return (
    <ConfigProvider>
      <App>
        <BaseLayout
          siteConfig={{
            siteName: "统一认证系统",
          }}
          userInfo={{
            userId: initialState?.currentUser?.id,
            username: initialState?.currentUser?.realName
          }}
          routes={clientRoutes}
          permissions={permissions}
          onLogout={() => { // 用户登出回调
          }}
        />
      </App>
    </ConfigProvider>
  );
}
1.1.9

7 months ago

1.1.8

7 months ago

1.1.7

7 months ago

1.1.6

7 months ago

1.1.5

7 months ago

1.1.4

7 months ago

1.1.3

7 months ago

1.1.2

7 months ago

1.1.1

7 months ago

1.1.0

7 months ago

1.0.9

7 months ago

1.0.8

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago