@hzab/sider 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @hzab/sider
2
2
 
3
- 组件模板
3
+ 侧边栏组件
4
4
 
5
5
  - node@14.21
6
6
 
@@ -11,16 +11,67 @@
11
11
  ```jsx
12
12
  import Demo from "@hzab/sider";
13
13
 
14
- <Demo />;
14
+ <Demo
15
+ menus={[
16
+ { key: "/", label: "首页", title: "首页" },
17
+ {
18
+ key: "/user-server",
19
+ label: "用户服务",
20
+ icon: "UserOutlined",
21
+ children: [
22
+ {
23
+ key: "/user-server/user-list",
24
+ label: "用户管理",
25
+ },
26
+ {
27
+ key: "/user-server/role-list",
28
+ label: "角色管理",
29
+ },
30
+ {
31
+ key: "/user-server/org-list",
32
+ label: "组织管理",
33
+ },
34
+ ],
35
+ },
36
+ {
37
+ key: "/sys-server",
38
+ label: "系统服务",
39
+ icon: "UserOutlined",
40
+ children: [
41
+ {
42
+ key: "/sys-server/config-list",
43
+ label: "配置管理",
44
+ },
45
+ {
46
+ key: "/sys-server/color-list",
47
+ label: "颜色管理",
48
+ },
49
+ {
50
+ key: "/sys-server/size-list",
51
+ label: "尺寸管理",
52
+ },
53
+ ],
54
+ },
55
+ ]}
56
+ />;
15
57
  ```
16
58
 
17
59
  ## API
18
60
 
19
61
  ### InfoPanel Attributes
20
62
 
21
- | 参数 | 类型 | 必填 | 默认值 | 说明 |
22
- | ------ | ------ | ---- | ------ | ----------------- | --- |
23
- | schema | Object | 是 | - | 数据信息的 schema | |
63
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
64
+ | ----- | ----- | ---- | ------ | ---------- | --- |
65
+ | menus | Array | 是 | - | 侧边栏数据 | |
66
+
67
+ #### MenuItem
68
+
69
+ | 参数 | 类型 | 必填 | 默认值 | 说明 |
70
+ | -------- | ------ | ---- | ------ | ----------------------------- | --- |
71
+ | key | string | 是 | - | 跳转地址 | |
72
+ | label | string | 是 | - | 文案 | |
73
+ | icon | string | 是 | - | icon,可以是 antd icon 字符串 | |
74
+ | children | Array | 是 | - | 子集 | |
24
75
 
25
76
  # 组件开发流程
26
77