@next-bricks/form 1.21.10 → 1.21.12
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/dist/bricks.json +1 -1
- package/dist/chunks/{2537.d25d0532.js → 2537.be4cf82c.js} +2 -2
- package/dist/chunks/2537.be4cf82c.js.map +1 -0
- package/dist/chunks/{4056.aac4a786.js → 3053.7e00faa1.js} +3 -3
- package/dist/chunks/3053.7e00faa1.js.map +1 -0
- package/dist/chunks/845.2f598dd9.js +3 -0
- package/dist/chunks/845.2f598dd9.js.map +1 -0
- package/dist/chunks/{9949.753e2720.js → 9949.3d28a915.js} +3 -3
- package/dist/chunks/9949.3d28a915.js.map +1 -0
- package/dist/chunks/eo-auto-complete.0ed854e4.js +3 -0
- package/dist/chunks/eo-auto-complete.0ed854e4.js.map +1 -0
- package/dist/chunks/eo-checkbox.2d0a8dbc.js +2 -0
- package/dist/chunks/eo-checkbox.2d0a8dbc.js.map +1 -0
- package/dist/chunks/eo-color-picker.ecf0c4c0.js +2 -0
- package/dist/chunks/eo-color-picker.ecf0c4c0.js.map +1 -0
- package/dist/chunks/eo-date-picker.faa60507.js +2 -0
- package/dist/chunks/eo-date-picker.faa60507.js.map +1 -0
- package/dist/chunks/eo-dynamic-form-item.aa5f7d9e.js +3 -0
- package/dist/chunks/eo-dynamic-form-item.aa5f7d9e.js.map +1 -0
- package/dist/chunks/eo-form.9db78cdb.js.map +1 -1
- package/dist/chunks/eo-icon-select.6a7f7e12.js +3 -0
- package/dist/chunks/eo-icon-select.6a7f7e12.js.map +1 -0
- package/dist/chunks/eo-radio.b2ed57db.js +3 -0
- package/dist/chunks/eo-radio.b2ed57db.js.map +1 -0
- package/dist/chunks/eo-search.206dd65e.js.map +1 -1
- package/dist/chunks/eo-select.cd00c791.js +3 -0
- package/dist/chunks/eo-select.cd00c791.js.map +1 -0
- package/dist/chunks/eo-submit-buttons.8a293f65.js +2 -0
- package/dist/chunks/eo-submit-buttons.8a293f65.js.map +1 -0
- package/dist/chunks/eo-switch.f0a27c08.js +3 -0
- package/dist/chunks/eo-switch.f0a27c08.js.map +1 -0
- package/dist/chunks/eo-textarea.405851dd.js +3 -0
- package/dist/chunks/eo-textarea.405851dd.js.map +1 -0
- package/dist/chunks/eo-time-picker.46e7a667.js +2 -0
- package/dist/chunks/eo-time-picker.46e7a667.js.map +1 -0
- package/dist/chunks/eo-time-range-picker.5afbad69.js +2 -0
- package/dist/chunks/eo-time-range-picker.5afbad69.js.map +1 -0
- package/dist/chunks/eo-upload-file.27a4288d.js +3 -0
- package/dist/chunks/eo-upload-file.27a4288d.js.map +1 -0
- package/dist/chunks/eo-upload-image.b43c2329.js +3 -0
- package/dist/chunks/eo-upload-image.b43c2329.js.map +1 -0
- package/dist/chunks/{input.a430c2a2.js → input.653c9d90.js} +3 -3
- package/dist/chunks/input.653c9d90.js.map +1 -0
- package/dist/chunks/{main.87225246.js → main.035ebb8e.js} +2 -2
- package/dist/chunks/{main.87225246.js.map → main.035ebb8e.js.map} +1 -1
- package/dist/examples.json +21 -18
- package/dist/{index.6833e5c3.js → index.90f748b4.js} +2 -2
- package/dist/{index.6833e5c3.js.map → index.90f748b4.js.map} +1 -1
- package/dist/manifest.json +108 -42
- package/dist/types.json +55 -5
- package/dist-types/auto-complete/index.d.ts +4 -0
- package/dist-types/checkbox/index.d.ts +2 -2
- package/dist-types/color-picker/index.d.ts +2 -1
- package/dist-types/form/index.d.ts +16 -1
- package/dist-types/form-item/index.d.ts +31 -2
- package/dist-types/general-switch/index.d.ts +1 -1
- package/dist-types/icon-select/index.d.ts +1 -1
- package/dist-types/input/index.d.ts +2 -2
- package/dist-types/radio/index.d.ts +4 -4
- package/dist-types/select/index.d.ts +1 -0
- package/dist-types/textarea/index.d.ts +1 -1
- package/dist-types/time-range-picker/index.d.ts +7 -4
- package/dist-types/upload/upload-file/index.d.ts +1 -1
- package/docs/eo-auto-complete.md +158 -8
- package/docs/eo-auto-complete.react.md +229 -0
- package/docs/eo-checkbox.md +107 -4
- package/docs/eo-checkbox.react.md +369 -0
- package/docs/eo-color-picker.md +102 -22
- package/docs/eo-color-picker.react.md +160 -0
- package/docs/eo-date-picker.md +82 -50
- package/docs/eo-date-picker.react.md +146 -0
- package/docs/eo-dynamic-form-item.md +60 -15
- package/docs/eo-dynamic-form-item.react.md +186 -0
- package/docs/eo-form-item.md +194 -0
- package/docs/eo-form-item.react.md +163 -0
- package/docs/eo-form.md +144 -3
- package/docs/eo-form.react.md +330 -0
- package/docs/eo-icon-select.md +80 -1
- package/docs/eo-icon-select.react.md +97 -0
- package/docs/eo-input.md +147 -22
- package/docs/eo-input.react.md +275 -0
- package/docs/eo-radio.md +145 -8
- package/docs/eo-radio.react.md +492 -0
- package/docs/eo-search.md +94 -1
- package/docs/eo-search.react.md +122 -0
- package/docs/eo-select.md +157 -9
- package/docs/eo-select.react.md +411 -0
- package/docs/eo-submit-buttons.md +120 -7
- package/docs/eo-submit-buttons.react.md +129 -0
- package/docs/eo-switch.md +57 -3
- package/docs/eo-switch.react.md +136 -0
- package/docs/eo-textarea.md +101 -22
- package/docs/eo-textarea.react.md +193 -0
- package/docs/eo-time-picker.md +70 -42
- package/docs/eo-time-picker.react.md +106 -0
- package/docs/eo-time-range-picker.md +89 -35
- package/docs/eo-time-range-picker.react.md +163 -0
- package/docs/eo-upload-file.md +101 -9
- package/docs/eo-upload-file.react.md +126 -0
- package/docs/eo-upload-image.md +70 -6
- package/docs/eo-upload-image.react.md +92 -0
- package/package.json +2 -2
- package/dist/chunks/2537.d25d0532.js.map +0 -1
- package/dist/chunks/4056.aac4a786.js.map +0 -1
- package/dist/chunks/845.c8b5b1e8.js +0 -3
- package/dist/chunks/845.c8b5b1e8.js.map +0 -1
- package/dist/chunks/9949.753e2720.js.map +0 -1
- package/dist/chunks/eo-auto-complete.9d9f68a8.js +0 -3
- package/dist/chunks/eo-auto-complete.9d9f68a8.js.map +0 -1
- package/dist/chunks/eo-checkbox.0b875e8b.js +0 -2
- package/dist/chunks/eo-checkbox.0b875e8b.js.map +0 -1
- package/dist/chunks/eo-color-picker.c3b11b2f.js +0 -2
- package/dist/chunks/eo-color-picker.c3b11b2f.js.map +0 -1
- package/dist/chunks/eo-date-picker.f5894c3c.js +0 -2
- package/dist/chunks/eo-date-picker.f5894c3c.js.map +0 -1
- package/dist/chunks/eo-dynamic-form-item.3837c24e.js +0 -3
- package/dist/chunks/eo-dynamic-form-item.3837c24e.js.map +0 -1
- package/dist/chunks/eo-icon-select.d343ca96.js +0 -3
- package/dist/chunks/eo-icon-select.d343ca96.js.map +0 -1
- package/dist/chunks/eo-radio.f2527bfa.js +0 -3
- package/dist/chunks/eo-radio.f2527bfa.js.map +0 -1
- package/dist/chunks/eo-select.9c05c45b.js +0 -3
- package/dist/chunks/eo-select.9c05c45b.js.map +0 -1
- package/dist/chunks/eo-submit-buttons.bccc3dbf.js +0 -2
- package/dist/chunks/eo-submit-buttons.bccc3dbf.js.map +0 -1
- package/dist/chunks/eo-switch.3607f593.js +0 -3
- package/dist/chunks/eo-switch.3607f593.js.map +0 -1
- package/dist/chunks/eo-textarea.fbc8c190.js +0 -3
- package/dist/chunks/eo-textarea.fbc8c190.js.map +0 -1
- package/dist/chunks/eo-time-picker.da156d88.js +0 -2
- package/dist/chunks/eo-time-picker.da156d88.js.map +0 -1
- package/dist/chunks/eo-time-range-picker.15864724.js +0 -2
- package/dist/chunks/eo-time-range-picker.15864724.js.map +0 -1
- package/dist/chunks/eo-upload-file.8e5acc0f.js +0 -3
- package/dist/chunks/eo-upload-file.8e5acc0f.js.map +0 -1
- package/dist/chunks/eo-upload-image.1ae9beb3.js +0 -3
- package/dist/chunks/eo-upload-image.1ae9beb3.js.map +0 -1
- package/dist/chunks/input.a430c2a2.js.map +0 -1
- /package/dist/chunks/{4056.aac4a786.js.LICENSE.txt → 3053.7e00faa1.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{845.c8b5b1e8.js.LICENSE.txt → 845.2f598dd9.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{9949.753e2720.js.LICENSE.txt → 9949.3d28a915.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-auto-complete.9d9f68a8.js.LICENSE.txt → eo-auto-complete.0ed854e4.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-dynamic-form-item.3837c24e.js.LICENSE.txt → eo-dynamic-form-item.aa5f7d9e.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-icon-select.d343ca96.js.LICENSE.txt → eo-icon-select.6a7f7e12.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-radio.f2527bfa.js.LICENSE.txt → eo-radio.b2ed57db.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-select.9c05c45b.js.LICENSE.txt → eo-select.cd00c791.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-switch.3607f593.js.LICENSE.txt → eo-switch.f0a27c08.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-textarea.fbc8c190.js.LICENSE.txt → eo-textarea.405851dd.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-upload-file.8e5acc0f.js.LICENSE.txt → eo-upload-file.27a4288d.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-upload-image.1ae9beb3.js.LICENSE.txt → eo-upload-image.b43c2329.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{input.a430c2a2.js.LICENSE.txt → input.653c9d90.js.LICENSE.txt} +0 -0
package/dist/manifest.json
CHANGED
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"name": "change",
|
|
94
94
|
"description": "",
|
|
95
95
|
"detail": {
|
|
96
|
-
"description":
|
|
96
|
+
"description": "当前输入值",
|
|
97
97
|
"type": "string"
|
|
98
98
|
}
|
|
99
99
|
}
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
{
|
|
104
104
|
"name": "focusTextarea",
|
|
105
105
|
"params": [],
|
|
106
|
-
"description": "
|
|
106
|
+
"description": "使文本域获得焦点",
|
|
107
107
|
"returns": {}
|
|
108
108
|
}
|
|
109
109
|
],
|
|
@@ -119,6 +119,7 @@
|
|
|
119
119
|
"properties": [
|
|
120
120
|
{
|
|
121
121
|
"name": "staticValues",
|
|
122
|
+
"description": "静态附加值,在表单验证成功时会合并到 validate.success 事件的 detail 中",
|
|
122
123
|
"attribute": false,
|
|
123
124
|
"type": "Record<string, unknown>"
|
|
124
125
|
},
|
|
@@ -149,10 +150,12 @@
|
|
|
149
150
|
},
|
|
150
151
|
{
|
|
151
152
|
"name": "autoScrollToInvalidFields",
|
|
153
|
+
"description": "是否在验证失败时自动滚动到第一个错误字段",
|
|
152
154
|
"type": "boolean"
|
|
153
155
|
},
|
|
154
156
|
{
|
|
155
157
|
"name": "formStyle",
|
|
158
|
+
"description": "表单自定义样式",
|
|
156
159
|
"attribute": false,
|
|
157
160
|
"type": "React.CSSProperties"
|
|
158
161
|
},
|
|
@@ -167,7 +170,7 @@
|
|
|
167
170
|
"name": "values.change",
|
|
168
171
|
"description": "表单值变更事件",
|
|
169
172
|
"detail": {
|
|
170
|
-
"description":
|
|
173
|
+
"description": "当前所有表单字段的值",
|
|
171
174
|
"type": "Record<string, unknown>"
|
|
172
175
|
}
|
|
173
176
|
},
|
|
@@ -175,6 +178,7 @@
|
|
|
175
178
|
"name": "validate.success",
|
|
176
179
|
"description": "表单验证成功时触发事件",
|
|
177
180
|
"detail": {
|
|
181
|
+
"description": "表单所有字段的值,包含合并后的 staticValues",
|
|
178
182
|
"type": "Record<string, unknown>"
|
|
179
183
|
}
|
|
180
184
|
},
|
|
@@ -182,6 +186,7 @@
|
|
|
182
186
|
"name": "validate.error",
|
|
183
187
|
"description": "表单验证报错时触发事件",
|
|
184
188
|
"detail": {
|
|
189
|
+
"description": "校验失败的字段信息列表,每项包含 name(字段名)及错误消息",
|
|
185
190
|
"type": "(MessageBody & { name: string })[]"
|
|
186
191
|
}
|
|
187
192
|
}
|
|
@@ -206,54 +211,70 @@
|
|
|
206
211
|
"params": [
|
|
207
212
|
{
|
|
208
213
|
"name": "values",
|
|
214
|
+
"description": "要设置的表单字段值",
|
|
209
215
|
"type": "Record<string, unknown>"
|
|
210
216
|
},
|
|
211
217
|
{
|
|
212
218
|
"name": "options",
|
|
219
|
+
"description": "可选配置,支持 runInMicrotask(微任务中执行)和 runInMacrotask(宏任务中执行)",
|
|
213
220
|
"type": "{ runInMacrotask?: boolean; runInMicrotask?: boolean }"
|
|
214
221
|
}
|
|
215
222
|
],
|
|
216
223
|
"description": "表单设置值方法",
|
|
217
|
-
"returns": {
|
|
224
|
+
"returns": {
|
|
225
|
+
"type": "void"
|
|
226
|
+
}
|
|
218
227
|
},
|
|
219
228
|
{
|
|
220
229
|
"name": "resetFields",
|
|
221
230
|
"params": [
|
|
222
231
|
{
|
|
223
232
|
"name": "name",
|
|
233
|
+
"description": "要重置的字段名,不传则重置所有字段",
|
|
224
234
|
"type": "string"
|
|
225
235
|
}
|
|
226
236
|
],
|
|
227
237
|
"description": "表单重置值方法",
|
|
228
|
-
"returns": {
|
|
238
|
+
"returns": {
|
|
239
|
+
"type": "void"
|
|
240
|
+
}
|
|
229
241
|
},
|
|
230
242
|
{
|
|
231
243
|
"name": "getFieldsValue",
|
|
232
244
|
"params": [
|
|
233
245
|
{
|
|
234
246
|
"name": "name",
|
|
247
|
+
"description": "要获取的字段名,不传则获取所有字段的值",
|
|
235
248
|
"type": "string"
|
|
236
249
|
}
|
|
237
250
|
],
|
|
238
251
|
"description": "获取表单值方法",
|
|
239
|
-
"returns": {
|
|
252
|
+
"returns": {
|
|
253
|
+
"description": "指定字段的值,或所有字段值的对象",
|
|
254
|
+
"type": "Record<string, unknown> | unknown"
|
|
255
|
+
}
|
|
240
256
|
},
|
|
241
257
|
{
|
|
242
258
|
"name": "validateField",
|
|
243
259
|
"params": [
|
|
244
260
|
{
|
|
245
261
|
"name": "name",
|
|
262
|
+
"description": "要校验的字段名",
|
|
246
263
|
"type": "string"
|
|
247
264
|
}
|
|
248
265
|
],
|
|
249
266
|
"description": "校验表单字段方法",
|
|
250
|
-
"returns": {
|
|
267
|
+
"returns": {
|
|
268
|
+
"type": "void"
|
|
269
|
+
}
|
|
251
270
|
},
|
|
252
271
|
{
|
|
253
272
|
"name": "resetValidateState",
|
|
254
273
|
"params": [],
|
|
255
274
|
"description": "重置表单校验状态方法",
|
|
256
|
-
"returns": {
|
|
275
|
+
"returns": {
|
|
276
|
+
"type": "void"
|
|
277
|
+
}
|
|
257
278
|
}
|
|
258
279
|
],
|
|
259
280
|
"parts": [],
|
|
@@ -268,7 +289,7 @@
|
|
|
268
289
|
"properties": [
|
|
269
290
|
{
|
|
270
291
|
"name": "name",
|
|
271
|
-
"description": "
|
|
292
|
+
"description": "字段名称",
|
|
272
293
|
"type": "string"
|
|
273
294
|
},
|
|
274
295
|
{
|
|
@@ -285,7 +306,7 @@
|
|
|
285
306
|
},
|
|
286
307
|
{
|
|
287
308
|
"name": "value",
|
|
288
|
-
"description": "
|
|
309
|
+
"description": "单选框当前选中值",
|
|
289
310
|
"attribute": false,
|
|
290
311
|
"type": "any"
|
|
291
312
|
},
|
|
@@ -346,6 +367,7 @@
|
|
|
346
367
|
"name": "change",
|
|
347
368
|
"description": "值变化事件",
|
|
348
369
|
"detail": {
|
|
370
|
+
"description": "`GeneralComplexOption | undefined` — 当前选中项的完整选项对象",
|
|
349
371
|
"type": "GeneralComplexOption | undefined"
|
|
350
372
|
}
|
|
351
373
|
},
|
|
@@ -353,6 +375,7 @@
|
|
|
353
375
|
"name": "options.change",
|
|
354
376
|
"description": "选项列表变化事件",
|
|
355
377
|
"detail": {
|
|
378
|
+
"description": "`{ options: { label: string; value: any; [key: string]: any }; name: string }` — 最新的选项列表及字段名",
|
|
356
379
|
"type": "{\n options: {\n label: string;\n value: any;\n [key: string]: any;\n };\n name: string;\n }"
|
|
357
380
|
}
|
|
358
381
|
}
|
|
@@ -436,7 +459,7 @@
|
|
|
436
459
|
},
|
|
437
460
|
{
|
|
438
461
|
"name": "suffix",
|
|
439
|
-
"description": "",
|
|
462
|
+
"description": "后缀内容,使用 useBrick 在选项及选中值旁显示额外信息",
|
|
440
463
|
"attribute": false,
|
|
441
464
|
"type": "{ useBrick: UseSingleBrickConf }"
|
|
442
465
|
},
|
|
@@ -491,6 +514,7 @@
|
|
|
491
514
|
"name": "change",
|
|
492
515
|
"description": "下拉选择事件",
|
|
493
516
|
"detail": {
|
|
517
|
+
"description": "`{ value: string | string[]; options: GeneralComplexOption[] }` — 选中的值及对应选项列表",
|
|
494
518
|
"type": "ChangeEventDetail"
|
|
495
519
|
}
|
|
496
520
|
},
|
|
@@ -506,6 +530,7 @@
|
|
|
506
530
|
"name": "search",
|
|
507
531
|
"description": "下拉框search事件",
|
|
508
532
|
"detail": {
|
|
533
|
+
"description": "`{ value: string }` — 当前输入的搜索词",
|
|
509
534
|
"type": "SearchEventDetail"
|
|
510
535
|
}
|
|
511
536
|
},
|
|
@@ -520,6 +545,7 @@
|
|
|
520
545
|
"name": "options.change",
|
|
521
546
|
"description": "选项列表变化事件",
|
|
522
547
|
"detail": {
|
|
548
|
+
"description": "`{ options: { label: string; value: any; [key: string]: any }; name: string }` — 最新的选项列表及字段名",
|
|
523
549
|
"type": "OptionsChangeEventDetail"
|
|
524
550
|
}
|
|
525
551
|
}
|
|
@@ -638,7 +664,7 @@
|
|
|
638
664
|
},
|
|
639
665
|
{
|
|
640
666
|
"name": "isCustom",
|
|
641
|
-
"description": "
|
|
667
|
+
"description": "是否为自定义样式,仅在 type=\"icon\" 时生效,启用后图标尺寸更大(52px)",
|
|
642
668
|
"default": "false",
|
|
643
669
|
"type": "boolean"
|
|
644
670
|
},
|
|
@@ -655,7 +681,7 @@
|
|
|
655
681
|
},
|
|
656
682
|
{
|
|
657
683
|
"name": "isGroup",
|
|
658
|
-
"description": "
|
|
684
|
+
"description": "是否启用分组模式,为 true 时,则可设置分组数据 optionGroups",
|
|
659
685
|
"type": "boolean"
|
|
660
686
|
},
|
|
661
687
|
{
|
|
@@ -673,15 +699,17 @@
|
|
|
673
699
|
"events": [
|
|
674
700
|
{
|
|
675
701
|
"name": "change",
|
|
676
|
-
"description": "
|
|
702
|
+
"description": "复选框选中项发生变化时触发",
|
|
677
703
|
"detail": {
|
|
704
|
+
"description": "{ value: 选中项的值, label: 选中项的标签, disabled: 是否禁用, checkboxColor: 复选框颜色 }[]",
|
|
678
705
|
"type": "CheckboxOptionType[]"
|
|
679
706
|
}
|
|
680
707
|
},
|
|
681
708
|
{
|
|
682
709
|
"name": "options.change",
|
|
683
|
-
"description": "
|
|
710
|
+
"description": "复选框选项数据变化时触发",
|
|
684
711
|
"detail": {
|
|
712
|
+
"description": "{ options: 最新的选项列表, name: 字段名称 }",
|
|
685
713
|
"type": "OptionsChangeEventDetail"
|
|
686
714
|
}
|
|
687
715
|
}
|
|
@@ -759,21 +787,25 @@
|
|
|
759
787
|
"events": [
|
|
760
788
|
{
|
|
761
789
|
"name": "change",
|
|
790
|
+
"description": "表单值改变时触发",
|
|
762
791
|
"detail": {
|
|
792
|
+
"description": "整个动态表单当前所有行的值列表",
|
|
763
793
|
"type": "DynamicFormValuesItem[]"
|
|
764
794
|
}
|
|
765
795
|
},
|
|
766
796
|
{
|
|
767
797
|
"name": "row.add",
|
|
768
|
-
"description": "
|
|
798
|
+
"description": "增加一行时触发",
|
|
769
799
|
"detail": {
|
|
800
|
+
"description": "{ detail: 该行的默认值, index: 该行的位置 }",
|
|
770
801
|
"type": "rowDataType"
|
|
771
802
|
}
|
|
772
803
|
},
|
|
773
804
|
{
|
|
774
805
|
"name": "row.remove",
|
|
775
|
-
"description": "
|
|
806
|
+
"description": "移除一行时触发",
|
|
776
807
|
"detail": {
|
|
808
|
+
"description": "{ detail: 该行的值, index: 该行的位置 }",
|
|
777
809
|
"type": "rowDataType"
|
|
778
810
|
}
|
|
779
811
|
}
|
|
@@ -837,15 +869,17 @@
|
|
|
837
869
|
"events": [
|
|
838
870
|
{
|
|
839
871
|
"name": "change",
|
|
840
|
-
"description": "
|
|
872
|
+
"description": "",
|
|
841
873
|
"detail": {
|
|
874
|
+
"description": "当前输入值",
|
|
842
875
|
"type": "string"
|
|
843
876
|
}
|
|
844
877
|
},
|
|
845
878
|
{
|
|
846
879
|
"name": "search",
|
|
847
|
-
"description": "
|
|
880
|
+
"description": "",
|
|
848
881
|
"detail": {
|
|
882
|
+
"description": "搜索关键词",
|
|
849
883
|
"type": "string"
|
|
850
884
|
}
|
|
851
885
|
}
|
|
@@ -890,7 +924,7 @@
|
|
|
890
924
|
},
|
|
891
925
|
{
|
|
892
926
|
"name": "message",
|
|
893
|
-
"description": "
|
|
927
|
+
"description": "校验错误提示信息",
|
|
894
928
|
"attribute": false,
|
|
895
929
|
"type": "Record<string, string>"
|
|
896
930
|
},
|
|
@@ -905,6 +939,7 @@
|
|
|
905
939
|
"name": "change",
|
|
906
940
|
"description": "值变化时触发",
|
|
907
941
|
"detail": {
|
|
942
|
+
"description": "`Icon | undefined` — { lib: 图标库, icon: 图标名称, category: 图标分类, color: 图标颜色 } | undefined",
|
|
908
943
|
"type": "Icon | undefined"
|
|
909
944
|
}
|
|
910
945
|
}
|
|
@@ -982,8 +1017,9 @@
|
|
|
982
1017
|
"events": [
|
|
983
1018
|
{
|
|
984
1019
|
"name": "change",
|
|
985
|
-
"description": "
|
|
1020
|
+
"description": "",
|
|
986
1021
|
"detail": {
|
|
1022
|
+
"description": "{ uid: 文件唯一标识, name: 文件名, url: 图片地址, file: 原始 File 对象, response: 上传响应内容, status: 上传状态(uploading | done | error), errors: 错误信息列表 }[]",
|
|
987
1023
|
"type": "ImageData[]"
|
|
988
1024
|
}
|
|
989
1025
|
}
|
|
@@ -1043,7 +1079,7 @@
|
|
|
1043
1079
|
},
|
|
1044
1080
|
{
|
|
1045
1081
|
"name": "unCheckedIcon",
|
|
1046
|
-
"description": "
|
|
1082
|
+
"description": "非选中时的图标",
|
|
1047
1083
|
"attribute": false,
|
|
1048
1084
|
"type": "GeneralIconProps"
|
|
1049
1085
|
},
|
|
@@ -1058,6 +1094,7 @@
|
|
|
1058
1094
|
"name": "switch",
|
|
1059
1095
|
"description": "开关改变时触发",
|
|
1060
1096
|
"detail": {
|
|
1097
|
+
"description": "`boolean` — 开关当前状态,true 表示开启,false 表示关闭",
|
|
1061
1098
|
"type": "boolean"
|
|
1062
1099
|
}
|
|
1063
1100
|
}
|
|
@@ -1131,7 +1168,7 @@
|
|
|
1131
1168
|
},
|
|
1132
1169
|
{
|
|
1133
1170
|
"name": "buttonIcon",
|
|
1134
|
-
"description": "
|
|
1171
|
+
"description": "上传按钮图标",
|
|
1135
1172
|
"default": "{\n lib: \"antd\",\n icon: \"upload\",\n theme: \"outlined\",\n }",
|
|
1136
1173
|
"attribute": false,
|
|
1137
1174
|
"type": "GeneralIconProps"
|
|
@@ -1184,8 +1221,9 @@
|
|
|
1184
1221
|
"events": [
|
|
1185
1222
|
{
|
|
1186
1223
|
"name": "change",
|
|
1187
|
-
"description": "
|
|
1224
|
+
"description": "",
|
|
1188
1225
|
"detail": {
|
|
1226
|
+
"description": "{ uid: 文件唯一标识, name: 文件名, file: 原始 File 对象, response: 上传响应内容, status: 上传状态(uploading | done | error), errors: 错误信息列表 }[]",
|
|
1189
1227
|
"type": "FileData[]"
|
|
1190
1228
|
}
|
|
1191
1229
|
}
|
|
@@ -1232,6 +1270,7 @@
|
|
|
1232
1270
|
},
|
|
1233
1271
|
{
|
|
1234
1272
|
"name": "value",
|
|
1273
|
+
"description": "输入框当前值",
|
|
1235
1274
|
"type": "string"
|
|
1236
1275
|
},
|
|
1237
1276
|
{
|
|
@@ -1267,13 +1306,19 @@
|
|
|
1267
1306
|
"events": [
|
|
1268
1307
|
{
|
|
1269
1308
|
"name": "change",
|
|
1270
|
-
"description": "
|
|
1309
|
+
"description": "",
|
|
1271
1310
|
"detail": {
|
|
1311
|
+
"description": "当前输入框的值",
|
|
1272
1312
|
"type": "string"
|
|
1273
1313
|
}
|
|
1274
1314
|
}
|
|
1275
1315
|
],
|
|
1276
|
-
"slots": [
|
|
1316
|
+
"slots": [
|
|
1317
|
+
{
|
|
1318
|
+
"name": "options-toolbar",
|
|
1319
|
+
"description": "下拉列表底部工具栏"
|
|
1320
|
+
}
|
|
1321
|
+
],
|
|
1277
1322
|
"methods": [],
|
|
1278
1323
|
"parts": [],
|
|
1279
1324
|
"description": "带候选项的输入框",
|
|
@@ -1328,22 +1373,25 @@
|
|
|
1328
1373
|
"events": [
|
|
1329
1374
|
{
|
|
1330
1375
|
"name": "change",
|
|
1331
|
-
"description": "
|
|
1376
|
+
"description": "",
|
|
1332
1377
|
"detail": {
|
|
1378
|
+
"description": "格式化后的时间字符串",
|
|
1333
1379
|
"type": "string"
|
|
1334
1380
|
}
|
|
1335
1381
|
},
|
|
1336
1382
|
{
|
|
1337
1383
|
"name": "open",
|
|
1338
|
-
"description": "
|
|
1384
|
+
"description": "",
|
|
1339
1385
|
"detail": {
|
|
1386
|
+
"description": "面板打开时的当前时间值字符串",
|
|
1340
1387
|
"type": "string"
|
|
1341
1388
|
}
|
|
1342
1389
|
},
|
|
1343
1390
|
{
|
|
1344
1391
|
"name": "close",
|
|
1345
|
-
"description": "
|
|
1392
|
+
"description": "",
|
|
1346
1393
|
"detail": {
|
|
1394
|
+
"description": "面板关闭时的当前时间值字符串",
|
|
1347
1395
|
"type": "string"
|
|
1348
1396
|
}
|
|
1349
1397
|
}
|
|
@@ -1435,15 +1483,17 @@
|
|
|
1435
1483
|
"events": [
|
|
1436
1484
|
{
|
|
1437
1485
|
"name": "change",
|
|
1438
|
-
"description": "
|
|
1486
|
+
"description": "",
|
|
1439
1487
|
"detail": {
|
|
1488
|
+
"description": "格式化后的日期字符串",
|
|
1440
1489
|
"type": "string"
|
|
1441
1490
|
}
|
|
1442
1491
|
},
|
|
1443
1492
|
{
|
|
1444
1493
|
"name": "ok",
|
|
1445
|
-
"description": "
|
|
1494
|
+
"description": "",
|
|
1446
1495
|
"detail": {
|
|
1496
|
+
"description": "格式化后的日期字符串",
|
|
1447
1497
|
"type": "string"
|
|
1448
1498
|
}
|
|
1449
1499
|
}
|
|
@@ -1504,19 +1554,20 @@
|
|
|
1504
1554
|
},
|
|
1505
1555
|
{
|
|
1506
1556
|
"name": "emitChangeOnInit",
|
|
1507
|
-
"description": "",
|
|
1508
|
-
"default": "true
|
|
1557
|
+
"description": "是否在初始化完成后额外触发一次 change 事件。因历史原因,默认行为就是在初始化后触发该事件,为了兼容之前的行为,默认值只能设置为 true。",
|
|
1558
|
+
"default": "true",
|
|
1509
1559
|
"type": "boolean"
|
|
1510
1560
|
},
|
|
1511
1561
|
{
|
|
1512
1562
|
"name": "presetRanges",
|
|
1513
|
-
"description": "",
|
|
1514
|
-
"default": "[]
|
|
1563
|
+
"description": "预设时间范围快捷选择。设置了 selectNearDays 时,presetRanges 不生效;rangeType 为 week 时只能选本周、本月、本季度、今年,rangeType 为 month、quarter、year 时以此类推。",
|
|
1564
|
+
"default": "[]",
|
|
1515
1565
|
"attribute": false,
|
|
1516
1566
|
"type": "presetRangeType[]"
|
|
1517
1567
|
},
|
|
1518
1568
|
{
|
|
1519
1569
|
"name": "validator",
|
|
1570
|
+
"description": "自定义校验函数,返回错误信息字符串或 MessageBody 对象,返回空字符串表示校验通过。",
|
|
1520
1571
|
"attribute": false,
|
|
1521
1572
|
"type": "((value: any) => MessageBody | string)"
|
|
1522
1573
|
}
|
|
@@ -1524,8 +1575,9 @@
|
|
|
1524
1575
|
"events": [
|
|
1525
1576
|
{
|
|
1526
1577
|
"name": "change",
|
|
1527
|
-
"description": "
|
|
1578
|
+
"description": "",
|
|
1528
1579
|
"detail": {
|
|
1580
|
+
"description": "{ startTime: 开始时间字符串, endTime: 结束时间字符串 }",
|
|
1529
1581
|
"type": "TimeRange"
|
|
1530
1582
|
}
|
|
1531
1583
|
}
|
|
@@ -1605,6 +1657,7 @@
|
|
|
1605
1657
|
"name": "change",
|
|
1606
1658
|
"description": "颜色变化事件, 返回值格式和`format`格式一致",
|
|
1607
1659
|
"detail": {
|
|
1660
|
+
"description": "选中的颜色值,格式由 format 属性决定(hex/rgb/hsb),清除时为 undefined",
|
|
1608
1661
|
"type": "string | undefined"
|
|
1609
1662
|
}
|
|
1610
1663
|
}
|
|
@@ -1612,7 +1665,8 @@
|
|
|
1612
1665
|
"slots": [],
|
|
1613
1666
|
"methods": [],
|
|
1614
1667
|
"parts": [],
|
|
1615
|
-
"description": "
|
|
1668
|
+
"description": "颜色选择器",
|
|
1669
|
+
"category": "form-input-basic"
|
|
1616
1670
|
},
|
|
1617
1671
|
{
|
|
1618
1672
|
"name": "eo-form-item",
|
|
@@ -1637,27 +1691,33 @@
|
|
|
1637
1691
|
},
|
|
1638
1692
|
{
|
|
1639
1693
|
"name": "label",
|
|
1694
|
+
"description": "标签文字",
|
|
1640
1695
|
"type": "string"
|
|
1641
1696
|
},
|
|
1642
1697
|
{
|
|
1643
1698
|
"name": "pattern",
|
|
1699
|
+
"description": "正则校验规则",
|
|
1644
1700
|
"type": "string"
|
|
1645
1701
|
},
|
|
1646
1702
|
{
|
|
1647
1703
|
"name": "message",
|
|
1704
|
+
"description": "校验失败时的提示信息",
|
|
1648
1705
|
"attribute": false,
|
|
1649
1706
|
"type": "Record<string, string>"
|
|
1650
1707
|
},
|
|
1651
1708
|
{
|
|
1652
1709
|
"name": "type",
|
|
1710
|
+
"description": "校验类型",
|
|
1653
1711
|
"type": "string"
|
|
1654
1712
|
},
|
|
1655
1713
|
{
|
|
1656
1714
|
"name": "max",
|
|
1715
|
+
"description": "表单校验最大值(当 type 为 number 时表示最大数值,否则表示最大长度)",
|
|
1657
1716
|
"type": "number"
|
|
1658
1717
|
},
|
|
1659
1718
|
{
|
|
1660
1719
|
"name": "min",
|
|
1720
|
+
"description": "表单校验最小值(当 type 为 number 时表示最小数值,否则表示最小长度)",
|
|
1661
1721
|
"type": "number"
|
|
1662
1722
|
},
|
|
1663
1723
|
{
|
|
@@ -1672,14 +1732,18 @@
|
|
|
1672
1732
|
},
|
|
1673
1733
|
{
|
|
1674
1734
|
"name": "valuePropsName",
|
|
1735
|
+
"description": "子构件中对应值的属性名",
|
|
1736
|
+
"default": "\"value\"",
|
|
1675
1737
|
"type": "string"
|
|
1676
1738
|
},
|
|
1677
1739
|
{
|
|
1678
1740
|
"name": "layout",
|
|
1741
|
+
"description": "布局方式",
|
|
1679
1742
|
"type": "Layout"
|
|
1680
1743
|
},
|
|
1681
1744
|
{
|
|
1682
1745
|
"name": "size",
|
|
1746
|
+
"description": "尺寸",
|
|
1683
1747
|
"type": "ComponentSize"
|
|
1684
1748
|
},
|
|
1685
1749
|
{
|
|
@@ -1690,6 +1754,7 @@
|
|
|
1690
1754
|
{
|
|
1691
1755
|
"name": "trigger",
|
|
1692
1756
|
"description": "事件触发方法名",
|
|
1757
|
+
"default": "\"onChange\"",
|
|
1693
1758
|
"type": "string"
|
|
1694
1759
|
},
|
|
1695
1760
|
{
|
|
@@ -1700,7 +1765,7 @@
|
|
|
1700
1765
|
},
|
|
1701
1766
|
{
|
|
1702
1767
|
"name": "needValidate",
|
|
1703
|
-
"description": "
|
|
1768
|
+
"description": "值变化时是否主动触发校验",
|
|
1704
1769
|
"type": "boolean"
|
|
1705
1770
|
},
|
|
1706
1771
|
{
|
|
@@ -1718,7 +1783,7 @@
|
|
|
1718
1783
|
],
|
|
1719
1784
|
"methods": [],
|
|
1720
1785
|
"parts": [],
|
|
1721
|
-
"description": "
|
|
1786
|
+
"description": "表单项构件",
|
|
1722
1787
|
"category": "form-input-basic",
|
|
1723
1788
|
"insider": true
|
|
1724
1789
|
},
|
|
@@ -1837,8 +1902,9 @@
|
|
|
1837
1902
|
"events": [
|
|
1838
1903
|
{
|
|
1839
1904
|
"name": "change",
|
|
1840
|
-
"description": "
|
|
1905
|
+
"description": "",
|
|
1841
1906
|
"detail": {
|
|
1907
|
+
"description": "当前输入值",
|
|
1842
1908
|
"type": "string"
|
|
1843
1909
|
}
|
|
1844
1910
|
}
|
|
@@ -1865,13 +1931,13 @@
|
|
|
1865
1931
|
{
|
|
1866
1932
|
"name": "focusInput",
|
|
1867
1933
|
"params": [],
|
|
1868
|
-
"description": "
|
|
1934
|
+
"description": "使输入框获得焦点",
|
|
1869
1935
|
"returns": {}
|
|
1870
1936
|
},
|
|
1871
1937
|
{
|
|
1872
1938
|
"name": "blurInput",
|
|
1873
1939
|
"params": [],
|
|
1874
|
-
"description": "
|
|
1940
|
+
"description": "使输入框失去焦点",
|
|
1875
1941
|
"returns": {}
|
|
1876
1942
|
}
|
|
1877
1943
|
],
|
package/dist/types.json
CHANGED
|
@@ -1788,7 +1788,12 @@
|
|
|
1788
1788
|
}
|
|
1789
1789
|
}
|
|
1790
1790
|
],
|
|
1791
|
-
"returns": {
|
|
1791
|
+
"returns": {
|
|
1792
|
+
"annotation": {
|
|
1793
|
+
"type": "keyword",
|
|
1794
|
+
"value": "void"
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1792
1797
|
},
|
|
1793
1798
|
{
|
|
1794
1799
|
"name": "resetFields",
|
|
@@ -1801,7 +1806,12 @@
|
|
|
1801
1806
|
}
|
|
1802
1807
|
}
|
|
1803
1808
|
],
|
|
1804
|
-
"returns": {
|
|
1809
|
+
"returns": {
|
|
1810
|
+
"annotation": {
|
|
1811
|
+
"type": "keyword",
|
|
1812
|
+
"value": "void"
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1805
1815
|
},
|
|
1806
1816
|
{
|
|
1807
1817
|
"name": "getFieldsValue",
|
|
@@ -1814,7 +1824,37 @@
|
|
|
1814
1824
|
}
|
|
1815
1825
|
}
|
|
1816
1826
|
],
|
|
1817
|
-
"returns": {
|
|
1827
|
+
"returns": {
|
|
1828
|
+
"annotation": {
|
|
1829
|
+
"type": "union",
|
|
1830
|
+
"types": [
|
|
1831
|
+
{
|
|
1832
|
+
"type": "reference",
|
|
1833
|
+
"typeName": {
|
|
1834
|
+
"type": "identifier",
|
|
1835
|
+
"name": "Record"
|
|
1836
|
+
},
|
|
1837
|
+
"typeParameters": {
|
|
1838
|
+
"type": "typeParameterInstantiation",
|
|
1839
|
+
"params": [
|
|
1840
|
+
{
|
|
1841
|
+
"type": "keyword",
|
|
1842
|
+
"value": "string"
|
|
1843
|
+
},
|
|
1844
|
+
{
|
|
1845
|
+
"type": "keyword",
|
|
1846
|
+
"value": "unknown"
|
|
1847
|
+
}
|
|
1848
|
+
]
|
|
1849
|
+
}
|
|
1850
|
+
},
|
|
1851
|
+
{
|
|
1852
|
+
"type": "keyword",
|
|
1853
|
+
"value": "unknown"
|
|
1854
|
+
}
|
|
1855
|
+
]
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1818
1858
|
},
|
|
1819
1859
|
{
|
|
1820
1860
|
"name": "validateField",
|
|
@@ -1827,12 +1867,22 @@
|
|
|
1827
1867
|
}
|
|
1828
1868
|
}
|
|
1829
1869
|
],
|
|
1830
|
-
"returns": {
|
|
1870
|
+
"returns": {
|
|
1871
|
+
"annotation": {
|
|
1872
|
+
"type": "keyword",
|
|
1873
|
+
"value": "void"
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1831
1876
|
},
|
|
1832
1877
|
{
|
|
1833
1878
|
"name": "resetValidateState",
|
|
1834
1879
|
"params": [],
|
|
1835
|
-
"returns": {
|
|
1880
|
+
"returns": {
|
|
1881
|
+
"annotation": {
|
|
1882
|
+
"type": "keyword",
|
|
1883
|
+
"value": "void"
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1836
1886
|
}
|
|
1837
1887
|
],
|
|
1838
1888
|
"types": [
|
|
@@ -34,6 +34,7 @@ export type OptionType = Option | OptionGroup;
|
|
|
34
34
|
* @author zhendonghuang
|
|
35
35
|
*
|
|
36
36
|
* @category form-input-basic
|
|
37
|
+
* @slot options-toolbar - 下拉列表底部工具栏
|
|
37
38
|
*/
|
|
38
39
|
export declare class AutoComplete extends FormItemElementBase {
|
|
39
40
|
#private;
|
|
@@ -61,6 +62,9 @@ export declare class AutoComplete extends FormItemElementBase {
|
|
|
61
62
|
* 是否必填
|
|
62
63
|
*/
|
|
63
64
|
accessor required: boolean | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* 输入框当前值
|
|
67
|
+
*/
|
|
64
68
|
accessor value: string | undefined;
|
|
65
69
|
/**
|
|
66
70
|
* 选项列表
|