1.1.9 • Published 10 months ago

@fusion-ops/layout v1.1.9

Weekly downloads
-
License
-
Repository
-
Last release
10 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

10 months ago

1.1.8

10 months ago

1.1.7

10 months ago

1.1.6

10 months ago

1.1.5

10 months ago

1.1.4

10 months ago

1.1.3

10 months ago

1.1.2

10 months ago

1.1.1

10 months ago

1.1.0

10 months ago

1.0.9

10 months ago

1.0.8

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago