@tty/layout
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

说明

本包是为 os2edu 开源操作系统社区 子项目提供统一的 React 布局组件。

使用

import Layout, { MainContent } from '@os2edu';

const headerProps = {
  subTitle: '课程培训',
  extra: {
    customRender: <span>自定义区域</span>,  // 头部右侧自定义显示内容
    dropMenu: [ // 点用户头像下拉菜单
      { key: 'profile': title: '用户信息', onClick: () => {} },
      { key: 'logout': title: '退出', onClick: () => {} }
    ],
    userInfo: { // 显示的用户信息
      phone: '17703401850',
      avatar: '',
    },
  },
};

return (
  <Layout headerProps={headerProps}>
    <MainContent>主内容</MainContent>
  </Layout>
);

描述

shortcut

Readme

Keywords

none

Package Sidebar

Install

npm i @tty/layout

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

826 kB

Total Files

32

Last publish

Collaborators

  • tanyb-712