weaver-e10-builder 1.0.11-beta → 1.0.12-beta

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 (175) hide show
  1. package/dist/commands/auth.d.ts.map +1 -1
  2. package/dist/commands/auth.js +13 -0
  3. package/dist/commands/auth.js.map +1 -1
  4. package/dist/commands/form-list-permission.d.ts.map +1 -1
  5. package/dist/commands/form-list-permission.js +130 -15
  6. package/dist/commands/form-list-permission.js.map +1 -1
  7. package/dist/commands/form-nlist.d.ts +22 -0
  8. package/dist/commands/form-nlist.d.ts.map +1 -0
  9. package/dist/commands/form-nlist.js +179 -0
  10. package/dist/commands/form-nlist.js.map +1 -0
  11. package/dist/commands/form-serial-mark.d.ts +0 -15
  12. package/dist/commands/form-serial-mark.d.ts.map +1 -1
  13. package/dist/commands/form-serial-mark.js +604 -137
  14. package/dist/commands/form-serial-mark.js.map +1 -1
  15. package/dist/commands/form.d.ts.map +1 -1
  16. package/dist/commands/form.js +91 -0
  17. package/dist/commands/form.js.map +1 -1
  18. package/dist/commands/skill.d.ts +3 -0
  19. package/dist/commands/skill.d.ts.map +1 -0
  20. package/dist/commands/skill.js +112 -0
  21. package/dist/commands/skill.js.map +1 -0
  22. package/dist/commands/workflow-condition.d.ts.map +1 -1
  23. package/dist/commands/workflow-condition.js +3 -1
  24. package/dist/commands/workflow-condition.js.map +1 -1
  25. package/dist/commands/workflow.d.ts.map +1 -1
  26. package/dist/commands/workflow.js +11 -7
  27. package/dist/commands/workflow.js.map +1 -1
  28. package/dist/index.js +4 -0
  29. package/dist/index.js.map +1 -1
  30. package/dist/services/condition-rules.d.ts.map +1 -1
  31. package/dist/services/condition-rules.js +3 -1
  32. package/dist/services/condition-rules.js.map +1 -1
  33. package/dist/services/form-create.d.ts.map +1 -1
  34. package/dist/services/form-create.js +4 -1
  35. package/dist/services/form-create.js.map +1 -1
  36. package/dist/services/form-nlist.d.ts +42 -0
  37. package/dist/services/form-nlist.d.ts.map +1 -0
  38. package/dist/services/form-nlist.js +332 -0
  39. package/dist/services/form-nlist.js.map +1 -0
  40. package/dist/services/skill-provision.d.ts +18 -0
  41. package/dist/services/skill-provision.d.ts.map +1 -0
  42. package/dist/services/skill-provision.js +86 -0
  43. package/dist/services/skill-provision.js.map +1 -0
  44. package/dist/services/workflow-initiator.js +3 -3
  45. package/dist/services/workflow-initiator.js.map +1 -1
  46. package/package.json +4 -2
  47. package/skill-docs/SKILL.md +348 -0
  48. package/skill-docs/actionflows/references/components/calendar/MeetingCreate.md +17 -0
  49. package/skill-docs/actionflows/references/components/calendar/ScheduleCreate.md +17 -0
  50. package/skill-docs/actionflows/references/components/document/AttachmentCopy.md +17 -0
  51. package/skill-docs/actionflows/references/components/document/AttachmentMove.md +17 -0
  52. package/skill-docs/actionflows/references/components/document/DocumentCopy.md +17 -0
  53. package/skill-docs/actionflows/references/components/document/DocumentDelete.md +17 -0
  54. package/skill-docs/actionflows/references/components/document/DocumentEdit.md +17 -0
  55. package/skill-docs/actionflows/references/components/document/DocumentMove.md +17 -0
  56. package/skill-docs/actionflows/references/components/document/DocumentPermissionChange.md +17 -0
  57. package/skill-docs/actionflows/references/components/document/DocumentRenewal.md +17 -0
  58. package/skill-docs/actionflows/references/components/document/DocumentRevert.md +17 -0
  59. package/skill-docs/actionflows/references/components/document/DocumentSave.md +17 -0
  60. package/skill-docs/actionflows/references/components/document/DocumentSubscription.md +17 -0
  61. package/skill-docs/actionflows/references/components/document/DocumentSubscriptionApprove.md +17 -0
  62. package/skill-docs/actionflows/references/components/document/DocumentSubscriptionSendBack.md +17 -0
  63. package/skill-docs/actionflows/references/components/document/DocumentSubscriptionWithdraw.md +17 -0
  64. package/skill-docs/actionflows/references/components/document/FileFolderSave.md +17 -0
  65. package/skill-docs/actionflows/references/components/document/GetAttachmentInfo.md +17 -0
  66. package/skill-docs/actionflows/references/components/document/GetDocumentInfo.md +17 -0
  67. package/skill-docs/actionflows/references/components/document/ModifyDocumentStatus.md +17 -0
  68. package/skill-docs/actionflows/references/components/document/ReplaceAttachment.md +17 -0
  69. package/skill-docs/actionflows/references/components/document/UpdatePrintNum.md +17 -0
  70. package/skill-docs/actionflows/references/components/ebuilder/ActionEbAdd.md +39 -0
  71. package/skill-docs/actionflows/references/components/ebuilder/ActionEbDelete.md +21 -0
  72. package/skill-docs/actionflows/references/components/ebuilder/ActionEbRecover.md +17 -0
  73. package/skill-docs/actionflows/references/components/ebuilder/ActionEbSaveVersion.md +17 -0
  74. package/skill-docs/actionflows/references/components/ebuilder/ActionEbUpdate.md +21 -0
  75. package/skill-docs/actionflows/references/components/ebuilder/DateTrigger.md +17 -0
  76. package/skill-docs/actionflows/references/components/ebuilder/EbGetDataById.md +17 -0
  77. package/skill-docs/actionflows/references/components/ebuilder/EnquiryForm.md +75 -0
  78. package/skill-docs/actionflows/references/components/ebuilder/EventFormData.md +17 -0
  79. package/skill-docs/actionflows/references/components/ebuilder/TimeBatchTrigger.md +17 -0
  80. package/skill-docs/actionflows/references/components/logic/Condition.md +23 -0
  81. package/skill-docs/actionflows/references/components/logic/LogicFlowSet.md +17 -0
  82. package/skill-docs/actionflows/references/components/logic/MultipleExecution.md +38 -0
  83. package/skill-docs/actionflows/references/components/logic/Output.md +17 -0
  84. package/skill-docs/actionflows/references/components/message/SendMessage.md +17 -0
  85. package/skill-docs/actionflows/references/components/personnel/AlterPersonStatus.md +30 -0
  86. package/skill-docs/actionflows/references/components/personnel/HrmEmployeeUpdate.md +32 -0
  87. package/skill-docs/actionflows/references/components/personnel/PersonnelOnboarding.md +34 -0
  88. package/skill-docs/actionflows/references/components/trigger/SimpleScheduler.md +17 -0
  89. package/skill-docs/actionflows/references/components/workflow/ApproveAddSign.md +17 -0
  90. package/skill-docs/actionflows/references/components/workflow/ApproveAgreeRejectApply.md +17 -0
  91. package/skill-docs/actionflows/references/components/workflow/ApproveCommit.md +17 -0
  92. package/skill-docs/actionflows/references/components/workflow/ApproveCompletelyDelete.md +17 -0
  93. package/skill-docs/actionflows/references/components/workflow/ApproveConsulTurnTodo.md +17 -0
  94. package/skill-docs/actionflows/references/components/workflow/ApproveCreate.md +17 -0
  95. package/skill-docs/actionflows/references/components/workflow/ApproveDelete.md +17 -0
  96. package/skill-docs/actionflows/references/components/workflow/ApproveDoCirculate.md +17 -0
  97. package/skill-docs/actionflows/references/components/workflow/ApproveDoForward.md +17 -0
  98. package/skill-docs/actionflows/references/components/workflow/ApproveDoTurnTodo.md +17 -0
  99. package/skill-docs/actionflows/references/components/workflow/ApproveEntrust.md +17 -0
  100. package/skill-docs/actionflows/references/components/workflow/ApproveIntervention.md +17 -0
  101. package/skill-docs/actionflows/references/components/workflow/ApproveMandatoryArchiving.md +17 -0
  102. package/skill-docs/actionflows/references/components/workflow/ApproveManualCC.md +17 -0
  103. package/skill-docs/actionflows/references/components/workflow/ApproveRefuseRejectApply.md +17 -0
  104. package/skill-docs/actionflows/references/components/workflow/ApproveRejectApply.md +17 -0
  105. package/skill-docs/actionflows/references/components/workflow/ApproveSave.md +17 -0
  106. package/skill-docs/actionflows/references/components/workflow/ApproveSendBack.md +17 -0
  107. package/skill-docs/actionflows/references/components/workflow/ApproveShareEntry.md +17 -0
  108. package/skill-docs/actionflows/references/components/workflow/ApproveTrigger.md +49 -0
  109. package/skill-docs/actionflows/references/components/workflow/ApproveWithdraw.md +17 -0
  110. package/skill-docs/actionflows/references/components/workflow/WorkFlowDocEmpowerment.md +17 -0
  111. package/skill-docs/actionflows/references/components/workflow/WorkflowToDoc.md +17 -0
  112. package/skill-docs/actionflows/references/condition_rules.md +97 -0
  113. package/skill-docs/actionflows/references/examples/enquiry-form-batch-insert-scene2.json +1046 -0
  114. package/skill-docs/actionflows/references/function_rules.md +13 -0
  115. package/skill-docs/actionflows/references/trigger_runtime_notes.md +51 -0
  116. package/skill-docs/assets/sample/.claude/settings.local.json +8 -0
  117. package/skill-docs/assets/sample/api/formApi.js +510 -0
  118. package/skill-docs/assets/sample/config/config.js +0 -0
  119. package/skill-docs/assets/sample/config/configLoad.js +0 -0
  120. package/skill-docs/assets/sample/config/configLoad_default.js +0 -0
  121. package/skill-docs/assets/sample/config/config_default.js +0 -0
  122. package/skill-docs/assets/sample/entry.js +22 -0
  123. package/skill-docs/assets/sample/eslint.config.cjs +48 -0
  124. package/skill-docs/assets/sample/memo.md +0 -0
  125. package/skill-docs/assets/sample/readme.js +8 -0
  126. package/skill-docs/references/auth/guide-auth.md +88 -0
  127. package/skill-docs/references/coding/guide-edit-backfill.md +189 -0
  128. package/skill-docs/references/coding/guide-form-crud.md +262 -0
  129. package/skill-docs/references/coding/guide-page-code.md +224 -0
  130. package/skill-docs/references/coding/guide-page-export.md +119 -0
  131. package/skill-docs/references/coding/ref-compile-rules.md +106 -0
  132. package/skill-docs/references/common/ref-cli-commands.md +286 -0
  133. package/skill-docs/references/components/@weapp-Button.md +104 -0
  134. package/skill-docs/references/components/base-Badge.md +100 -0
  135. package/skill-docs/references/components/base-Dialog.md +358 -0
  136. package/skill-docs/references/components/base-Empty.md +58 -0
  137. package/skill-docs/references/components/base-Tag.md +112 -0
  138. package/skill-docs/references/components/display-Alert.md +64 -0
  139. package/skill-docs/references/components/display-Avatar.md +150 -0
  140. package/skill-docs/references/components/display-Calendar.md +263 -0
  141. package/skill-docs/references/components/display-Carousel.md +115 -0
  142. package/skill-docs/references/components/display-Collapse.md +299 -0
  143. package/skill-docs/references/components/display-FilePreview.md +49 -0
  144. package/skill-docs/references/components/display-Icon.md +66 -0
  145. package/skill-docs/references/components/display-List.md +320 -0
  146. package/skill-docs/references/components/display-Pagination.md +41 -0
  147. package/skill-docs/references/components/display-Spin.md +34 -0
  148. package/skill-docs/references/components/display-Steps.md +89 -0
  149. package/skill-docs/references/components/display-Table.md +160 -0
  150. package/skill-docs/references/components/display-Title.md +117 -0
  151. package/skill-docs/references/components/form-Checkbox.md +161 -0
  152. package/skill-docs/references/components/form-DepartmentBrowser-api.md +52 -0
  153. package/skill-docs/references/components/form-EmployeeBrowser-api.md +51 -0
  154. package/skill-docs/references/components/form-EmployeeBrowser.md +51 -0
  155. package/skill-docs/references/components/form-Input.md +123 -0
  156. package/skill-docs/references/components/form-Radio.md +145 -0
  157. package/skill-docs/references/components/form-Select.md +191 -0
  158. package/skill-docs/references/components/form-Switch.md +46 -0
  159. package/skill-docs/references/components/form-Upload.md +53 -0
  160. package/skill-docs/references/components/generic-Echarts.md +102 -0
  161. package/skill-docs/references/form/guide-create-form.md +407 -0
  162. package/skill-docs/references/form/guide-ebuilder-filter.md +73 -0
  163. package/skill-docs/references/form/guide-ebuilder-scope.md +82 -0
  164. package/skill-docs/references/form/guide-form-data.md +48 -0
  165. package/skill-docs/references/form/guide-form-formula-functions.md +297 -0
  166. package/skill-docs/references/form/guide-form-linkage.md +185 -0
  167. package/skill-docs/references/form/guide-form-view-permission.md +38 -0
  168. package/skill-docs/references/form/guide-form-view.md +267 -0
  169. package/skill-docs/references/form/style-templates.md +44 -0
  170. package/skill-docs/references/hrm/guide-matrix.md +103 -0
  171. package/skill-docs/references/menu/system-menus.md +63 -0
  172. package/skill-docs/references/workflow/guide-workflow-action.md +168 -0
  173. package/skill-docs/references/workflow/guide-workflow-condition.md +405 -0
  174. package/skill-docs/references/workflow/guide-workflow.md +388 -0
  175. package/skill-docs/references/workflow/operator-matrix.md +74 -0
@@ -0,0 +1,358 @@
1
+ ## 代码演示
2
+ ### 基础用法
3
+ ```tsx
4
+ import { Component } from 'react';
5
+ import { Dialog, Button, constants } from '@weapp/ui';
6
+
7
+ const { uiPcClsPrefix } = constants;
8
+
9
+ interface DialogDemoProps {
10
+ history?: any;
11
+ }
12
+ interface DialogDemoState {
13
+ visible?: boolean;
14
+ }
15
+
16
+ const prefixCls = `${uiPcClsPrefix}-demo-btn`;
17
+
18
+ class DialogBody extends Component<{}> {
19
+ render() {
20
+ return <div className={`${uiPcClsPrefix}-demo-dialog-dialogBody`}>
21
+ <p>DialogBody</p>
22
+ <p>show everything...</p>
23
+ <p>show everything...</p>
24
+ </div>
25
+ }
26
+ }
27
+
28
+ class DialogDemo extends Component<DialogDemoProps, DialogDemoState> {
29
+ constructor(props: DialogDemoProps) {
30
+ super(props);
31
+ this.state = {
32
+ visible: false
33
+ }
34
+ }
35
+
36
+ onClose = () => {
37
+ this.setState({ visible: false });
38
+ }
39
+
40
+ showDialog = () => {
41
+ this.setState({ visible: true });
42
+ }
43
+
44
+ handleOk = () => {
45
+ this.setState({ visible: false });
46
+ };
47
+
48
+ handleCancel = () => {
49
+ this.setState({ visible: false });
50
+ };
51
+
52
+ render() {
53
+ const { visible } = this.state;
54
+ return (
55
+ <div className={prefixCls}>
56
+ <Button type={'primary'} onClick={this.showDialog}>打开弹框</Button>
57
+ <Dialog
58
+ visible={visible}
59
+ onClose={this.onClose}
60
+ title="基础用法,支持自定义页头页脚"
61
+ width={770}
62
+ icon="Icon--Import-and-export"
63
+ scale
64
+ closable
65
+ destroyOnClose
66
+ buttons={[<Button key='a'>页头1</Button>, <Button key='b'>页头2</Button>]}
67
+ footer={[<Button onClick={this.handleCancel} key='cancle'>自定义</Button>,<Button onClick={this.handleCancel} key='cancle'>取消</Button>, <Button onClick={this.handleOk} type={'primary'} key='ok'>确定</Button>]}
68
+ maskClosable
69
+ >
70
+ <DialogBody />
71
+ </Dialog>
72
+ </div>
73
+ );
74
+ }
75
+ }
76
+ ```
77
+ ### 对话框和提示消息
78
+ ```tsx
79
+ import { Component, ReactText } from 'react';
80
+ import { Dialog, Button, constants, Input, utils } from '@weapp/ui';
81
+
82
+ const { uiPcClsPrefix } = constants;
83
+ const { message, confirm } = Dialog;
84
+ const { getHd } = utils;
85
+ interface DialogDemoProps {
86
+ history?: any;
87
+ }
88
+
89
+ const prefixCls = `${uiPcClsPrefix}-demo-btn`;
90
+
91
+ class MyInput extends Component<any, any> {
92
+ constructor(props: any) {
93
+ super(props)
94
+ this.state = {
95
+ value : ''
96
+ }
97
+ }
98
+
99
+ handleChange = (value: ReactText) => {
100
+ this.setState({
101
+ value
102
+ })
103
+ }
104
+
105
+ render() {
106
+ return (
107
+ <>
108
+ test: <Input value={this.state.value} onChange={this.handleChange}></Input>
109
+ </>
110
+ )
111
+ }
112
+ }
113
+ class DialogDemo extends Component<DialogDemoProps> {
114
+ instance: any;
115
+ confirm = () => {
116
+ confirm({
117
+ content: '确认删除xxx吗?',
118
+ onOk: () => {
119
+ console.log('OK');
120
+ },
121
+ onCancel: () => {
122
+ console.log('Cancel');
123
+ },
124
+ destroy: () => {
125
+ console.log('组件销毁了')
126
+ },
127
+ });
128
+ }
129
+
130
+ confirmDraggable = () => {
131
+ confirm({
132
+ content: '确认删除xxx吗?',
133
+ onOk: () => {
134
+ console.log('OK');
135
+ },
136
+ onCancel: () => {
137
+ console.log('Cancel');
138
+ },
139
+ destroy: () => {
140
+ console.log('组件销毁了')
141
+ },
142
+ draggable: true,
143
+ });
144
+ }
145
+
146
+ getInstance = (el: any) => {
147
+ this.instance = el;
148
+ }
149
+ close = () => {
150
+ this.instance && this.instance.onClose()
151
+ console.log('close')
152
+ }
153
+ handleOk = () => {
154
+ this.instance && this.instance.onOk()
155
+ console.log('ok')
156
+ }
157
+
158
+ confirmFooter = () => {
159
+ confirm({
160
+ content: '不设置left/top/right/bottom 默认水平垂直居中显示',
161
+ height: 220 * (getHd?.() || 1),
162
+ // enableKeyboardEvent: false,
163
+ customKeyboardEvent:()=> {
164
+ console.log('触发自定义的事件')
165
+ this.close()
166
+ // this.instance && this.instance.onOk()
167
+ },
168
+ getInstance: this.getInstance,
169
+ footer: <div>
170
+ <Button onClick={this.handleOk}>确认(支持键盘事件)</Button>
171
+ <Button onClick={this.close}>取消</Button>
172
+ </div>,
173
+ destroy: () => {
174
+ console.log('组件销毁了')
175
+ },
176
+ onOk: () => {
177
+ console.log('OK');
178
+ },
179
+ });
180
+ }
181
+ confirmInput = () => {
182
+ confirm({
183
+ content:(
184
+ <div>
185
+ <MyInput></MyInput>
186
+ </div>
187
+ ),
188
+ onOk: () => {
189
+ console.log('OK');
190
+ },
191
+ onCancel: () => {
192
+ console.log('Cancel');
193
+ },
194
+ destroy: () => {
195
+ console.log('组件销毁了')
196
+ }
197
+ });
198
+ }
199
+
200
+ info = () => {
201
+ message({
202
+ type: 'info', // type: 'info', 'error', 'success', 'custom'
203
+ content: '这是一条普通提示',
204
+ });
205
+ }
206
+
207
+ success = () => {
208
+ message({
209
+ type: 'success', // type: 'info', 'error', 'success', 'custom'
210
+ content: '这是一条询问信息, 会主动消失',
211
+ });
212
+ }
213
+
214
+ infoCustomClose = () => {
215
+ message({
216
+ type: 'error', // type: 'info', 'error', 'success', 'custom'
217
+ content: '这是一条询问信息, 不会主动消失',
218
+ delay: 0, // 相当于禁止主动消失
219
+ });
220
+ }
221
+
222
+ maxMessageCount = () => {
223
+ message({
224
+ type: 'success', // type: 'info', 'error', 'success', 'custom'
225
+ content: '这是一条询问信息, 会主动消失,最大是三条',
226
+ maxMessageCount: 3
227
+ });
228
+ }
229
+
230
+ render() {
231
+ return (
232
+ <div className={prefixCls}>
233
+ <Button onClick={this.confirm}>确认框</Button>
234
+ <Button onClick={this.confirmFooter}>确认框(自定义footer)</Button>
235
+ <Button onClick={this.confirmInput}>确认框(插入input)</Button>
236
+ <Button onClick={this.confirmDraggable}>确认框(可拖拽)</Button>
237
+ <Button type={'primary'} onClick={this.info}>信息提示(info)</Button>
238
+ <Button type={'success'} onClick={this.success}>信息提示(success)</Button>
239
+ <Button type={'danger'} onClick={this.infoCustomClose}>信息提示(error)</Button>
240
+ <Button type={'success'} onClick={this.maxMessageCount}>可控制最大展示消息数</Button>
241
+ </div>
242
+ );
243
+ }
244
+ }
245
+ ```
246
+
247
+ ## 参数说明
248
+ ### 组件参数说明如下
249
+ | 参数 | 说明 | 类型 | 是否必填 | 默认值 |
250
+ | --- | --- | --- | --- | --- |
251
+ | bodyStyle | Dialog 内容部分样式 | CSSProperties | 否 | |
252
+ | bottom | 距离底部高度 | number \| string | 否 | |
253
+ | bottomExtraContent | 自定义底部内容 | ReactNode | 否 | |
254
+ | bottomExtraContentProps | 自定义弹层底部Layout区参数配置 | LayoutBoxProps | 否 | |
255
+ | buttons | 按钮组(顶部) | ReactNode | 否 | |
256
+ | closable | 是否显示右上角的关闭按钮 | boolean | 否 | |
257
+ | closeAnimation | 关闭动画 | boolean | 否 | false |
258
+ | closeIcon | 自定义关闭按钮 | ReactNode | 否 | |
259
+ | customRenderDialogBody | 自定义弹框内容(用于复写基于 Dialog 开发的组件弹层内容) | (_: any, ele: ReactNode) => ReactNode | 否 | |
260
+ | customRenderDialogTitle | 自定义标题内容(用于复写基于 Dialog 标题内容) | (_: any, ele: ReactNode) => ReactNode | 否 | |
261
+ | customRenderInDialogContainer | 在 container 层级下复写弹框内容 | ReactNode | 否 | |
262
+ | defaultInnerScale | 默认全屏 | boolean | 否 | |
263
+ | destroyOnClose | 关闭时销毁 Drawer 里的子元素 | boolean | 否 | |
264
+ | dialogConfig | 功能同Dialog.dialogConfig,优先级高于Dialog.dialogConfig | AnyObj | 否 | |
265
+ | dialogId | 弹框唯一标记 | string | 否 | |
266
+ | draggable | Dialog 是否开启拖拽 | boolean | 否 | true |
267
+ | enableEventEmitter | 启用事件监听方案 | boolean | 否 | true |
268
+ | footer | 按钮组(底部) | ReactNode | 否 | |
269
+ | forceRender | 预渲染弹框内部内容 | boolean | 否 | |
270
+ | getContainer | 弹层容器定位 | (element?: HTMLElement) => HTMLElement | 否 | |
271
+ | headerStyle | Dialog 标题区样式 | CSSProperties | 否 | |
272
+ | height | Dialog 高度(注意:1. left/right 模式不可改。 2. placement 为 middle 时,高度设置小于 200 不生效) | number \| string | 否 | |
273
+ | ignoreCalculationContainer | 忽略 dialog 内部宽高的最大最小值限定规则 | boolean | 否 | false |
274
+ | innerScale | 是否全屏,优先级高于defaultInnerScale | boolean | 否 | |
275
+ | isEnlargeFullScreen | 全屏模式下弹框宽高占可视区域比例 | boolean | 否 | false |
276
+ | isStopPropagation | 禁止阻止冒泡 | boolean | 否 | true |
277
+ | keepDialogAlive | 业签模式是否开启本地化存储(dialogId 必须唯一不变) | boolean | 否 | true |
278
+ | left | 距离左侧高度 | number \| string | 否 | |
279
+ | leftExtraContent | 自定义左侧内容 | ReactNode | 否 | |
280
+ | leftExtraContentProps | 自定义弹层左侧Layout区参数配置 | LayoutBoxProps | 否 | |
281
+ | mask | 是否展示遮罩 | boolean | 否 | |
282
+ | maskClosable | 点击蒙层是否允许关闭 | boolean | 否 | |
283
+ | maskStyle | Dialog 遮罩层部分样式 | CSSProperties | 否 | |
284
+ | maxResizeHeight | 可调整的最大高度 | string \| number | 否 | |
285
+ | maxResizeWidth | 可调整的最大宽度 | string \| number | 否 | |
286
+ | message | 消息层内容 | string \| ReactNode | 否 | |
287
+ | minResizeHeight | 可调整的最小高度 | string \| number | 否 | |
288
+ | minResizeWidth | 可调整的最小宽度 | string \| number | 否 | |
289
+ | noMaskClose | 无蒙层,Dialog 外部触发弹窗关闭,非 middle 模式支持 | boolean | 否 | |
290
+ | noTitle | 隐藏弹框顶部内容 | boolean | 否 | |
291
+ | onAfterClose | Dialog 关闭后回调(带动画效果) | ( () => void; | 否 | |
292
+ | onClose | 击遮罩层或右上角叉或取消按钮的回调 | () => void | 否 | |
293
+ | onDrag | Dialog 拖拽回调 | (e: HTMLDivElement, position:{x:number, y:number}) => void | 否 | |
294
+ | onDragStop | Dialog 拖拽停止回调 | (e: HTMLDivElement, position:{x:number, y:number}) => void | 否 | |
295
+ | onResize | 拖拽事件回调 | (style: CSSProperties, container?: HTMLDivElement \| null) => void | 否 | |
296
+ | onScale | 放大/缩小弹框回调 | () => void | 否 | |
297
+ | path | 通过路由打开 | string | 否 | |
298
+ | placement | middle \| top \| right \| bottom \| left | string | 否 | middle |
299
+ | ref | 组件实例 | any | 否 | |
300
+ | resetDragPosition | 监听弹窗容器宽高变化,变化后重置拖拽位置 | boolean | 否 | |
301
+ | resize | 是否支持拖拽调整宽度 | boolean | 否 | |
302
+ | right | 距离右侧高度 | number \| string | 否 | |
303
+ | rightExtraContent | 自定义右侧内容 | ReactNode | 否 | |
304
+ | rightExtraContentProps | 自定义弹层右侧Layout区参数配置 | LayoutBoxProps | 否 | |
305
+ | scale | 是否支持最大化 | boolean | 否 | |
306
+ | top | 距离顶部高度 | number \| string | 否 | |
307
+ | topExtraContent | 自定义顶部内容 | ReactNode | 否 | |
308
+ | topExtraContentProps | 自定义弹层顶部Layout区参数配置 | LayoutBoxProps | 否 | |
309
+ | visible | 显示受控 | boolean | 否 | |
310
+ | width | Dialog 宽度 (注意:placement 为 middle 时,宽度设置小于 380 不生效) | number \| string | 否 | |
311
+ | windowOpenUrl | 从新的窗口打开该 dialog 的地址 | string | 否 | |
312
+ | wrapClassName | 外层容器 class | string | 否 | |
313
+ | wrapStyle | 外层容器自定义样式 | CSSProperties | 否 | |
314
+ | zIndex | Dialog 层级 | number | 否 | |
315
+
316
+ ### Dialog.message 参数说明如下
317
+ | 参数 | 说明 | 类型 | 是否必填 | 默认值 |
318
+ | --- | --- | --- | --- | --- |
319
+ | content | 消息内容 | ReactNode | 否 | |
320
+ | delay | 自定义消息消失时间, 以毫秒为单位(0: 代表不会自动消失) | number | 否 | |
321
+ | destroy | 销毁方法 | () => void; | 否 | |
322
+ | icon | type = 'custom' 时自定义icon | ReactNode | 否 | |
323
+ | maxMessageCount | 最大可同时展示的消息数 | number | 否 | 3 |
324
+ | type | 消息类型 | info \| error \| success \| custom | 否 | 'info' |
325
+
326
+ ### Dialog.confirm 参数说明如下:
327
+ | 参数 | 说明 | 类型 | 是否必填 | 默认值 |
328
+ | --- | --- | --- | --- | --- |
329
+ | bottom | 距离底部高度 | number \| string | | |
330
+ | cancelText | 取消按钮文字 | string \|ReactNode | 否 | |
331
+ | cancelType | 取消按钮类型 | BtnType | 否 | |
332
+ | closeIcon | 自定义关闭按钮 | ReactNode | 否 | |
333
+ | confirmMaskClassName | 确认框蒙层样式名 | string | 否 | |
334
+ | confirmWrapId | 确认框蒙包裹层id(主要用于处理全局点击白名单) | string | 否 | |
335
+ | content | 内容 | ReactNode | 否 | |
336
+ | customKeyboardEvent | 自定义键盘事件触发的回调 | () => void | 否 | |
337
+ | draggable | 拖拽 | boolean | 否 | |
338
+ | enableHistoryListen | 启用路由监听关闭弹框方案 | boolean | 否 | |
339
+ | enableKeyboardEvent | 是否开启键盘事件(键盘事件默认触发onOK回调) | boolean | 否 | true |
340
+ | footer | 按钮组(底部) | ReactNode | 否 | |
341
+ | getInstance | 获取弹框实例 | (instance: any) => void | | |
342
+ | getTitle | 自定义标题 | () => ReactNode | 否 | |
343
+ | height | 设置弹窗高度 | number \| string | | |
344
+ | hideCancelBtn | 隐藏确定按钮 | boolean | 否 | |
345
+ | hideOkBtn | 隐藏确定按钮 | boolean | 否 | |
346
+ | icon | 标题图标 | string | 否 | |
347
+ | iconBgcolor | 标题图标颜色 | string | 否 | |
348
+ | left | 距离左边高度 | number \| string | | |
349
+ | okText | 确定按钮文字 | string \| ReactNode | 否 | |
350
+ | okType | 确定按钮类型 | BtnType | 否 | |
351
+ | onCancel | 取消回调方法 | () => void | 否 | |
352
+ | onOk | 确定回调方法 | () => void | 否 | |
353
+ | right | 距离右边高度 | number \| string | | |
354
+ | title | 标题信息 | string | 否 | |
355
+ | top | 距离顶部高度 | number \| string | | |
356
+ | width | 设置弹窗宽度 | number \| string | | |
357
+ | wrapStyle | 外层容器自定义样式 | CSSProperties | 否 | |
358
+ | zIndex | | number | 否 | |
@@ -0,0 +1,58 @@
1
+ ## 基础用法
2
+ ```js
3
+ import { Component } from "react";
4
+ import { Empty, Icon, constants, Button } from "@weapp/ui";
5
+
6
+ const prefixCls = `${constants.uiPcClsPrefix}-demo-empty`;
7
+
8
+ export default class EmptyDemo extends Component {
9
+
10
+ renderFooter = () => <Button type={'primary'}>新建流程</Button>
11
+
12
+ render() {
13
+ return (
14
+ <div className={prefixCls}>
15
+ <Empty
16
+ title={'暂无待办流程'}
17
+ description='您暂时还没有待办流程,可以主动发起一条试试哦~'
18
+ image={
19
+ <Icon
20
+ style={{ width: 100, height: 100 }}
21
+ name={'Icon-empty-file'
22
+ } />
23
+ }
24
+ />
25
+
26
+ <Empty
27
+ description={
28
+ <span>
29
+ Customize <a href="#API">Description</a>
30
+ </span>
31
+ }
32
+ image={'https://img95.699pic.com/photo/50055/5642.jpg_wh300.jpg'}
33
+ imageStyle={{ height: 100 }}
34
+ renderFooter={this.renderFooter}
35
+ />
36
+ </div>
37
+ )
38
+ }
39
+ }
40
+
41
+ ```
42
+
43
+ ## 参数说明
44
+
45
+ | 参数 | 说明 | 类型 | 是否必填 | 默认值 |
46
+ | --- | --- | --- | --- | --- |
47
+ | customRender | 自定义渲染 | `(_: any, ele: React.ReactNode) => React.ReactNode` | 否 | |
48
+ | description | 次要文字描述 | `ReactNode` | 否 | |
49
+ | displayType | 展示类型 | `'404' \| 'ie'` | 否 | |
50
+ | image | 设置显示图片,为 string 时表示自定义图片地址。 | `ReactNode` | 否 | |
51
+ | imageStyle | 图片样式 | `CSSProperties` | 否 | |
52
+ | renderFooter | 自定义底部内容 | `() => ReactNode` | 否 | |
53
+ | style | style 样式 | `CSSProperties` | 否 | |
54
+ | title | 主要文字描述 | `ReactNode` | 否 | |
55
+
56
+ > 注意:
57
+ 1. 可修改 displayType 来展示 error 类型
58
+ 2. 可修改 displayType 来展示 IE浏览器支持提示
@@ -0,0 +1,112 @@
1
+ ## 基础用法
2
+
3
+ ```js
4
+ import React, { Component } from "react";
5
+ import { constants, Tag, Icon } from "@weapp/ui";
6
+
7
+ const prefixCls = `${constants.uiPcClsPrefix}-demo-tag`;
8
+
9
+ export default class TagDemo extends Component {
10
+ // 删除标签时的事件
11
+ handleClose = () => {
12
+ console.log("标签已关闭");
13
+ };
14
+
15
+ // 点击关闭按钮后延迟 2s 关闭
16
+ handleBeforeClose = () => {
17
+ return new Promise((resolve, reject) => {
18
+ setTimeout(function () {
19
+ try {
20
+ resolve(null);
21
+ } catch (err) {
22
+ reject(null);
23
+ }
24
+ }, 2000);
25
+ });
26
+ };
27
+
28
+ render() {
29
+ return (
30
+ <div className={prefixCls}>
31
+ <div>
32
+ <div className="tag-demo-label">
33
+ <h6>方形</h6>
34
+ </div>
35
+ <div className="tag-demo">
36
+ <Tag title="标签1">方形标签</Tag>
37
+ </div>
38
+ </div>
39
+
40
+ <div>
41
+ <div className="tag-demo-label">
42
+ <h6>圆角标签</h6>
43
+ </div>
44
+ <div className="tag-demo">
45
+ <Tag radius>圆角标签</Tag>
46
+ </div>
47
+ </div>
48
+
49
+ <div>
50
+ <div className="tag-demo-label">
51
+ <h6>悬浮状态展现删除按钮</h6>
52
+ </div>
53
+ <div className="tag-demo">
54
+ <Tag closable onClose={this.handleClose}>
55
+ 删除
56
+ </Tag>
57
+ <Tag
58
+ radius
59
+ closable
60
+ beforeClose={this.handleBeforeClose}
61
+ onClose={this.handleClose}
62
+ style={{ maxWidth: "80px" }}
63
+ >
64
+ 点击关闭图标,延迟 2s 关闭
65
+ </Tag>
66
+ </div>
67
+ </div>
68
+
69
+ <div>
70
+ <div className="tag-demo-label">
71
+ <h6>中等标签</h6>
72
+ </div>
73
+ <div className="tag-demo">
74
+ <Tag size="medium">中等的标签</Tag>
75
+ <Tag disabled size="medium">禁用状态</Tag>
76
+ </div>
77
+ </div>
78
+
79
+ <div>
80
+ <div className="tag-demo-label">
81
+ <h6>方形标签</h6>
82
+ </div>
83
+ <div className="tag-demo">
84
+ <Tag type="default">默认标签</Tag>
85
+ <Tag type="primary">主要标签</Tag>
86
+ <Tag type="success">成功标签</Tag>
87
+ <Tag type="warning">警告标签</Tag>
88
+ <Tag type="danger">危险标签</Tag>
89
+ </div>
90
+ </div>
91
+ </div>
92
+ );
93
+ }
94
+ }
95
+ ```
96
+
97
+ ## 参数说明
98
+
99
+ | 参数 | 说明 | 类型 | 必填 | 默认值 |
100
+ | --- | --- | --- | --- | --- |
101
+ | beforeClose | 标签关闭前的回调 | `(e: React.MouseEvent) => Promise` | 否 | — |
102
+ | checked | 是否选中 | `boolean` | 否 | `false` |
103
+ | closable | 是否可删除 | `boolean` | 否 | `false` |
104
+ | closeIcon | 自定义关闭按钮 | `ReactNode` | 否 | `x` |
105
+ | disabled | 是否禁用 | `boolean` | 否 | `false` |
106
+ | onCheck | 选中状态切换触发的函数 | `(checked: boolean, e: React.MouseEvent) => void` | 否 | — |
107
+ | onClose | 关闭后回调 | `(e: React.MouseEvent) => void` | 否 | — |
108
+ | radius | 是否是圆角标签 | `boolean` | 否 | `false` |
109
+ | size | 标签尺寸 | `'small'` \| `'medium'` \| `'large'` | 否 | `'large'` |
110
+ | solid | 是否是实心 | `boolean` | 否 | `false` |
111
+ | title | 提示文字 | `string` | 否 | — |
112
+ | type | 标签分类 | `'default'` \| `'primary'` \| `'success'` \| `'warning'` \| `'danger'` | 否 | `'default'` |
@@ -0,0 +1,64 @@
1
+ ## 基础用法
2
+ ```tsx
3
+ import { Component } from 'react'
4
+ import { constants, Alert, Icon } from '@weapp/ui'
5
+
6
+ const prefixCls = `${constants.uiPcClsPrefix}-demo-alert`
7
+
8
+ export default class AlertDemo extends Component<{}> {
9
+ render() {
10
+ return (
11
+ <div className={prefixCls}>
12
+ <Alert
13
+ message="Success Text"
14
+ type="success"
15
+ />
16
+ <br />
17
+ <Alert
18
+ message="Info Text"
19
+ description="common LunarKK common LunarKK common LunarKK common LunarKK"
20
+ type="info"
21
+ showIcon
22
+ />
23
+ <br />
24
+ <Alert
25
+ message="Warning Text"
26
+ description="Warning Description Warning Description Warning Description Warning Description"
27
+ type="warning"
28
+ showIcon
29
+ closable
30
+ />
31
+ <br />
32
+ <Alert
33
+ message="Error Text"
34
+ description="Error Description Error Description Error Description Error Description"
35
+ icon={<Icon name="Icon-smiling-face" size={'s'} />}
36
+ type="error"
37
+ showIcon
38
+ closable
39
+ />
40
+ </div>
41
+ )
42
+ }
43
+ }
44
+ ```
45
+
46
+ ## 参数说明
47
+ | 参数 | 说明 | 类型 | 是否必填 | 默认值 |
48
+ | --- | --- | --- | --- | --- |
49
+ | action | 自定义操作按钮 | ReactNode | false | |
50
+ | afterClose | 关闭动画结束后触发的回调函数 | () => void | false | |
51
+ | banner | 是否用作顶部公告 | boolean | false | |
52
+ | closable | 是否可关闭 | boolean | false | |
53
+ | closeIcon | 自定义关闭图标 | 参考 Icon 组件的 IconNames | false | |
54
+ | closeText | 自定义关闭按钮 | ReactNode | false | |
55
+ | description | 警告提示的辅助性文字介绍 | ReactNode | false | |
56
+ | icon | 自定义图标,showIcon 为 true 时有效 | ReactNode | false | |
57
+ | iconName | 自定义图标名称 | 参考 Icon 组件的 IconNames | false | |
58
+ | message | 警告提示内容 | ReactNode | false | |
59
+ | onClick | 鼠标点击的回调函数 | (e: MouseEvent) => void | false | |
60
+ | onClose | 关闭时触发的回调函数 | (e: MouseEvent) => void | false | |
61
+ | onMouseEnter | 鼠标移入的回调函数 | (e: MouseEvent) => void | false | |
62
+ | onMouseLeave | 鼠标移出的回调函数 | (e: MouseEvent) => void | false | |
63
+ | showIcon | 是否显示辅助图标 | boolean | false | banner 模式下默认值为 true |
64
+ | type | 指定警告提示的样式 | success|info|warning|error | false | info,banner模式下默认值为warning |