@next-bricks/form 1.18.2 → 1.18.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,357 +3,6 @@
3
3
  "package": "@next-bricks/form",
4
4
  "name": "form",
5
5
  "bricks": [
6
- {
7
- "name": "eo-textarea",
8
- "alias": [
9
- "form.general-textarea"
10
- ],
11
- "properties": [
12
- {
13
- "name": "name",
14
- "description": "字段名称",
15
- "type": "string"
16
- },
17
- {
18
- "name": "label",
19
- "description": "标签文字",
20
- "type": "string"
21
- },
22
- {
23
- "name": "value",
24
- "description": "值",
25
- "type": "string"
26
- },
27
- {
28
- "name": "placeholder",
29
- "description": "占位说明",
30
- "type": "string"
31
- },
32
- {
33
- "name": "disabled",
34
- "description": "是否禁用",
35
- "type": "boolean"
36
- },
37
- {
38
- "name": "minLength",
39
- "description": "最小长度",
40
- "type": "number"
41
- },
42
- {
43
- "name": "maxLength",
44
- "description": "最大长度",
45
- "type": "number"
46
- },
47
- {
48
- "name": "autoSize",
49
- "description": "大小自适应",
50
- "attribute": false,
51
- "type": "AutoSize"
52
- },
53
- {
54
- "name": "required",
55
- "description": "是否必填",
56
- "type": "boolean"
57
- },
58
- {
59
- "name": "max",
60
- "description": "表单校验最大长度",
61
- "type": "number"
62
- },
63
- {
64
- "name": "min",
65
- "description": "表单校验最小长度",
66
- "type": "number"
67
- },
68
- {
69
- "name": "message",
70
- "description": "校验信息",
71
- "attribute": false,
72
- "type": "Record<string, string>"
73
- },
74
- {
75
- "name": "textareaStyle",
76
- "description": "自定义样式",
77
- "attribute": false,
78
- "type": "React.CSSProperties"
79
- },
80
- {
81
- "name": "themeVariant",
82
- "description": "主题变体",
83
- "type": "\"default\" | \"elevo\""
84
- }
85
- ],
86
- "events": [
87
- {
88
- "name": "change",
89
- "description": "",
90
- "detail": {
91
- "description": null,
92
- "type": "string"
93
- }
94
- }
95
- ],
96
- "slots": [],
97
- "methods": [
98
- {
99
- "name": "focusTextarea",
100
- "params": [],
101
- "description": "focus",
102
- "returns": {}
103
- }
104
- ],
105
- "parts": [],
106
- "description": "通用多行文本输入框构件",
107
- "category": "form-input-basic"
108
- },
109
- {
110
- "name": "eo-radio",
111
- "alias": [
112
- "form.general-radio"
113
- ],
114
- "properties": [
115
- {
116
- "name": "name",
117
- "description": "下拉框字段名",
118
- "type": "string"
119
- },
120
- {
121
- "name": "label",
122
- "description": "单选框字段说明",
123
- "type": "string"
124
- },
125
- {
126
- "name": "options",
127
- "description": "单选框选项表",
128
- "required": true,
129
- "attribute": false,
130
- "type": "GeneralOption[]"
131
- },
132
- {
133
- "name": "value",
134
- "description": "单选框当前选中始值",
135
- "attribute": false,
136
- "type": "any"
137
- },
138
- {
139
- "name": "required",
140
- "description": "是否必填",
141
- "type": "boolean"
142
- },
143
- {
144
- "name": "message",
145
- "description": "校验文本信息",
146
- "attribute": false,
147
- "type": "Record<string, string>"
148
- },
149
- {
150
- "name": "disabled",
151
- "description": "是否禁用",
152
- "type": "boolean"
153
- },
154
- {
155
- "name": "type",
156
- "description": "单选框样式类型",
157
- "default": "\"default\"",
158
- "type": "RadioType"
159
- },
160
- {
161
- "name": "ui",
162
- "description": "UI样式",
163
- "default": "\"default\"",
164
- "type": "UIType"
165
- },
166
- {
167
- "name": "size",
168
- "description": "大小,只对按钮样式生效",
169
- "default": "\"medium\"",
170
- "type": "ComponentSize"
171
- },
172
- {
173
- "name": "customStyle",
174
- "description": "自定义radio的外层样式",
175
- "attribute": false,
176
- "type": "React.CSSProperties"
177
- },
178
- {
179
- "name": "useBrick",
180
- "description": "自定义radio的内容",
181
- "attribute": false,
182
- "type": "UseSingleBrickConf"
183
- },
184
- {
185
- "name": "themeVariant",
186
- "description": "主题变体",
187
- "type": "\"default\" | \"elevo\""
188
- }
189
- ],
190
- "events": [
191
- {
192
- "name": "change",
193
- "description": "值变化事件",
194
- "detail": {
195
- "type": "GeneralComplexOption | undefined"
196
- }
197
- },
198
- {
199
- "name": "options.change",
200
- "description": "选项列表变化事件",
201
- "detail": {
202
- "type": "{\n options: {\n label: string;\n value: any;\n [key: string]: any;\n };\n name: string;\n }"
203
- }
204
- }
205
- ],
206
- "slots": [],
207
- "methods": [],
208
- "parts": [],
209
- "description": "通用单选构件",
210
- "category": "form-input-basic"
211
- },
212
- {
213
- "name": "eo-form",
214
- "alias": [
215
- "form.general-form"
216
- ],
217
- "properties": [
218
- {
219
- "name": "staticValues",
220
- "attribute": false,
221
- "type": "Record<string, unknown>"
222
- },
223
- {
224
- "name": "layout",
225
- "description": "布局方式(默认 vertical 布局)",
226
- "default": "vertical",
227
- "type": "Layout"
228
- },
229
- {
230
- "name": "size",
231
- "description": "表单组件尺寸",
232
- "type": "ComponentSize"
233
- },
234
- {
235
- "name": "labelCol",
236
- "description": "标签列布局样式(仅当 layout=\"horizontal\" 时有效)",
237
- "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 }",
238
- "attribute": false,
239
- "type": "ColProps"
240
- },
241
- {
242
- "name": "wrapperCol",
243
- "description": "输入控件列布局样式(仅当 layout=\"horizontal\" 时有效)",
244
- "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 }",
245
- "attribute": false,
246
- "type": "ColProps"
247
- },
248
- {
249
- "name": "formStyle",
250
- "attribute": false,
251
- "type": "React.CSSProperties"
252
- },
253
- {
254
- "name": "textContent",
255
- "type": "string",
256
- "description": "文本内容"
257
- }
258
- ],
259
- "events": [
260
- {
261
- "name": "values.change",
262
- "description": "表单值变更事件",
263
- "detail": {
264
- "description": null,
265
- "type": "Record<string, unknown>"
266
- }
267
- },
268
- {
269
- "name": "validate.success",
270
- "description": "表单验证成功时触发事件",
271
- "detail": {
272
- "type": "Record<string, unknown>"
273
- }
274
- },
275
- {
276
- "name": "validate.error",
277
- "description": "表单验证报错时触发事件",
278
- "detail": {
279
- "type": "(MessageBody & { name: string })[]"
280
- }
281
- }
282
- ],
283
- "slots": [
284
- {
285
- "name": null,
286
- "description": "表单内容"
287
- }
288
- ],
289
- "methods": [
290
- {
291
- "name": "validate",
292
- "params": [],
293
- "description": "表单校验方法",
294
- "returns": {
295
- "type": "boolean | Record<string, unknown>"
296
- }
297
- },
298
- {
299
- "name": "setInitValue",
300
- "params": [
301
- {
302
- "name": "values",
303
- "type": "Record<string, unknown>"
304
- },
305
- {
306
- "name": "options",
307
- "type": "{ runInMacrotask?: boolean; runInMicrotask?: boolean }"
308
- }
309
- ],
310
- "description": "表单设置值方法",
311
- "returns": {}
312
- },
313
- {
314
- "name": "resetFields",
315
- "params": [
316
- {
317
- "name": "name",
318
- "type": "string"
319
- }
320
- ],
321
- "description": "表单重置值方法",
322
- "returns": {}
323
- },
324
- {
325
- "name": "getFieldsValue",
326
- "params": [
327
- {
328
- "name": "name",
329
- "type": "string"
330
- }
331
- ],
332
- "description": "获取表单值方法",
333
- "returns": {}
334
- },
335
- {
336
- "name": "validateField",
337
- "params": [
338
- {
339
- "name": "name",
340
- "type": "string"
341
- }
342
- ],
343
- "description": "校验表单字段方法",
344
- "returns": {}
345
- },
346
- {
347
- "name": "resetValidateState",
348
- "params": [],
349
- "description": "重置表单校验状态方法",
350
- "returns": {}
351
- }
352
- ],
353
- "parts": [],
354
- "description": "表单构件",
355
- "category": "form-input-basic"
356
- },
357
6
  {
358
7
  "name": "eo-select",
359
8
  "alias": [
@@ -566,61 +215,265 @@
566
215
  ],
567
216
  "events": [
568
217
  {
569
- "name": "submit",
570
- "description": "点击提交按钮触发的事件",
571
- "detail": {
572
- "type": "void"
573
- }
574
- },
575
- {
576
- "name": "cancel",
577
- "description": "点击取消按钮触发的事件",
218
+ "name": "submit",
219
+ "description": "点击提交按钮触发的事件",
220
+ "detail": {
221
+ "type": "void"
222
+ }
223
+ },
224
+ {
225
+ "name": "cancel",
226
+ "description": "点击取消按钮触发的事件",
227
+ "detail": {
228
+ "type": "void"
229
+ }
230
+ }
231
+ ],
232
+ "slots": [],
233
+ "methods": [],
234
+ "parts": [],
235
+ "description": "表单提交按钮",
236
+ "category": "form-input-basic"
237
+ },
238
+ {
239
+ "name": "eo-checkbox",
240
+ "alias": [
241
+ "form.general-checkbox"
242
+ ],
243
+ "properties": [
244
+ {
245
+ "name": "name",
246
+ "description": "字段名称",
247
+ "type": "string"
248
+ },
249
+ {
250
+ "name": "label",
251
+ "description": "字段说明",
252
+ "type": "string"
253
+ },
254
+ {
255
+ "name": "value",
256
+ "description": "值",
257
+ "attribute": false,
258
+ "type": "CheckboxValueType[]"
259
+ },
260
+ {
261
+ "name": "options",
262
+ "description": "多选框选项表",
263
+ "required": true,
264
+ "default": "[]",
265
+ "attribute": false,
266
+ "type": "CheckboxOptionType[]"
267
+ },
268
+ {
269
+ "name": "type",
270
+ "description": "类型",
271
+ "default": "\"default\"",
272
+ "type": "CheckboxType"
273
+ },
274
+ {
275
+ "name": "disabled",
276
+ "description": "是否禁用",
277
+ "type": "boolean"
278
+ },
279
+ {
280
+ "name": "isCustom",
281
+ "description": "是否为自定义",
282
+ "default": "false",
283
+ "type": "boolean"
284
+ },
285
+ {
286
+ "name": "required",
287
+ "description": "是否必填",
288
+ "type": "boolean"
289
+ },
290
+ {
291
+ "name": "message",
292
+ "description": "校验文本",
293
+ "attribute": false,
294
+ "type": "Record<string, string>"
295
+ },
296
+ {
297
+ "name": "isGroup",
298
+ "description": "是否为复选框,为true时,则可设置分组数据 optionGroups",
299
+ "type": "boolean"
300
+ },
301
+ {
302
+ "name": "optionGroups",
303
+ "description": "多选框选项分组数据,需要设置 isGroup 为 true 才生效",
304
+ "attribute": false,
305
+ "type": "OptionGroup[]"
306
+ },
307
+ {
308
+ "name": "themeVariant",
309
+ "description": "主题变体",
310
+ "type": "\"default\" | \"elevo\""
311
+ }
312
+ ],
313
+ "events": [
314
+ {
315
+ "name": "change",
316
+ "description": "复选框变化事件",
317
+ "detail": {
318
+ "type": "CheckboxOptionType[]"
319
+ }
320
+ },
321
+ {
322
+ "name": "options.change",
323
+ "description": "复选框变化事件",
324
+ "detail": {
325
+ "type": "{\n options: CheckboxOptionType[];\n name: string;\n }"
326
+ }
327
+ }
328
+ ],
329
+ "slots": [],
330
+ "methods": [],
331
+ "parts": [],
332
+ "description": "表单复选框构件",
333
+ "category": "form-input-basic"
334
+ },
335
+ {
336
+ "name": "eo-textarea",
337
+ "alias": [
338
+ "form.general-textarea"
339
+ ],
340
+ "properties": [
341
+ {
342
+ "name": "name",
343
+ "description": "字段名称",
344
+ "type": "string"
345
+ },
346
+ {
347
+ "name": "label",
348
+ "description": "标签文字",
349
+ "type": "string"
350
+ },
351
+ {
352
+ "name": "value",
353
+ "description": "值",
354
+ "type": "string"
355
+ },
356
+ {
357
+ "name": "placeholder",
358
+ "description": "占位说明",
359
+ "type": "string"
360
+ },
361
+ {
362
+ "name": "disabled",
363
+ "description": "是否禁用",
364
+ "type": "boolean"
365
+ },
366
+ {
367
+ "name": "minLength",
368
+ "description": "最小长度",
369
+ "type": "number"
370
+ },
371
+ {
372
+ "name": "maxLength",
373
+ "description": "最大长度",
374
+ "type": "number"
375
+ },
376
+ {
377
+ "name": "autoSize",
378
+ "description": "大小自适应",
379
+ "attribute": false,
380
+ "type": "AutoSize"
381
+ },
382
+ {
383
+ "name": "required",
384
+ "description": "是否必填",
385
+ "type": "boolean"
386
+ },
387
+ {
388
+ "name": "max",
389
+ "description": "表单校验最大长度",
390
+ "type": "number"
391
+ },
392
+ {
393
+ "name": "min",
394
+ "description": "表单校验最小长度",
395
+ "type": "number"
396
+ },
397
+ {
398
+ "name": "message",
399
+ "description": "校验信息",
400
+ "attribute": false,
401
+ "type": "Record<string, string>"
402
+ },
403
+ {
404
+ "name": "textareaStyle",
405
+ "description": "自定义样式",
406
+ "attribute": false,
407
+ "type": "React.CSSProperties"
408
+ },
409
+ {
410
+ "name": "themeVariant",
411
+ "description": "主题变体",
412
+ "type": "\"default\" | \"elevo\""
413
+ }
414
+ ],
415
+ "events": [
416
+ {
417
+ "name": "change",
418
+ "description": "",
578
419
  "detail": {
579
- "type": "void"
420
+ "description": null,
421
+ "type": "string"
580
422
  }
581
423
  }
582
424
  ],
583
425
  "slots": [],
584
- "methods": [],
426
+ "methods": [
427
+ {
428
+ "name": "focusTextarea",
429
+ "params": [],
430
+ "description": "focus",
431
+ "returns": {}
432
+ }
433
+ ],
585
434
  "parts": [],
586
- "description": "表单提交按钮",
435
+ "description": "通用多行文本输入框构件",
587
436
  "category": "form-input-basic"
588
437
  },
589
438
  {
590
- "name": "eo-checkbox",
439
+ "name": "eo-radio",
591
440
  "alias": [
592
- "form.general-checkbox"
441
+ "form.general-radio"
593
442
  ],
594
443
  "properties": [
595
444
  {
596
445
  "name": "name",
597
- "description": "字段名称",
446
+ "description": "下拉框字段名",
598
447
  "type": "string"
599
448
  },
600
449
  {
601
450
  "name": "label",
602
- "description": "字段说明",
451
+ "description": "单选框字段说明",
603
452
  "type": "string"
604
453
  },
605
454
  {
606
- "name": "value",
607
- "description": "",
455
+ "name": "options",
456
+ "description": "单选框选项表",
457
+ "required": true,
608
458
  "attribute": false,
609
- "type": "CheckboxValueType[]"
459
+ "type": "GeneralOption[]"
610
460
  },
611
461
  {
612
- "name": "options",
613
- "description": "多选框选项表",
614
- "required": true,
615
- "default": "[]",
462
+ "name": "value",
463
+ "description": "单选框当前选中始值",
616
464
  "attribute": false,
617
- "type": "CheckboxOptionType[]"
465
+ "type": "any"
618
466
  },
619
467
  {
620
- "name": "type",
621
- "description": "类型",
622
- "default": "\"default\"",
623
- "type": "CheckboxType"
468
+ "name": "required",
469
+ "description": "是否必填",
470
+ "type": "boolean"
471
+ },
472
+ {
473
+ "name": "message",
474
+ "description": "校验文本信息",
475
+ "attribute": false,
476
+ "type": "Record<string, string>"
624
477
  },
625
478
  {
626
479
  "name": "disabled",
@@ -628,32 +481,34 @@
628
481
  "type": "boolean"
629
482
  },
630
483
  {
631
- "name": "isCustom",
632
- "description": "是否为自定义",
633
- "default": "false",
634
- "type": "boolean"
484
+ "name": "type",
485
+ "description": "单选框样式类型",
486
+ "default": "\"default\"",
487
+ "type": "RadioType"
635
488
  },
636
489
  {
637
- "name": "required",
638
- "description": "是否必填",
639
- "type": "boolean"
490
+ "name": "ui",
491
+ "description": "UI样式",
492
+ "default": "\"default\"",
493
+ "type": "UIType"
640
494
  },
641
495
  {
642
- "name": "message",
643
- "description": "校验文本",
644
- "attribute": false,
645
- "type": "Record<string, string>"
496
+ "name": "size",
497
+ "description": "大小,只对按钮样式生效",
498
+ "default": "\"medium\"",
499
+ "type": "ComponentSize"
646
500
  },
647
501
  {
648
- "name": "isGroup",
649
- "description": "是否为复选框,为true时,则可设置分组数据 optionGroups",
650
- "type": "boolean"
502
+ "name": "customStyle",
503
+ "description": "自定义radio的外层样式",
504
+ "attribute": false,
505
+ "type": "React.CSSProperties"
651
506
  },
652
507
  {
653
- "name": "optionGroups",
654
- "description": "多选框选项分组数据,需要设置 isGroup 为 true 才生效",
508
+ "name": "useBrick",
509
+ "description": "自定义radio的内容",
655
510
  "attribute": false,
656
- "type": "OptionGroup[]"
511
+ "type": "UseSingleBrickConf"
657
512
  },
658
513
  {
659
514
  "name": "themeVariant",
@@ -664,23 +519,23 @@
664
519
  "events": [
665
520
  {
666
521
  "name": "change",
667
- "description": "复选框变化事件",
522
+ "description": "值变化事件",
668
523
  "detail": {
669
- "type": "CheckboxOptionType[]"
524
+ "type": "GeneralComplexOption | undefined"
670
525
  }
671
526
  },
672
527
  {
673
528
  "name": "options.change",
674
- "description": "复选框变化事件",
529
+ "description": "选项列表变化事件",
675
530
  "detail": {
676
- "type": "{\n options: CheckboxOptionType[];\n name: string;\n }"
531
+ "type": "{\n options: {\n label: string;\n value: any;\n [key: string]: any;\n };\n name: string;\n }"
677
532
  }
678
533
  }
679
534
  ],
680
535
  "slots": [],
681
536
  "methods": [],
682
537
  "parts": [],
683
- "description": "表单复选框构件",
538
+ "description": "通用单选构件",
684
539
  "category": "form-input-basic"
685
540
  },
686
541
  {
@@ -847,6 +702,151 @@
847
702
  "description": "搜索框",
848
703
  "category": "interact-basic"
849
704
  },
705
+ {
706
+ "name": "eo-form",
707
+ "alias": [
708
+ "form.general-form"
709
+ ],
710
+ "properties": [
711
+ {
712
+ "name": "staticValues",
713
+ "attribute": false,
714
+ "type": "Record<string, unknown>"
715
+ },
716
+ {
717
+ "name": "layout",
718
+ "description": "布局方式(默认 vertical 布局)",
719
+ "default": "vertical",
720
+ "type": "Layout"
721
+ },
722
+ {
723
+ "name": "size",
724
+ "description": "表单组件尺寸",
725
+ "type": "ComponentSize"
726
+ },
727
+ {
728
+ "name": "labelCol",
729
+ "description": "标签列布局样式(仅当 layout=\"horizontal\" 时有效)",
730
+ "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 }",
731
+ "attribute": false,
732
+ "type": "ColProps"
733
+ },
734
+ {
735
+ "name": "wrapperCol",
736
+ "description": "输入控件列布局样式(仅当 layout=\"horizontal\" 时有效)",
737
+ "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 }",
738
+ "attribute": false,
739
+ "type": "ColProps"
740
+ },
741
+ {
742
+ "name": "formStyle",
743
+ "attribute": false,
744
+ "type": "React.CSSProperties"
745
+ },
746
+ {
747
+ "name": "textContent",
748
+ "type": "string",
749
+ "description": "文本内容"
750
+ }
751
+ ],
752
+ "events": [
753
+ {
754
+ "name": "values.change",
755
+ "description": "表单值变更事件",
756
+ "detail": {
757
+ "description": null,
758
+ "type": "Record<string, unknown>"
759
+ }
760
+ },
761
+ {
762
+ "name": "validate.success",
763
+ "description": "表单验证成功时触发事件",
764
+ "detail": {
765
+ "type": "Record<string, unknown>"
766
+ }
767
+ },
768
+ {
769
+ "name": "validate.error",
770
+ "description": "表单验证报错时触发事件",
771
+ "detail": {
772
+ "type": "(MessageBody & { name: string })[]"
773
+ }
774
+ }
775
+ ],
776
+ "slots": [
777
+ {
778
+ "name": null,
779
+ "description": "表单内容"
780
+ }
781
+ ],
782
+ "methods": [
783
+ {
784
+ "name": "validate",
785
+ "params": [],
786
+ "description": "表单校验方法",
787
+ "returns": {
788
+ "type": "boolean | Record<string, unknown>"
789
+ }
790
+ },
791
+ {
792
+ "name": "setInitValue",
793
+ "params": [
794
+ {
795
+ "name": "values",
796
+ "type": "Record<string, unknown>"
797
+ },
798
+ {
799
+ "name": "options",
800
+ "type": "{ runInMacrotask?: boolean; runInMicrotask?: boolean }"
801
+ }
802
+ ],
803
+ "description": "表单设置值方法",
804
+ "returns": {}
805
+ },
806
+ {
807
+ "name": "resetFields",
808
+ "params": [
809
+ {
810
+ "name": "name",
811
+ "type": "string"
812
+ }
813
+ ],
814
+ "description": "表单重置值方法",
815
+ "returns": {}
816
+ },
817
+ {
818
+ "name": "getFieldsValue",
819
+ "params": [
820
+ {
821
+ "name": "name",
822
+ "type": "string"
823
+ }
824
+ ],
825
+ "description": "获取表单值方法",
826
+ "returns": {}
827
+ },
828
+ {
829
+ "name": "validateField",
830
+ "params": [
831
+ {
832
+ "name": "name",
833
+ "type": "string"
834
+ }
835
+ ],
836
+ "description": "校验表单字段方法",
837
+ "returns": {}
838
+ },
839
+ {
840
+ "name": "resetValidateState",
841
+ "params": [],
842
+ "description": "重置表单校验状态方法",
843
+ "returns": {}
844
+ }
845
+ ],
846
+ "parts": [],
847
+ "description": "表单构件",
848
+ "category": "form-input-basic"
849
+ },
850
850
  {
851
851
  "name": "eo-icon-select",
852
852
  "alias": [