fan-standard-comp 4.1.51 → 4.1.52

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.
Files changed (65) hide show
  1. package/README.md +10 -1
  2. package/ai/component-index.json +269 -0
  3. package/ai/templates/AGENTS.md +83 -0
  4. package/docs/components/ButtonGroup.md +101 -0
  5. package/docs/components/ButtonGroupBeta.md +19 -0
  6. package/docs/components/CalendarCoordPicker.md +22 -0
  7. package/docs/components/DragContent.md +33 -0
  8. package/docs/components/EditButton.md +28 -0
  9. package/docs/components/FanProvider.md +95 -0
  10. package/docs/components/Field.md +112 -0
  11. package/docs/components/ImageGallery.md +65 -0
  12. package/docs/components/ItemGroup.md +164 -0
  13. package/docs/components/JsonInput.md +47 -0
  14. package/docs/components/NavLeafScroll.md +39 -0
  15. package/docs/components/Navigation.md +24 -0
  16. package/docs/components/RefactortTree.md +61 -0
  17. package/docs/components/SideCard.md +25 -0
  18. package/docs/components/SpecIcon.md +35 -0
  19. package/docs/components/SplitterLayout.md +37 -0
  20. package/docs/components/StandardDragModal.md +27 -0
  21. package/docs/components/StandardDrawer.md +144 -0
  22. package/docs/components/StandardFilter.md +199 -0
  23. package/docs/components/StandardForm.md +111 -0
  24. package/docs/components/StandardList.md +46 -0
  25. package/docs/components/StandardModal.md +175 -0
  26. package/docs/components/StandardPanel.md +64 -0
  27. package/docs/components/StandardTable.md +114 -0
  28. package/docs/components/StandardTablePro.md +98 -0
  29. package/docs/components/StandardTitle.md +24 -0
  30. package/docs/components/SubfieldContent.md +71 -0
  31. package/docs/components/Uploader.md +56 -0
  32. package/docs/components/VarTemplate.md +28 -0
  33. package/docs/components/WrapperContent.md +62 -0
  34. package/docs/global.less +6 -0
  35. package/docs/global.tsx +8 -0
  36. package/docs/guide/for-agents.md +15 -0
  37. package/docs/guide/theme.md +78 -0
  38. package/docs/guide/todoList.md +25 -0
  39. package/docs/guide/update.md +1068 -0
  40. package/docs/guide/usage.md +39 -0
  41. package/docs/index.md +24 -0
  42. package/docs/manage/authority.md +72 -0
  43. package/docs/manage/businessUtils.md +86 -0
  44. package/docs/manage/commit.md +72 -0
  45. package/docs/manage/componenting.md +217 -0
  46. package/docs/manage/errorBoundary.md +138 -0
  47. package/docs/manage/naming.md +88 -0
  48. package/docs/manage/sdkSystem.md +314 -0
  49. package/docs/manage/socketClient.md +318 -0
  50. package/docs/manage/upgrade.md +81 -0
  51. package/docs/manage/usage.md +112 -0
  52. package/docs/manage/watermark.md +213 -0
  53. package/docs/other/usage.md +29 -0
  54. package/docs/utils/convert.md +18 -0
  55. package/docs/utils/data.md +98 -0
  56. package/docs/utils/dataFuncBasic.tsx +40 -0
  57. package/docs/utils/dict.md +45 -0
  58. package/docs/utils/other.md +91 -0
  59. package/docs/utils/regExp.md +62 -0
  60. package/docs/utils/response.md +24 -0
  61. package/docs/utils/treeData.md +163 -0
  62. package/docs/utils/urlUtils.md +67 -0
  63. package/llms-full.txt +103 -0
  64. package/llms.txt +35 -0
  65. package/package.json +9 -4
package/README.md CHANGED
@@ -19,4 +19,13 @@ $ yarn add fan-standard-comp
19
19
  ### 打包文档站点
20
20
  ```
21
21
  $ yarn docs:build:dumi
22
- ```
22
+ ```
23
+
24
+ 构建完成后,除 Dumi 文档站外,还会在产物中保留可直接访问的 Markdown 源文档和 AI 索引:
25
+
26
+ ```text
27
+ doc-v4/docs/components/ButtonGroup.md
28
+ doc-v4/llms.txt
29
+ doc-v4/llms-full.txt
30
+ doc-v4/ai/component-index.json
31
+ ```
@@ -0,0 +1,269 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "package": {
4
+ "name": "fan-standard-comp",
5
+ "majorVersion": 4,
6
+ "framework": "React",
7
+ "baseLibrary": "antd@5",
8
+ "importPattern": "import { ComponentName } from 'fan-standard-comp'"
9
+ },
10
+ "components": [
11
+ {
12
+ "name": "FanProvider",
13
+ "category": "global-config",
14
+ "summary": "为组件库提供语言、表单、筛选、表格和弹窗的全局默认配置。",
15
+ "source": "src/ConfigContext/index.ts",
16
+ "docs": "docs/components/FanProvider.md",
17
+ "relatedExports": ["FanContext", "FanDefaultConfig"]
18
+ },
19
+ {
20
+ "name": "Field",
21
+ "aliases": ["FieldComponent"],
22
+ "category": "form-control",
23
+ "summary": "通过 type 配置渲染输入、选择、日期、树选择、上传等基础控件。",
24
+ "source": "src/FormComp/FieldComponent/index.tsx",
25
+ "docs": "docs/components/Field.md",
26
+ "demos": ["src/FormComp/FieldComponent/demos/basic.tsx", "src/FormComp/FieldComponent/demos/fieldStatus.tsx", "src/FormComp/FieldComponent/demos/date.tsx", "src/FormComp/FieldComponent/demos/select.tsx", "src/FormComp/FieldComponent/demos/tree-select.tsx", "src/FormComp/FieldComponent/demos/custom.tsx", "src/FormComp/FieldComponent/demos/extend.tsx"]
27
+ },
28
+ {
29
+ "name": "ItemGroup",
30
+ "aliases": ["RenderItemGroup"],
31
+ "category": "form-layout",
32
+ "summary": "根据配置批量渲染表单项,并管理栅格、标签、尺寸和只读布局。",
33
+ "source": "src/FormComp/RenderItemGroup/index.tsx",
34
+ "docs": "docs/components/ItemGroup.md",
35
+ "demos": ["src/FormComp/RenderItemGroup/demos/basic.tsx", "src/FormComp/RenderItemGroup/demos/size.tsx", "src/FormComp/RenderItemGroup/demos/layout.tsx", "src/FormComp/RenderItemGroup/demos/formList.tsx"]
36
+ },
37
+ {
38
+ "name": "StandardForm",
39
+ "category": "form",
40
+ "summary": "通用配置化表单,提供表单项、操作按钮、校验和实例访问。",
41
+ "source": "src/StandardForm/index.tsx",
42
+ "docs": "docs/components/StandardForm.md",
43
+ "demos": ["src/StandardForm/demos/basic.tsx", "src/StandardForm/demos/fields.tsx"],
44
+ "relatedExports": ["StepForm", "TabForm"]
45
+ },
46
+ {
47
+ "name": "StepForm",
48
+ "category": "form",
49
+ "summary": "StandardForm 体系的分步表单。",
50
+ "source": "src/StandardForm/StepForm.tsx",
51
+ "docs": "docs/components/StandardForm.md",
52
+ "demos": ["src/StandardForm/demos/stepFormBasic.tsx"]
53
+ },
54
+ {
55
+ "name": "TabForm",
56
+ "category": "form",
57
+ "summary": "StandardForm 体系的分页签表单。",
58
+ "source": "src/StandardForm/TabForm.tsx",
59
+ "docs": "docs/components/StandardForm.md",
60
+ "demos": ["src/StandardForm/demos/tabFormBasic.tsx"]
61
+ },
62
+ {
63
+ "name": "StandardFilter",
64
+ "category": "filter",
65
+ "summary": "用于表格上方的配置化筛选栏,支持按钮组、展开折叠、布局和值转换。",
66
+ "source": "src/StandardFilter/index.tsx",
67
+ "docs": "docs/components/StandardFilter.md",
68
+ "demos": ["src/StandardFilter/demos/basic.tsx", "src/StandardFilter/demos/buttons.tsx", "src/StandardFilter/demos/layout.tsx", "src/StandardFilter/demos/collapseable.tsx", "src/StandardFilter/demos/transform.tsx"]
69
+ },
70
+ {
71
+ "name": "StandardTable",
72
+ "category": "data-display",
73
+ "summary": "封装操作列、行选择、按钮组和分页策略的通用表格。",
74
+ "source": "src/StandardTable/index.tsx",
75
+ "docs": "docs/components/StandardTable.md",
76
+ "demos": ["src/StandardTable/demos/basic.tsx", "src/StandardTable/demos/action.tsx", "src/StandardTable/demos/checkbox.tsx", "src/StandardTable/demos/config.tsx"]
77
+ },
78
+ {
79
+ "name": "StandardTablePro",
80
+ "category": "data-display",
81
+ "summary": "带接口请求、查询表单和 ref 操作的高阶表格。",
82
+ "source": "src/StandardTablePro/index.tsx",
83
+ "docs": "docs/components/StandardTablePro.md",
84
+ "demos": ["src/StandardTablePro/demos/basic.tsx", "src/StandardTablePro/demos/fetchData.tsx"]
85
+ },
86
+ {
87
+ "name": "StandardModal",
88
+ "category": "overlay",
89
+ "summary": "页面操作弹窗,可组合配置化表单、步骤表单、Tab 表单和自定义按钮。",
90
+ "source": "src/StandardModal/index.tsx",
91
+ "docs": "docs/components/StandardModal.md",
92
+ "demos": ["src/StandardModal/demos/basic.tsx", "src/StandardModal/demos/form.tsx", "src/StandardModal/demos/footer.tsx", "src/StandardModal/demos/stepForm.tsx", "src/StandardModal/demos/tabForm.tsx"]
93
+ },
94
+ {
95
+ "name": "StandardDrawer",
96
+ "category": "overlay",
97
+ "summary": "支持配置化表单、栅格布局和底部按钮的通用抽屉。",
98
+ "source": "src/StandardDrawer/index.tsx",
99
+ "docs": "docs/components/StandardDrawer.md",
100
+ "demos": ["src/StandardDrawer/demos/basic.tsx", "src/StandardDrawer/demos/form.tsx"]
101
+ },
102
+ {
103
+ "name": "StandardDragModal",
104
+ "category": "overlay",
105
+ "summary": "可拖拽弹窗;当前文档注明升级 Ant Design 后存在待修复问题。",
106
+ "status": "experimental",
107
+ "source": "src/StandardDragModal/Modal.tsx",
108
+ "docs": "docs/components/StandardDragModal.md",
109
+ "demos": ["src/StandardDragModal/demos/basic.tsx"]
110
+ },
111
+ {
112
+ "name": "ButtonGroup",
113
+ "category": "action",
114
+ "summary": "支持普通按钮、文本操作和表格操作列的权限按钮组。",
115
+ "source": "src/ButtonGroup/index.tsx",
116
+ "docs": "docs/components/ButtonGroup.md",
117
+ "demos": ["src/ButtonGroup/demos/basic.tsx", "src/ButtonGroup/demos/text.tsx", "src/ButtonGroup/demos/action.tsx"]
118
+ },
119
+ {
120
+ "name": "EditButton",
121
+ "category": "form-control",
122
+ "summary": "在按钮和输入保存状态间切换的编辑控件。",
123
+ "source": "src/FormComp/EditButton/index.tsx",
124
+ "docs": "docs/components/EditButton.md",
125
+ "demos": ["src/FormComp/EditButton/demos/basic.tsx"]
126
+ },
127
+ {
128
+ "name": "JsonInput",
129
+ "category": "form-control",
130
+ "summary": "JSON 输入和编辑控件,支持实时校验、格式化、压缩和只读预览。",
131
+ "source": "src/FormComp/JsonInput/index.tsx",
132
+ "docs": "docs/components/JsonInput.md",
133
+ "demos": ["src/FormComp/JsonInput/demos/basic.tsx"]
134
+ },
135
+ {
136
+ "name": "Uploader",
137
+ "category": "form-control",
138
+ "summary": "文件和图片上传控件,支持预览、数量限制、尺寸限制和裁剪。",
139
+ "source": "src/FormComp/Uploader/index.tsx",
140
+ "docs": "docs/components/Uploader.md",
141
+ "demos": ["src/FormComp/Uploader/demos/basic.tsx", "src/FormComp/Uploader/demos/image.tsx", "src/FormComp/Uploader/demos/limit.tsx", "src/FormComp/Uploader/demos/crop.tsx"]
142
+ },
143
+ {
144
+ "name": "VarTemplate",
145
+ "category": "form-control",
146
+ "summary": "用于编辑包含变量的模板内容。",
147
+ "source": "src/FormComp/VarTemplate/index.tsx",
148
+ "docs": "docs/components/VarTemplate.md",
149
+ "demos": ["src/FormComp/VarTemplate/demos/basic.tsx"]
150
+ },
151
+ {
152
+ "name": "StandardList",
153
+ "category": "data-display",
154
+ "summary": "通用列表,支持勾选和基于 dnd-kit 的拖拽排序。",
155
+ "source": "src/StandardList/index.tsx",
156
+ "docs": "docs/components/StandardList.md",
157
+ "demos": ["src/StandardList/demos/basic.tsx", "src/StandardList/demos/checkable.tsx", "src/StandardList/demos/dragSorting.tsx"]
158
+ },
159
+ {
160
+ "name": "RefactorTree",
161
+ "category": "navigation",
162
+ "summary": "常用于页面左侧的树形导航,支持搜索、根节点、禁用和选择限制。",
163
+ "source": "src/RefactorTree/index.tsx",
164
+ "docs": "docs/components/RefactortTree.md",
165
+ "demos": ["src/RefactorTree/demos/basic.tsx", "src/RefactorTree/demos/search.tsx", "src/RefactorTree/demos/disabled.tsx"]
166
+ },
167
+ {
168
+ "name": "NavLeafScroll",
169
+ "category": "navigation",
170
+ "summary": "可横向或纵向翻页滚动的菜单或列表。",
171
+ "source": "src/NavLeafScroll/index.tsx",
172
+ "docs": "docs/components/NavLeafScroll.md",
173
+ "demos": ["src/NavLeafScroll/demos/basic.tsx"]
174
+ },
175
+ {
176
+ "name": "WrapperContent",
177
+ "category": "layout",
178
+ "summary": "包含可选页头和页脚的页面外层内容容器。",
179
+ "source": "src/StandardContent/WrapperContent.tsx",
180
+ "docs": "docs/components/WrapperContent.md",
181
+ "demos": ["src/StandardContent/demos/wrapper.tsx", "src/StandardContent/demos/wrapperPage.tsx", "src/StandardContent/demos/wrapperFooter.tsx"]
182
+ },
183
+ {
184
+ "name": "SubfieldContent",
185
+ "category": "layout",
186
+ "summary": "包含可选标题区和底部区的分区内容容器。",
187
+ "source": "src/StandardContent/SubfieldContent.tsx",
188
+ "docs": "docs/components/SubfieldContent.md",
189
+ "demos": ["src/StandardContent/demos/subfield.tsx", "src/StandardContent/demos/subfieldFooter.tsx", "src/StandardContent/demos/subfieldTable.tsx"]
190
+ },
191
+ {
192
+ "name": "SideCard",
193
+ "category": "layout",
194
+ "summary": "用于 SubfieldContent 布局的侧边卡片。",
195
+ "source": "src/StandardContent/SideCard.tsx",
196
+ "docs": "docs/components/SideCard.md",
197
+ "demos": ["src/StandardContent/demos/sideCard.tsx"]
198
+ },
199
+ {
200
+ "name": "SplitterLayout",
201
+ "category": "layout",
202
+ "summary": "用于创建可分割的多区域布局。",
203
+ "source": "src/StandardContent/SplitterLayout/index.jsx",
204
+ "docs": "docs/components/SplitterLayout.md",
205
+ "demos": ["src/StandardContent/demos/splitter.tsx"]
206
+ },
207
+ {
208
+ "name": "DragContent",
209
+ "category": "layout",
210
+ "summary": "可从指定方向拉伸的内容容器;功能仍在完善中。",
211
+ "status": "experimental",
212
+ "source": "src/DragContent/index.tsx",
213
+ "docs": "docs/components/DragContent.md",
214
+ "demos": ["src/DragContent/demos/basic.tsx"]
215
+ },
216
+ {
217
+ "name": "StandardPanel",
218
+ "category": "layout",
219
+ "summary": "可组合标题、按钮、类别和标签的标准面板。",
220
+ "source": "src/StandardPanel/index.tsx",
221
+ "docs": "docs/components/StandardPanel.md",
222
+ "demos": ["src/StandardPanel/demos/basic.tsx", "src/StandardPanel/demos/buttons.tsx", "src/StandardPanel/demos/cates.tsx", "src/StandardPanel/demos/badges.tsx"]
223
+ },
224
+ {
225
+ "name": "StandardTitle",
226
+ "category": "typography",
227
+ "summary": "统一页面与内容区域标题样式的组件。",
228
+ "source": "src/StandardTitle/index.tsx",
229
+ "docs": "docs/components/StandardTitle.md",
230
+ "demos": ["src/StandardTitle/demos/basic.tsx"]
231
+ },
232
+ {
233
+ "name": "SpecIcon",
234
+ "category": "media",
235
+ "summary": "渲染组件库内置或业务扩展图标,支持前缀、尺寸和状态色。",
236
+ "source": "src/SpecIcon/index.tsx",
237
+ "docs": "docs/components/SpecIcon.md",
238
+ "demos": ["src/SpecIcon/demos/basic.tsx", "src/SpecIcon/demos/prefix.tsx", "src/SpecIcon/demos/status.tsx"]
239
+ },
240
+ {
241
+ "name": "ImageGallery",
242
+ "category": "media",
243
+ "summary": "基于 lightgallery 的图片画廊,可使用 children 或 items 提供图片。",
244
+ "source": "src/ImageGallery/index.tsx",
245
+ "docs": "docs/components/ImageGallery.md",
246
+ "relatedExports": ["ImagePreview"]
247
+ },
248
+ {
249
+ "name": "ImagePreview",
250
+ "category": "media",
251
+ "summary": "支持 body 浮层或行内模式的图集预览。",
252
+ "source": "src/ImageGallery/ImagePreview.tsx",
253
+ "docs": "docs/components/ImageGallery.md",
254
+ "demos": ["src/ImageGallery/demos/images.tsx", "src/ImageGallery/demos/preview.tsx"]
255
+ },
256
+ {
257
+ "name": "IconNode",
258
+ "category": "internal-primitive",
259
+ "summary": "将图标配置转换为可渲染节点的基础组件。",
260
+ "source": "src/components/IconNode/index.tsx",
261
+ "docs": null
262
+ }
263
+ ],
264
+ "notes": [
265
+ "components 仅收录 src/index.ts 通过包根路径公开导出的 React 组件与 Provider。",
266
+ "docs 为 null 表示当前没有独立使用文档。",
267
+ "公开组件的使用文档统一位于 docs/components,并随 npm 包发布。"
268
+ ]
269
+ }
@@ -0,0 +1,83 @@
1
+ # AGENTS.md
2
+
3
+ ## fan-standard-comp 使用规范
4
+
5
+ 本项目使用 `fan-standard-comp@4.x` 作为主要业务组件库。该组件库基于 React 18 和 Ant Design 5。
6
+
7
+ 开发或修改页面、表单、表格、筛选器、弹窗、抽屉以及页面布局时,应优先复用 `fan-standard-comp` 已提供的组件,不要重复实现相同能力。
8
+
9
+ ### 组件资料读取顺序
10
+
11
+ 优先读取当前安装版本中的资料:
12
+
13
+ 1. `node_modules/fan-standard-comp/llms.txt`
14
+ 2. `node_modules/fan-standard-comp/ai/component-index.json`
15
+ 3. 索引中 `docs` 字段指向的组件文档
16
+ 4. 必要时读取 `node_modules/fan-standard-comp/llms-full.txt`
17
+
18
+ 如果当前环境无法访问 `node_modules`,再读取在线文档:
19
+
20
+ 1. `http://47.113.227.251:1203/doc-v4/llms.txt`
21
+ 2. `http://47.113.227.251:1203/doc-v4/ai/component-index.json`
22
+ 3. `http://47.113.227.251:1203/doc-v4/llms-full.txt`
23
+
24
+ 使用在线资料时,应确认其内容与项目安装的 `fan-standard-comp` 版本一致;若版本不一致,以本地 npm 包内文档和类型声明为准。
25
+
26
+ 不要在任务开始时加载全部文档。先通过 `component-index.json` 按用途定位组件,再读取对应文档。
27
+
28
+ ### 组件选择原则
29
+
30
+ - 基础表单控件优先使用 `Field`。
31
+ - 配置化表单项和栅格布局优先使用 `ItemGroup`。
32
+ - 普通表单优先使用 `StandardForm`。
33
+ - 分步表单使用 `StepForm`,分页签表单使用 `TabForm`。
34
+ - 查询条件区域优先使用 `StandardFilter`。
35
+ - 普通业务表格优先使用 `StandardTable`。
36
+ - 需要接口请求、查询条件或实例操作的表格优先使用 `StandardTablePro`。
37
+ - 操作弹窗优先使用 `StandardModal`,侧边操作面板使用 `StandardDrawer`。
38
+ - 页面内容结构优先复用 `WrapperContent`、`SubfieldContent`、`SideCard` 和 `SplitterLayout`。
39
+ - 权限按钮组和表格操作列优先使用 `ButtonGroup`。
40
+ - 文件或图片上传优先使用 `Uploader`。
41
+ - 不要仅因为熟悉 Ant Design,就绕过组件库重新组合一套相同业务能力。
42
+
43
+ ### 导入规范
44
+
45
+ 组件统一从包根路径导入:
46
+
47
+ ```tsx
48
+ import {
49
+ Field,
50
+ ItemGroup,
51
+ StandardFilter,
52
+ StandardTable,
53
+ StandardModal,
54
+ } from 'fan-standard-comp';
55
+ ```
56
+
57
+ 除非包根路径没有公开导出,否则不要从 `fan-standard-comp/es/...` 或 `fan-standard-comp/lib/...` 深层导入。
58
+
59
+ 注意以下导出别名:
60
+
61
+ - `FieldComponent` 与 `Field` 指向同一组件,新增代码优先使用 `Field`。
62
+ - `RenderItemGroup` 与 `ItemGroup` 指向同一组件,新增代码优先使用 `ItemGroup`。
63
+
64
+ ### 实现要求
65
+
66
+ 使用组件前应检查对应文档中的:
67
+
68
+ - API 参数和默认值
69
+ - 示例代码
70
+ - 与 Ant Design 原始属性的关系
71
+ - 全局 `FanProvider` 配置
72
+ - 已知问题和版本限制
73
+
74
+ 配置化表单应尽量复用项目中现有的字段结构和转换逻辑,不要自行发明另一套字段协议。
75
+
76
+ 当文档、类型声明和现有代码不一致时:
77
+
78
+ 1. 优先参考当前安装版本的 TypeScript 声明。
79
+ 2. 再检查项目中已经正常运行的同类用法。
80
+ 3. 必要时检查组件实现源码。
81
+ 4. 不确定的行为应明确说明,不要猜测不存在的属性。
82
+
83
+ 修改完成后,应执行项目已有的类型检查、测试或构建命令。
@@ -0,0 +1,101 @@
1
+ ---
2
+ nav:
3
+ title: 组件
4
+ order: 2
5
+ group:
6
+ title: 其他
7
+ order: 3
8
+ title: ButtonGroup
9
+ order: 1
10
+ toc: content
11
+ ---
12
+
13
+ # ButtonGroup
14
+
15
+
16
+ ### 基本使用
17
+ <code src="../../src/ButtonGroup/demos/basic.tsx" ></code>
18
+
19
+
20
+
21
+ ### 文本按钮组
22
+ 文本按钮组用法,配置`type='text'`
23
+ <code src="../../src/ButtonGroup/demos/text.tsx" ></code>
24
+
25
+
26
+ ### 表格文本按钮组
27
+ 配置`type='action'`
28
+ <code src="../../src/ButtonGroup/demos/action.tsx" ></code>
29
+
30
+ ## API
31
+
32
+ | 参数 | 说明 | 类型 | 默认值 | 参考值 |
33
+ |----------|------------------------------------------|-------------|-------|-------|
34
+ | type | 展示为按钮或文本 | String | button | 可选值 `button`,`text`, `action`(表格内使用)|
35
+ | options | 按钮组列表,字段参考[options API](#options-api) | Array<{ name: string, code: string, disabled?: boolean , isHide?: boolean }> | - |- |
36
+ | codes | 功能权限数据,数组对象字段参考[codes API](#codes-api)| Array<{name: string, code: string,icon: string}> | - | - |
37
+ | permissionCodes | 当前有权限的按钮code值组合 | Array | - | `["codeBtnDetail", "codeBtnDetail"]` |
38
+ | min | 最小可展示按钮数量 | Number | 3 | 不得低于1(`type='action'`下最小数量为2) |
39
+ | rowParams | 用于通用表格组件行数据参数传入 | Object<{text, record,rowIndex}> | - | - |
40
+ | dropdownConfig | 下拉浮层相关配置(应用所有下拉菜单,优先级低于内部配置) | 参考官方dropdown API | - | - |
41
+ | moreText | "更多"按钮显示的文本 | string| - | - |
42
+ | moreIcon | "更多"按钮后面显示的图标,返回null则不显示 | ReactNode | - | - |
43
+ | showTextIcon | `type='text'`时,是否显示图标 | Boolean |`false` | - |
44
+ | size | `type='button'`时,可以配置默认按钮组大小 | Boolean | - | - |
45
+ | className | 样式类 | string| - | - |
46
+ | style | 行内样式 | Object | - | - |
47
+ | unlimited | 是否不限制展示数量,配置为true时,min值将无效 | `Boolean` | false | - |
48
+ | getValidButtons`v4.1.27` | 获取当前组件内有权限的按钮 | `(buttons, type)=>void` | | - |
49
+
50
+ ### options API
51
+
52
+ | 参数字段 | 说明 | 类型 |必选项| 参考值|
53
+ |----------|------|-------------|------|------|
54
+ | name | 名称 | `String` | 是 |- |
55
+ | type | 设置按钮类型 | `String` | 否 | `primary`/`dashed`/`link` / `text` / `default`|
56
+ | exName | 默认名称(优先级高于code与name配置值) | `String` | 否 | 如果设置为`null`,则不显示名称(适用于code匹配到的情况下只显示对应图标的按钮)|
57
+ | code | 指定按钮权限code | `String` | 否 | -|
58
+ | isHide | 是否隐藏 | `Boolean/Function()`| 否 | 表格操作列的Function参数是(text,record,index) |
59
+ | disabled | 是否禁用 | `Boolean/Function()` | 否 | 表格操作列的Function参数是(text,record,index) |
60
+ | children | 是否显示成多级层级数据 | `Array`| 否 | 数据维度与options API一致 |
61
+ | icon | 指定按钮图标 | `String/ReactNode/Array` | 否 | 字段参考[icon API](#icon-api)|
62
+ | fn | 按钮点击事件 |`Function({...item, event, rowParams})` `Function(text, record, index, {event, ...item})` | 否 | `type=action`参数会包含表格行与render对应的参数及最后一个参数内有event|
63
+ | render | 默认渲染结构 |`ReactNode/Function()` | 否 | -|
64
+ | confirmText | 配置点击显示气泡确认框标题 |`String/Function()` | 否 | 表格操作列的Function参数是(text,record,index)|
65
+ | confirmConfig | 气泡确认框扩展配置,同官网API()| `Object`| 否 | onConfirm,onCancel在表格操作列的参数是(text,record,index,other),优先级高于fn;title优先级高于confirmText;折叠在`更多`项内配置刚需要同时配置`rowParams.rowIndex`,否则浮层在点击后立即消失|
66
+ | dropdownConfig | 下拉浮层相关配置(应用当前下拉菜单,优先级高于上层的配置) | 参考官方dropdown API | - | - |
67
+ | moreIcon | 有`children`情况下,配置右侧的图标,返回null则不显示 | ReactNode | - | - |
68
+ | labelStyle | 给文本(包括图标)单独配置样式 | Object | 否 |
69
+ | labelClassname | 给文本(包括图标)单独配置样式类 | String | 否 |
70
+ | 其他 | [参考官网](https://ant.design/components/button-cn/#API) | Boolean | 否 |
71
+
72
+ > 关于 confirmConfig
73
+ >> `title` 类型可为string,或Function,【在表格列中参数为(text,record,index,other)】,优先级高于`confirmText`
74
+ >
75
+ >> `onConfirm`,气泡确认框“确定按钮事件”,,【在表格列中参数为(text,record,index,other)】,优先级高于`fn`
76
+ >
77
+ >> `onCancel`,气泡确认框“取消按钮事件”,,【在表格列中参数为(text,record,index,other)】
78
+ >
79
+
80
+
81
+ ### codes API
82
+
83
+ | 参数字段 | 说明 | 类型 |必选项| 参考值|
84
+ |----------|------|-------------|------|------|
85
+ | name | 名称 | String | 是 |- |
86
+ | code | 指定按钮权限code | String | 是 | -|
87
+ | icon | 图标名称 | String | 是 |-|
88
+
89
+
90
+ #### icon API
91
+ **1、@value `{String}`当表示为String,单个名称字符串 如'plus' ==> 结果渲染为'speci-plus'**
92
+ * 说明1.当数据里面包含','则将区分两个参数,第一个参数代表图标类名前缀,第二个参数代表当前图标类名 ‘speci,plus’ ==> 结果SVG渲染名称为 'speci-plus'
93
+ * 说明2.当数据里面包含','第一个参数为空或者为noPrefix,结构渲染为最后一个作为图标的名称,即',plus'或'noPrefix,plus' ==》 结果SVG渲染名称为 'plus'
94
+
95
+ **2、 @value`{Array}`当表示为Array时,必须包含两个参数['speci','plus']**
96
+ * 说明1.第一个参数代表图标类名前缀,第二个参数代表当前图标类名 => 结果渲染'speci-plus'
97
+ * 说明2.如果第一个参数为'noPrefix'或空,则将不显示前缀值,即:['', 'spec-plus]或 ['noPrefix', 'spec-plus] => 结果渲染'speci-plus'
98
+
99
+ **3、@value `{ReactNode}` 当表示为ReactNode时,则直接渲染**
100
+
101
+ **4、@value `{null}` 当为null时,不渲染图标**
@@ -0,0 +1,19 @@
1
+ ---
2
+ nav: 组件
3
+ group:
4
+ title: 测试
5
+ order: 13
6
+ title: ButtonGroupBeta
7
+ toc: content
8
+ ---
9
+
10
+ # ButtonGroupBeta
11
+
12
+ **antd-style用法**
13
+ <code src="../../src/ButtonGroupBeta/demos/basic.tsx" ></code>
14
+
15
+ **@ant-design/cssinjs用法**
16
+ <code src="../../src/ButtonGroupBeta/demos/buttonA.tsx" ></code>
17
+
18
+ **genStyleHook**
19
+ <code src="../../src/ButtonGroupBeta/demos/buttonB.tsx" ></code>
@@ -0,0 +1,22 @@
1
+ ---
2
+ nav:
3
+ title: 组件
4
+ order: 2
5
+ group:
6
+ title: 其他
7
+ order: 6
8
+ title: CalendarCoordPicker
9
+ order: 2
10
+ ---
11
+ # CalendarCoordPicker 日历区块选择
12
+ **功能未完善……**
13
+
14
+ >
15
+
16
+ ### 基本使用
17
+ <code src="../../src/CalendarCoordPicker/demos/basic.tsx"></code>
18
+
19
+ ## API
20
+ | 参数 | 说明 | 类型 | 默认值 | 参考值 |
21
+ |----------|------------------------------------------|-------------|-------|-------|
22
+ | type | 选中范围 | String | - | 按序号`orderPick`,按坐标方向 `directPick` |
@@ -0,0 +1,33 @@
1
+ ---
2
+ nav:
3
+ title: 组件
4
+ order: 2
5
+ group: 其他
6
+ title: DragContent
7
+ order: 3
8
+ toc: content
9
+ ---
10
+
11
+ # DragContent 可拉伸容器
12
+ * 功能待完善
13
+
14
+ > 用于可拉伸的页面容器
15
+
16
+ ## 代码演示
17
+
18
+ ### 基本使用
19
+ <code title="基础用法" src="../../src/DragContent/demos/basic.tsx" ></code>
20
+
21
+ ## API
22
+ | 参数 | 说明 | 类型 | 默认值 | 参考值 |
23
+ |----------|------------------------------------------|-------------|-------|-------|
24
+ | direction | 设置需要拉动的位置数组 | Array | - | ['left','right','top','bottom'] |
25
+ | style | 扩展样式 | Object | - |
26
+ | className | 扩展样式类 | String | - |
27
+ | moveMaxWidth | 拉动最大宽度 | Number | - |
28
+ | moveMaxHeight | 拉动的最大高度 | Number | - |
29
+ | dragMouseDown | 鼠标按下函数 | Function | - |
30
+ | dragMouseMove | 鼠标移动函数 | Function | - |
31
+ | dragMouseUp | 鼠标弹起函数 | Function | - |
32
+
33
+
@@ -0,0 +1,28 @@
1
+ ---
2
+ group:
3
+ title: 表单控件
4
+ order: 3
5
+ title: EditButton
6
+ toc: content
7
+ ---
8
+
9
+ # EditButton 按钮输入框
10
+
11
+ > 用于处理
12
+
13
+ ## 代码演示
14
+
15
+ ### 基本使用
16
+ <code title="基础用法" src="../../src/FormComp/EditButton/demos/basic.tsx" ></code>
17
+
18
+ ## API
19
+ | 参数 | 说明 | 类型 | 默认值 | 参考值 |
20
+ |----------|------------------------------------------|-------------|-------|-------|
21
+ | size | 控件尺寸| 同antd的Button与Input的size | middle |large/middle/small |
22
+ | label |按钮显示的文本| String | - | -|
23
+ | width |控件宽度| Number | 106 | |
24
+ | icon |按钮上显示的图标| ReactNode | - | -|
25
+ | disabled |禁用按钮| Boolean | - | -|
26
+ | onChange/onSave |输入值更新事件 | Function(value) | | - |
27
+ | className |扩展样式类 | String | | - |
28
+ | style |扩展样式|Object| | - |