@next-bricks/form 1.11.3 → 1.11.4

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.
@@ -189,11 +189,21 @@
189
189
  "category": "form-input-basic"
190
190
  },
191
191
  {
192
- "name": "eo-textarea",
192
+ "name": "eo-form-item",
193
193
  "alias": [
194
- "form.general-textarea"
194
+ "form.general-form-item"
195
195
  ],
196
196
  "properties": [
197
+ {
198
+ "name": "formElement",
199
+ "attribute": false,
200
+ "type": "Form"
201
+ },
202
+ {
203
+ "name": "curElement",
204
+ "attribute": false,
205
+ "type": "HTMLElement"
206
+ },
197
207
  {
198
208
  "name": "name",
199
209
  "description": "字段名称",
@@ -201,218 +211,81 @@
201
211
  },
202
212
  {
203
213
  "name": "label",
204
- "description": "标签文字",
205
- "type": "string"
206
- },
207
- {
208
- "name": "value",
209
- "description": "值",
210
214
  "type": "string"
211
215
  },
212
216
  {
213
- "name": "placeholder",
214
- "description": "占位说明",
217
+ "name": "pattern",
215
218
  "type": "string"
216
219
  },
217
220
  {
218
- "name": "disabled",
219
- "description": "是否禁用",
220
- "type": "boolean"
221
+ "name": "message",
222
+ "attribute": false,
223
+ "type": "Record<string, string>"
221
224
  },
222
225
  {
223
- "name": "minLength",
224
- "description": "最小长度",
226
+ "name": "max",
225
227
  "type": "number"
226
228
  },
227
229
  {
228
- "name": "maxLength",
229
- "description": "最大长度",
230
+ "name": "min",
230
231
  "type": "number"
231
232
  },
232
- {
233
- "name": "autoSize",
234
- "description": "大小自适应",
235
- "attribute": false,
236
- "type": "AutoSize"
237
- },
238
233
  {
239
234
  "name": "required",
240
- "description": "是否必填",
235
+ "description": "表单项是否为必填",
241
236
  "type": "boolean"
242
237
  },
243
238
  {
244
- "name": "max",
245
- "description": "表单校验最大长度",
246
- "type": "number"
247
- },
248
- {
249
- "name": "min",
250
- "description": "表单校验最小长度",
251
- "type": "number"
239
+ "name": "value",
240
+ "description": "初始值",
241
+ "type": "string"
252
242
  },
253
243
  {
254
- "name": "message",
255
- "description": "校验信息",
256
- "attribute": false,
257
- "type": "Record<string, string>"
244
+ "name": "valuePropsName",
245
+ "type": "string"
258
246
  },
259
- {
260
- "name": "textareaStyle",
261
- "description": "自定义样式",
262
- "attribute": false,
263
- "type": "React.CSSProperties"
264
- }
265
- ],
266
- "events": [
267
- {
268
- "name": "change",
269
- "description": "",
270
- "detail": {
271
- "description": null,
272
- "type": "string"
273
- }
274
- }
275
- ],
276
- "slots": [],
277
- "methods": [],
278
- "parts": [],
279
- "description": "通用多行文本输入框构件",
280
- "category": "form-input-basic"
281
- },
282
- {
283
- "name": "eo-form",
284
- "alias": [
285
- "form.general-form"
286
- ],
287
- "properties": [
288
247
  {
289
248
  "name": "layout",
290
- "description": "布局方式(默认 vertical 布局)",
291
- "default": "vertical",
292
249
  "type": "Layout"
293
250
  },
294
251
  {
295
252
  "name": "size",
296
- "description": "表单组件尺寸",
297
253
  "type": "ComponentSize"
298
254
  },
299
255
  {
300
- "name": "labelCol",
301
- "description": "标签列布局样式(仅当 layout=\"horizontal\" 时有效)",
302
- "default": "{\n sm: {\n span: 24,\n },\n md: {\n span: 24,\n },\n lg: {\n span: 7,\n },\n xl: {\n span: 5,\n },\n xxl: {\n span: 4,\n },\n }",
303
- "attribute": false,
304
- "type": "ColProps"
256
+ "name": "trim",
257
+ "description": "是否自动去除前后的空白字符",
258
+ "default": "true"
305
259
  },
306
260
  {
307
- "name": "wrapperCol",
308
- "description": "输入控件列布局样式(仅当 layout=\"horizontal\" 时有效)",
309
- "default": "{\n sm: {\n span: 18,\n },\n md: {\n span: 18,\n },\n lg: {\n span: 13,\n },\n xl: {\n span: 16,\n },\n xxl: {\n span: 18,\n },\n }",
310
- "attribute": false,
311
- "type": "ColProps"
261
+ "name": "trigger",
262
+ "description": "事件触发方法名",
263
+ "type": "string"
312
264
  },
313
265
  {
314
- "name": "formStyle",
266
+ "name": "validator",
267
+ "description": "表单项校验方法",
315
268
  "attribute": false,
316
- "type": "React.CSSProperties"
317
- }
318
- ],
319
- "events": [
320
- {
321
- "name": "values.change",
322
- "description": "表单值变更事件",
323
- "detail": {
324
- "description": null,
325
- "type": "Record<string, unknown>"
326
- }
327
- },
328
- {
329
- "name": "validate.success",
330
- "description": "表单验证成功时触发事件",
331
- "detail": {
332
- "type": "Record<string, unknown>"
333
- }
269
+ "type": "((value: any) => MessageBody)"
334
270
  },
335
271
  {
336
- "name": "validate.error",
337
- "description": "表单验证报错时触发事件",
338
- "detail": {
339
- "type": "(MessageBody & { name: string })[]"
340
- }
272
+ "name": "needValidate",
273
+ "description": "值变化时是否主动出发校验",
274
+ "type": "boolean"
341
275
  }
342
276
  ],
277
+ "events": [],
343
278
  "slots": [
344
279
  {
345
280
  "name": null,
346
- "description": "表单内容"
347
- }
348
- ],
349
- "methods": [
350
- {
351
- "name": "validate",
352
- "params": [],
353
- "description": "表单校验方法",
354
- "returns": {
355
- "type": "boolean | Record<string, unknown>"
356
- }
357
- },
358
- {
359
- "name": "setInitValue",
360
- "params": [
361
- {
362
- "name": "values",
363
- "type": "Record<string, unknown>"
364
- },
365
- {
366
- "name": "options",
367
- "type": "{ runInMacrotask?: boolean; runInMicrotask?: boolean }"
368
- }
369
- ],
370
- "description": "表单设置值方法",
371
- "returns": {}
372
- },
373
- {
374
- "name": "resetFields",
375
- "params": [
376
- {
377
- "name": "name",
378
- "type": "string"
379
- }
380
- ],
381
- "description": "表单重置值方法",
382
- "returns": {}
383
- },
384
- {
385
- "name": "getFieldsValue",
386
- "params": [
387
- {
388
- "name": "name",
389
- "type": "string"
390
- }
391
- ],
392
- "description": "获取表单值方法",
393
- "returns": {}
394
- },
395
- {
396
- "name": "validateField",
397
- "params": [
398
- {
399
- "name": "name",
400
- "type": "string"
401
- }
402
- ],
403
- "description": "校验表单字段方法",
404
- "returns": {}
405
- },
406
- {
407
- "name": "resetValidateState",
408
- "params": [],
409
- "description": "重置表单校验状态方法",
410
- "returns": {}
281
+ "description": "表单项内容"
411
282
  }
412
283
  ],
284
+ "methods": [],
413
285
  "parts": [],
414
- "description": "表单构件",
415
- "category": "form-input-basic"
286
+ "description": "通用输入框构件",
287
+ "category": "form-input-basic",
288
+ "insider": true
416
289
  },
417
290
  {
418
291
  "name": "eo-radio",
@@ -512,6 +385,97 @@
512
385
  "description": "通用单选构件",
513
386
  "category": "form-input-basic"
514
387
  },
388
+ {
389
+ "name": "eo-textarea",
390
+ "alias": [
391
+ "form.general-textarea"
392
+ ],
393
+ "properties": [
394
+ {
395
+ "name": "name",
396
+ "description": "字段名称",
397
+ "type": "string"
398
+ },
399
+ {
400
+ "name": "label",
401
+ "description": "标签文字",
402
+ "type": "string"
403
+ },
404
+ {
405
+ "name": "value",
406
+ "description": "值",
407
+ "type": "string"
408
+ },
409
+ {
410
+ "name": "placeholder",
411
+ "description": "占位说明",
412
+ "type": "string"
413
+ },
414
+ {
415
+ "name": "disabled",
416
+ "description": "是否禁用",
417
+ "type": "boolean"
418
+ },
419
+ {
420
+ "name": "minLength",
421
+ "description": "最小长度",
422
+ "type": "number"
423
+ },
424
+ {
425
+ "name": "maxLength",
426
+ "description": "最大长度",
427
+ "type": "number"
428
+ },
429
+ {
430
+ "name": "autoSize",
431
+ "description": "大小自适应",
432
+ "attribute": false,
433
+ "type": "AutoSize"
434
+ },
435
+ {
436
+ "name": "required",
437
+ "description": "是否必填",
438
+ "type": "boolean"
439
+ },
440
+ {
441
+ "name": "max",
442
+ "description": "表单校验最大长度",
443
+ "type": "number"
444
+ },
445
+ {
446
+ "name": "min",
447
+ "description": "表单校验最小长度",
448
+ "type": "number"
449
+ },
450
+ {
451
+ "name": "message",
452
+ "description": "校验信息",
453
+ "attribute": false,
454
+ "type": "Record<string, string>"
455
+ },
456
+ {
457
+ "name": "textareaStyle",
458
+ "description": "自定义样式",
459
+ "attribute": false,
460
+ "type": "React.CSSProperties"
461
+ }
462
+ ],
463
+ "events": [
464
+ {
465
+ "name": "change",
466
+ "description": "",
467
+ "detail": {
468
+ "description": null,
469
+ "type": "string"
470
+ }
471
+ }
472
+ ],
473
+ "slots": [],
474
+ "methods": [],
475
+ "parts": [],
476
+ "description": "通用多行文本输入框构件",
477
+ "category": "form-input-basic"
478
+ },
515
479
  {
516
480
  "name": "eo-select",
517
481
  "alias": [
@@ -655,103 +619,139 @@
655
619
  "category": "form-input-basic"
656
620
  },
657
621
  {
658
- "name": "eo-form-item",
622
+ "name": "eo-form",
659
623
  "alias": [
660
- "form.general-form-item"
624
+ "form.general-form"
661
625
  ],
662
626
  "properties": [
663
627
  {
664
- "name": "formElement",
665
- "attribute": false,
666
- "type": "Form"
667
- },
668
- {
669
- "name": "curElement",
670
- "attribute": false,
671
- "type": "HTMLElement"
672
- },
673
- {
674
- "name": "name",
675
- "description": "字段名称",
676
- "type": "string"
628
+ "name": "layout",
629
+ "description": "布局方式(默认 vertical 布局)",
630
+ "default": "vertical",
631
+ "type": "Layout"
677
632
  },
678
633
  {
679
- "name": "label",
680
- "type": "string"
634
+ "name": "size",
635
+ "description": "表单组件尺寸",
636
+ "type": "ComponentSize"
681
637
  },
682
638
  {
683
- "name": "pattern",
684
- "type": "string"
639
+ "name": "labelCol",
640
+ "description": "标签列布局样式(仅当 layout=\"horizontal\" 时有效)",
641
+ "default": "{\n sm: {\n span: 24,\n },\n md: {\n span: 24,\n },\n lg: {\n span: 7,\n },\n xl: {\n span: 5,\n },\n xxl: {\n span: 4,\n },\n }",
642
+ "attribute": false,
643
+ "type": "ColProps"
685
644
  },
686
645
  {
687
- "name": "message",
646
+ "name": "wrapperCol",
647
+ "description": "输入控件列布局样式(仅当 layout=\"horizontal\" 时有效)",
648
+ "default": "{\n sm: {\n span: 18,\n },\n md: {\n span: 18,\n },\n lg: {\n span: 13,\n },\n xl: {\n span: 16,\n },\n xxl: {\n span: 18,\n },\n }",
688
649
  "attribute": false,
689
- "type": "Record<string, string>"
650
+ "type": "ColProps"
690
651
  },
691
652
  {
692
- "name": "max",
693
- "type": "number"
694
- },
653
+ "name": "formStyle",
654
+ "attribute": false,
655
+ "type": "React.CSSProperties"
656
+ }
657
+ ],
658
+ "events": [
695
659
  {
696
- "name": "min",
697
- "type": "number"
660
+ "name": "values.change",
661
+ "description": "表单值变更事件",
662
+ "detail": {
663
+ "description": null,
664
+ "type": "Record<string, unknown>"
665
+ }
698
666
  },
699
667
  {
700
- "name": "required",
701
- "description": "表单项是否为必填",
702
- "type": "boolean"
668
+ "name": "validate.success",
669
+ "description": "表单验证成功时触发事件",
670
+ "detail": {
671
+ "type": "Record<string, unknown>"
672
+ }
703
673
  },
704
674
  {
705
- "name": "value",
706
- "description": "初始值",
707
- "type": "string"
708
- },
675
+ "name": "validate.error",
676
+ "description": "表单验证报错时触发事件",
677
+ "detail": {
678
+ "type": "(MessageBody & { name: string })[]"
679
+ }
680
+ }
681
+ ],
682
+ "slots": [
709
683
  {
710
- "name": "valuePropsName",
711
- "type": "string"
712
- },
684
+ "name": null,
685
+ "description": "表单内容"
686
+ }
687
+ ],
688
+ "methods": [
713
689
  {
714
- "name": "layout",
715
- "type": "Layout"
690
+ "name": "validate",
691
+ "params": [],
692
+ "description": "表单校验方法",
693
+ "returns": {
694
+ "type": "boolean | Record<string, unknown>"
695
+ }
716
696
  },
717
697
  {
718
- "name": "size",
719
- "type": "ComponentSize"
698
+ "name": "setInitValue",
699
+ "params": [
700
+ {
701
+ "name": "values",
702
+ "type": "Record<string, unknown>"
703
+ },
704
+ {
705
+ "name": "options",
706
+ "type": "{ runInMacrotask?: boolean; runInMicrotask?: boolean }"
707
+ }
708
+ ],
709
+ "description": "表单设置值方法",
710
+ "returns": {}
720
711
  },
721
712
  {
722
- "name": "trim",
723
- "description": "是否自动去除前后的空白字符",
724
- "default": "true"
713
+ "name": "resetFields",
714
+ "params": [
715
+ {
716
+ "name": "name",
717
+ "type": "string"
718
+ }
719
+ ],
720
+ "description": "表单重置值方法",
721
+ "returns": {}
725
722
  },
726
723
  {
727
- "name": "trigger",
728
- "description": "事件触发方法名",
729
- "type": "string"
724
+ "name": "getFieldsValue",
725
+ "params": [
726
+ {
727
+ "name": "name",
728
+ "type": "string"
729
+ }
730
+ ],
731
+ "description": "获取表单值方法",
732
+ "returns": {}
730
733
  },
731
734
  {
732
- "name": "validator",
733
- "description": "表单项校验方法",
734
- "attribute": false,
735
- "type": "((value: any) => MessageBody)"
735
+ "name": "validateField",
736
+ "params": [
737
+ {
738
+ "name": "name",
739
+ "type": "string"
740
+ }
741
+ ],
742
+ "description": "校验表单字段方法",
743
+ "returns": {}
736
744
  },
737
745
  {
738
- "name": "needValidate",
739
- "description": "值变化时是否主动出发校验",
740
- "type": "boolean"
741
- }
742
- ],
743
- "events": [],
744
- "slots": [
745
- {
746
- "name": null,
747
- "description": "表单项内容"
746
+ "name": "resetValidateState",
747
+ "params": [],
748
+ "description": "重置表单校验状态方法",
749
+ "returns": {}
748
750
  }
749
751
  ],
750
- "methods": [],
751
752
  "parts": [],
752
- "description": "通用输入框构件",
753
- "category": "form-input-basic",
754
- "insider": true
753
+ "description": "表单构件",
754
+ "category": "form-input-basic"
755
755
  },
756
756
  {
757
757
  "name": "eo-submit-buttons",
@@ -905,98 +905,6 @@
905
905
  "description": "表单复选框构件",
906
906
  "category": "form-input-basic"
907
907
  },
908
- {
909
- "name": "eo-dynamic-form-item",
910
- "alias": [
911
- "form.dynamic-form-item"
912
- ],
913
- "properties": [
914
- {
915
- "name": "name",
916
- "description": "字段名称",
917
- "type": "string"
918
- },
919
- {
920
- "name": "label",
921
- "description": "字段说明",
922
- "type": "string"
923
- },
924
- {
925
- "name": "required",
926
- "description": "是否必填",
927
- "type": "boolean"
928
- },
929
- {
930
- "name": "value",
931
- "description": "值",
932
- "attribute": false,
933
- "type": "DynamicFormValuesItem[]"
934
- },
935
- {
936
- "name": "message",
937
- "description": "校验文本",
938
- "attribute": false,
939
- "type": "Record<string, string>"
940
- },
941
- {
942
- "name": "hideRemoveButton",
943
- "description": "是否隐藏每一行删除的按钮",
944
- "attribute": false,
945
- "type": "boolean | ((row: Record<string, any>, index: number) => boolean)"
946
- },
947
- {
948
- "name": "disabledRemoveButton",
949
- "description": "是否禁止每一行删除的按钮",
950
- "attribute": false,
951
- "type": "boolean | ((row: Record<string, any>, index: number) => boolean)"
952
- },
953
- {
954
- "name": "hideAddButton",
955
- "description": "是否隐藏添加的按钮",
956
- "attribute": false,
957
- "type": "boolean | ((value: Record<string, any>[]) => boolean)"
958
- },
959
- {
960
- "name": "disabledAddButton",
961
- "description": "是否禁止添加的按钮",
962
- "attribute": false,
963
- "type": "boolean | ((value: Record<string, any>[]) => boolean)"
964
- },
965
- {
966
- "name": "useBrick",
967
- "description": "动态表单子项构件列表",
968
- "attribute": false,
969
- "type": "UseBrickConf"
970
- }
971
- ],
972
- "events": [
973
- {
974
- "name": "change",
975
- "detail": {
976
- "type": "DynamicFormValuesItem[]"
977
- }
978
- },
979
- {
980
- "name": "row.add",
981
- "description": "增加一行时触发,detail为该行的默认值,index为该行的位置",
982
- "detail": {
983
- "type": "rowDataType"
984
- }
985
- },
986
- {
987
- "name": "row.remove",
988
- "description": "移除一行时触发,detail为该行的值,index为该行的位置",
989
- "detail": {
990
- "type": "rowDataType"
991
- }
992
- }
993
- ],
994
- "slots": [],
995
- "methods": [],
996
- "parts": [],
997
- "description": "动态表单",
998
- "category": "form-input-basic"
999
- },
1000
908
  {
1001
909
  "name": "eo-search",
1002
910
  "alias": [
@@ -1112,6 +1020,98 @@
1112
1020
  "description": "图标选择构件",
1113
1021
  "category": "form-input-basic"
1114
1022
  },
1023
+ {
1024
+ "name": "eo-dynamic-form-item",
1025
+ "alias": [
1026
+ "form.dynamic-form-item"
1027
+ ],
1028
+ "properties": [
1029
+ {
1030
+ "name": "name",
1031
+ "description": "字段名称",
1032
+ "type": "string"
1033
+ },
1034
+ {
1035
+ "name": "label",
1036
+ "description": "字段说明",
1037
+ "type": "string"
1038
+ },
1039
+ {
1040
+ "name": "required",
1041
+ "description": "是否必填",
1042
+ "type": "boolean"
1043
+ },
1044
+ {
1045
+ "name": "value",
1046
+ "description": "值",
1047
+ "attribute": false,
1048
+ "type": "DynamicFormValuesItem[]"
1049
+ },
1050
+ {
1051
+ "name": "message",
1052
+ "description": "校验文本",
1053
+ "attribute": false,
1054
+ "type": "Record<string, string>"
1055
+ },
1056
+ {
1057
+ "name": "hideRemoveButton",
1058
+ "description": "是否隐藏每一行删除的按钮",
1059
+ "attribute": false,
1060
+ "type": "boolean | ((row: Record<string, any>, index: number) => boolean)"
1061
+ },
1062
+ {
1063
+ "name": "disabledRemoveButton",
1064
+ "description": "是否禁止每一行删除的按钮",
1065
+ "attribute": false,
1066
+ "type": "boolean | ((row: Record<string, any>, index: number) => boolean)"
1067
+ },
1068
+ {
1069
+ "name": "hideAddButton",
1070
+ "description": "是否隐藏添加的按钮",
1071
+ "attribute": false,
1072
+ "type": "boolean | ((value: Record<string, any>[]) => boolean)"
1073
+ },
1074
+ {
1075
+ "name": "disabledAddButton",
1076
+ "description": "是否禁止添加的按钮",
1077
+ "attribute": false,
1078
+ "type": "boolean | ((value: Record<string, any>[]) => boolean)"
1079
+ },
1080
+ {
1081
+ "name": "useBrick",
1082
+ "description": "动态表单子项构件列表",
1083
+ "attribute": false,
1084
+ "type": "UseBrickConf"
1085
+ }
1086
+ ],
1087
+ "events": [
1088
+ {
1089
+ "name": "change",
1090
+ "detail": {
1091
+ "type": "DynamicFormValuesItem[]"
1092
+ }
1093
+ },
1094
+ {
1095
+ "name": "row.add",
1096
+ "description": "增加一行时触发,detail为该行的默认值,index为该行的位置",
1097
+ "detail": {
1098
+ "type": "rowDataType"
1099
+ }
1100
+ },
1101
+ {
1102
+ "name": "row.remove",
1103
+ "description": "移除一行时触发,detail为该行的值,index为该行的位置",
1104
+ "detail": {
1105
+ "type": "rowDataType"
1106
+ }
1107
+ }
1108
+ ],
1109
+ "slots": [],
1110
+ "methods": [],
1111
+ "parts": [],
1112
+ "description": "动态表单",
1113
+ "category": "form-input-basic"
1114
+ },
1115
1115
  {
1116
1116
  "name": "eo-upload-image",
1117
1117
  "alias": [