@next-bricks/form 1.16.1 → 1.16.2

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,6 +3,249 @@
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
+ "events": [
82
+ {
83
+ "name": "change",
84
+ "description": "",
85
+ "detail": {
86
+ "description": null,
87
+ "type": "string"
88
+ }
89
+ }
90
+ ],
91
+ "slots": [],
92
+ "methods": [
93
+ {
94
+ "name": "focusTextarea",
95
+ "params": [],
96
+ "description": "focus",
97
+ "returns": {}
98
+ }
99
+ ],
100
+ "parts": [],
101
+ "description": "通用多行文本输入框构件",
102
+ "category": "form-input-basic"
103
+ },
104
+ {
105
+ "name": "eo-form",
106
+ "alias": [
107
+ "form.general-form"
108
+ ],
109
+ "properties": [
110
+ {
111
+ "name": "staticValues",
112
+ "attribute": false,
113
+ "type": "Record<string, unknown>"
114
+ },
115
+ {
116
+ "name": "layout",
117
+ "description": "布局方式(默认 vertical 布局)",
118
+ "default": "vertical",
119
+ "type": "Layout"
120
+ },
121
+ {
122
+ "name": "size",
123
+ "description": "表单组件尺寸",
124
+ "type": "ComponentSize"
125
+ },
126
+ {
127
+ "name": "labelCol",
128
+ "description": "标签列布局样式(仅当 layout=\"horizontal\" 时有效)",
129
+ "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 }",
130
+ "attribute": false,
131
+ "type": "ColProps"
132
+ },
133
+ {
134
+ "name": "wrapperCol",
135
+ "description": "输入控件列布局样式(仅当 layout=\"horizontal\" 时有效)",
136
+ "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 }",
137
+ "attribute": false,
138
+ "type": "ColProps"
139
+ },
140
+ {
141
+ "name": "formStyle",
142
+ "attribute": false,
143
+ "type": "React.CSSProperties"
144
+ },
145
+ {
146
+ "name": "textContent",
147
+ "type": "string",
148
+ "description": "文本内容"
149
+ }
150
+ ],
151
+ "events": [
152
+ {
153
+ "name": "values.change",
154
+ "description": "表单值变更事件",
155
+ "detail": {
156
+ "description": null,
157
+ "type": "Record<string, unknown>"
158
+ }
159
+ },
160
+ {
161
+ "name": "validate.success",
162
+ "description": "表单验证成功时触发事件",
163
+ "detail": {
164
+ "type": "Record<string, unknown>"
165
+ }
166
+ },
167
+ {
168
+ "name": "validate.error",
169
+ "description": "表单验证报错时触发事件",
170
+ "detail": {
171
+ "type": "(MessageBody & { name: string })[]"
172
+ }
173
+ }
174
+ ],
175
+ "slots": [
176
+ {
177
+ "name": null,
178
+ "description": "表单内容"
179
+ }
180
+ ],
181
+ "methods": [
182
+ {
183
+ "name": "validate",
184
+ "params": [],
185
+ "description": "表单校验方法",
186
+ "returns": {
187
+ "type": "boolean | Record<string, unknown>"
188
+ }
189
+ },
190
+ {
191
+ "name": "setInitValue",
192
+ "params": [
193
+ {
194
+ "name": "values",
195
+ "type": "Record<string, unknown>"
196
+ },
197
+ {
198
+ "name": "options",
199
+ "type": "{ runInMacrotask?: boolean; runInMicrotask?: boolean }"
200
+ }
201
+ ],
202
+ "description": "表单设置值方法",
203
+ "returns": {}
204
+ },
205
+ {
206
+ "name": "resetFields",
207
+ "params": [
208
+ {
209
+ "name": "name",
210
+ "type": "string"
211
+ }
212
+ ],
213
+ "description": "表单重置值方法",
214
+ "returns": {}
215
+ },
216
+ {
217
+ "name": "getFieldsValue",
218
+ "params": [
219
+ {
220
+ "name": "name",
221
+ "type": "string"
222
+ }
223
+ ],
224
+ "description": "获取表单值方法",
225
+ "returns": {}
226
+ },
227
+ {
228
+ "name": "validateField",
229
+ "params": [
230
+ {
231
+ "name": "name",
232
+ "type": "string"
233
+ }
234
+ ],
235
+ "description": "校验表单字段方法",
236
+ "returns": {}
237
+ },
238
+ {
239
+ "name": "resetValidateState",
240
+ "params": [],
241
+ "description": "重置表单校验状态方法",
242
+ "returns": {}
243
+ }
244
+ ],
245
+ "parts": [],
246
+ "description": "表单构件",
247
+ "category": "form-input-basic"
248
+ },
6
249
  {
7
250
  "name": "eo-radio",
8
251
  "alias": [
@@ -316,9 +559,9 @@
316
559
  "category": "form-input-basic"
317
560
  },
318
561
  {
319
- "name": "eo-textarea",
562
+ "name": "eo-checkbox",
320
563
  "alias": [
321
- "form.general-textarea"
564
+ "form.general-checkbox"
322
565
  ],
323
566
  "properties": [
324
567
  {
@@ -328,18 +571,28 @@
328
571
  },
329
572
  {
330
573
  "name": "label",
331
- "description": "标签文字",
574
+ "description": "字段说明",
332
575
  "type": "string"
333
576
  },
334
577
  {
335
578
  "name": "value",
336
579
  "description": "值",
337
- "type": "string"
580
+ "attribute": false,
581
+ "type": "CheckboxValueType[]"
338
582
  },
339
583
  {
340
- "name": "placeholder",
341
- "description": "占位说明",
342
- "type": "string"
584
+ "name": "options",
585
+ "description": "多选框选项表",
586
+ "required": true,
587
+ "default": "[]",
588
+ "attribute": false,
589
+ "type": "CheckboxOptionType[]"
590
+ },
591
+ {
592
+ "name": "type",
593
+ "description": "类型",
594
+ "default": "\"default\"",
595
+ "type": "CheckboxType"
343
596
  },
344
597
  {
345
598
  "name": "disabled",
@@ -347,215 +600,54 @@
347
600
  "type": "boolean"
348
601
  },
349
602
  {
350
- "name": "minLength",
351
- "description": "最小长度",
352
- "type": "number"
353
- },
354
- {
355
- "name": "maxLength",
356
- "description": "最大长度",
357
- "type": "number"
358
- },
359
- {
360
- "name": "autoSize",
361
- "description": "大小自适应",
362
- "attribute": false,
363
- "type": "AutoSize"
603
+ "name": "isCustom",
604
+ "description": "是否为自定义",
605
+ "default": "false",
606
+ "type": "boolean"
364
607
  },
365
608
  {
366
609
  "name": "required",
367
610
  "description": "是否必填",
368
611
  "type": "boolean"
369
612
  },
370
- {
371
- "name": "max",
372
- "description": "表单校验最大长度",
373
- "type": "number"
374
- },
375
- {
376
- "name": "min",
377
- "description": "表单校验最小长度",
378
- "type": "number"
379
- },
380
613
  {
381
614
  "name": "message",
382
- "description": "校验信息",
615
+ "description": "校验文本",
383
616
  "attribute": false,
384
617
  "type": "Record<string, string>"
385
618
  },
386
619
  {
387
- "name": "textareaStyle",
388
- "description": "自定义样式",
389
- "attribute": false,
390
- "type": "React.CSSProperties"
391
- }
392
- ],
393
- "events": [
394
- {
395
- "name": "change",
396
- "description": "",
397
- "detail": {
398
- "description": null,
399
- "type": "string"
400
- }
401
- }
402
- ],
403
- "slots": [],
404
- "methods": [
405
- {
406
- "name": "focusTextarea",
407
- "params": [],
408
- "description": "focus",
409
- "returns": {}
410
- }
411
- ],
412
- "parts": [],
413
- "description": "通用多行文本输入框构件",
414
- "category": "form-input-basic"
415
- },
416
- {
417
- "name": "eo-form",
418
- "alias": [
419
- "form.general-form"
420
- ],
421
- "properties": [
422
- {
423
- "name": "staticValues",
424
- "attribute": false,
425
- "type": "Record<string, unknown>"
426
- },
427
- {
428
- "name": "layout",
429
- "description": "布局方式(默认 vertical 布局)",
430
- "default": "vertical",
431
- "type": "Layout"
432
- },
433
- {
434
- "name": "size",
435
- "description": "表单组件尺寸",
436
- "type": "ComponentSize"
437
- },
438
- {
439
- "name": "labelCol",
440
- "description": "标签列布局样式(仅当 layout=\"horizontal\" 时有效)",
441
- "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 }",
442
- "attribute": false,
443
- "type": "ColProps"
444
- },
445
- {
446
- "name": "wrapperCol",
447
- "description": "输入控件列布局样式(仅当 layout=\"horizontal\" 时有效)",
448
- "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 }",
449
- "attribute": false,
450
- "type": "ColProps"
620
+ "name": "isGroup",
621
+ "description": "是否为复选框,为true时,则可设置分组数据 optionGroups",
622
+ "type": "boolean"
451
623
  },
452
624
  {
453
- "name": "formStyle",
625
+ "name": "optionGroups",
626
+ "description": "多选框选项分组数据,需要设置 isGroup 为 true 才生效",
454
627
  "attribute": false,
455
- "type": "React.CSSProperties"
456
- },
457
- {
458
- "name": "textContent",
459
- "type": "string",
460
- "description": "文本内容"
461
- }
462
- ],
463
- "events": [
464
- {
465
- "name": "values.change",
466
- "description": "表单值变更事件",
467
- "detail": {
468
- "description": null,
469
- "type": "Record<string, unknown>"
470
- }
471
- },
472
- {
473
- "name": "validate.success",
474
- "description": "表单验证成功时触发事件",
475
- "detail": {
476
- "type": "Record<string, unknown>"
477
- }
478
- },
479
- {
480
- "name": "validate.error",
481
- "description": "表单验证报错时触发事件",
482
- "detail": {
483
- "type": "(MessageBody & { name: string })[]"
484
- }
485
- }
486
- ],
487
- "slots": [
488
- {
489
- "name": null,
490
- "description": "表单内容"
628
+ "type": "OptionGroup[]"
491
629
  }
492
630
  ],
493
- "methods": [
494
- {
495
- "name": "validate",
496
- "params": [],
497
- "description": "表单校验方法",
498
- "returns": {
499
- "type": "boolean | Record<string, unknown>"
500
- }
501
- },
502
- {
503
- "name": "setInitValue",
504
- "params": [
505
- {
506
- "name": "values",
507
- "type": "Record<string, unknown>"
508
- },
509
- {
510
- "name": "options",
511
- "type": "{ runInMacrotask?: boolean; runInMicrotask?: boolean }"
512
- }
513
- ],
514
- "description": "表单设置值方法",
515
- "returns": {}
516
- },
517
- {
518
- "name": "resetFields",
519
- "params": [
520
- {
521
- "name": "name",
522
- "type": "string"
523
- }
524
- ],
525
- "description": "表单重置值方法",
526
- "returns": {}
527
- },
528
- {
529
- "name": "getFieldsValue",
530
- "params": [
531
- {
532
- "name": "name",
533
- "type": "string"
534
- }
535
- ],
536
- "description": "获取表单值方法",
537
- "returns": {}
538
- },
631
+ "events": [
539
632
  {
540
- "name": "validateField",
541
- "params": [
542
- {
543
- "name": "name",
544
- "type": "string"
545
- }
546
- ],
547
- "description": "校验表单字段方法",
548
- "returns": {}
633
+ "name": "change",
634
+ "description": "复选框变化事件",
635
+ "detail": {
636
+ "type": "CheckboxOptionType[]"
637
+ }
549
638
  },
550
639
  {
551
- "name": "resetValidateState",
552
- "params": [],
553
- "description": "重置表单校验状态方法",
554
- "returns": {}
640
+ "name": "options.change",
641
+ "description": "复选框变化事件",
642
+ "detail": {
643
+ "type": "{\n options: CheckboxOptionType[];\n name: string;\n }"
644
+ }
555
645
  }
556
646
  ],
647
+ "slots": [],
648
+ "methods": [],
557
649
  "parts": [],
558
- "description": "表单构件",
650
+ "description": "表单复选框构件",
559
651
  "category": "form-input-basic"
560
652
  },
561
653
  {
@@ -717,98 +809,6 @@
717
809
  "description": "搜索框",
718
810
  "category": "interact-basic"
719
811
  },
720
- {
721
- "name": "eo-checkbox",
722
- "alias": [
723
- "form.general-checkbox"
724
- ],
725
- "properties": [
726
- {
727
- "name": "name",
728
- "description": "字段名称",
729
- "type": "string"
730
- },
731
- {
732
- "name": "label",
733
- "description": "字段说明",
734
- "type": "string"
735
- },
736
- {
737
- "name": "value",
738
- "description": "值",
739
- "attribute": false,
740
- "type": "CheckboxValueType[]"
741
- },
742
- {
743
- "name": "options",
744
- "description": "多选框选项表",
745
- "required": true,
746
- "default": "[]",
747
- "attribute": false,
748
- "type": "CheckboxOptionType[]"
749
- },
750
- {
751
- "name": "type",
752
- "description": "类型",
753
- "default": "\"default\"",
754
- "type": "CheckboxType"
755
- },
756
- {
757
- "name": "disabled",
758
- "description": "是否禁用",
759
- "type": "boolean"
760
- },
761
- {
762
- "name": "isCustom",
763
- "description": "是否为自定义",
764
- "default": "false",
765
- "type": "boolean"
766
- },
767
- {
768
- "name": "required",
769
- "description": "是否必填",
770
- "type": "boolean"
771
- },
772
- {
773
- "name": "message",
774
- "description": "校验文本",
775
- "attribute": false,
776
- "type": "Record<string, string>"
777
- },
778
- {
779
- "name": "isGroup",
780
- "description": "是否为复选框,为true时,则可设置分组数据 optionGroups",
781
- "type": "boolean"
782
- },
783
- {
784
- "name": "optionGroups",
785
- "description": "多选框选项分组数据,需要设置 isGroup 为 true 才生效",
786
- "attribute": false,
787
- "type": "OptionGroup[]"
788
- }
789
- ],
790
- "events": [
791
- {
792
- "name": "change",
793
- "description": "复选框变化事件",
794
- "detail": {
795
- "type": "CheckboxOptionType[]"
796
- }
797
- },
798
- {
799
- "name": "options.change",
800
- "description": "复选框变化事件",
801
- "detail": {
802
- "type": "{\n options: CheckboxOptionType[];\n name: string;\n }"
803
- }
804
- }
805
- ],
806
- "slots": [],
807
- "methods": [],
808
- "parts": [],
809
- "description": "表单复选框构件",
810
- "category": "form-input-basic"
811
- },
812
812
  {
813
813
  "name": "eo-icon-select",
814
814
  "alias": [
@@ -1383,24 +1383,27 @@
1383
1383
  "category": "form-input-basic"
1384
1384
  },
1385
1385
  {
1386
- "name": "eo-time-range-picker",
1386
+ "name": "eo-color-picker",
1387
1387
  "properties": [
1388
1388
  {
1389
1389
  "name": "name",
1390
- "description": "时间段选择器字段名",
1390
+ "description": "字段名称",
1391
1391
  "type": "string"
1392
1392
  },
1393
1393
  {
1394
1394
  "name": "label",
1395
- "description": "时间段选择器说明",
1395
+ "description": "字段说明",
1396
1396
  "type": "string"
1397
1397
  },
1398
1398
  {
1399
1399
  "name": "value",
1400
- "description": "时间段选择器的初始值",
1401
- "default": "{ \"startTime\": \"00:00:00\", \"endTime\": \"23:59:59\" }",
1402
- "attribute": false,
1403
- "type": "TimeRange"
1400
+ "description": "",
1401
+ "type": "string"
1402
+ },
1403
+ {
1404
+ "name": "defaultValue",
1405
+ "description": "颜色默认的值",
1406
+ "type": "string | Color"
1404
1407
  },
1405
1408
  {
1406
1409
  "name": "required",
@@ -1408,84 +1411,74 @@
1408
1411
  "type": "boolean"
1409
1412
  },
1410
1413
  {
1411
- "name": "rangeType",
1412
- "description": "时间段类型",
1413
- "attribute": false,
1414
- "type": "RangeType"
1415
- },
1416
- {
1417
- "name": "placeholder",
1418
- "description": "输入框提示文字,单时间段时为string,范围时间段时为[string, string]",
1419
- "attribute": false,
1420
- "type": "string | [string, string]"
1414
+ "name": "allowClear",
1415
+ "description": "允许清除选择的颜色",
1416
+ "type": "boolean"
1421
1417
  },
1422
1418
  {
1423
- "name": "inputStyle",
1424
- "description": "输入框样式",
1419
+ "name": "size",
1420
+ "description": "设置触发器大小",
1421
+ "default": "middle",
1425
1422
  "attribute": false,
1426
- "type": "React.CSSProperties"
1423
+ "type": "\"small\" | \"middle\" | \"large\""
1427
1424
  },
1428
1425
  {
1429
- "name": "selectNearDays",
1430
- "description": "只有rangeType在`date` 和 `dateTime`下, 才支持只选择最近n天(当前时间向前n天)",
1431
- "type": "number"
1426
+ "name": "showText",
1427
+ "description": "显示颜色文本",
1428
+ "type": "boolean"
1432
1429
  },
1433
1430
  {
1434
- "name": "emitChangeOnInit",
1435
- "description": "",
1436
- "default": "true\n是否在初始化完成后额外触发一次`time.range.change`, 这里因为历史原因之前默认行为就是在初始化后会触发该事件,这里为了兼容之前的行为,默认值只能设置为 true。",
1431
+ "name": "disabled",
1432
+ "description": "是否禁用",
1437
1433
  "type": "boolean"
1438
1434
  },
1439
1435
  {
1440
- "name": "presetRanges",
1441
- "description": "",
1442
- "default": "[]\n预设时间范围快捷选择;设置了属性selectNearDays时,属性presetRanges不生效;属性rangeType为week时,presetRanges的值只能为本周、本月、本季度、今年,属性rangeType为month、quarter、year时,以此类推",
1436
+ "name": "format",
1437
+ "description": "颜色格式",
1438
+ "default": "hex",
1443
1439
  "attribute": false,
1444
- "type": "presetRangeType[]"
1440
+ "type": "\"rgb\" | \"hex\" | \"hsb\""
1445
1441
  },
1446
1442
  {
1447
- "name": "validator",
1443
+ "name": "configProps",
1444
+ "description": "透传 antd ColorPicker 属性 [ColorPickerProps](https://ant.design/components/color-picker-cn#api)",
1448
1445
  "attribute": false,
1449
- "type": "((value: any) => MessageBody | string)"
1446
+ "type": "Partial<ColorPickerProps>"
1450
1447
  }
1451
1448
  ],
1452
1449
  "events": [
1453
1450
  {
1454
1451
  "name": "change",
1455
- "description": "时间段变化时触发",
1452
+ "description": "颜色变化事件, 返回值格式和`format`格式一致",
1456
1453
  "detail": {
1457
- "type": "TimeRange"
1454
+ "type": "string | undefined"
1458
1455
  }
1459
1456
  }
1460
1457
  ],
1461
1458
  "slots": [],
1462
1459
  "methods": [],
1463
1460
  "parts": [],
1464
- "description": "时间区间选择器",
1465
- "category": "form-input-basic"
1461
+ "description": "构件 `eo-color-picker`"
1466
1462
  },
1467
1463
  {
1468
- "name": "eo-color-picker",
1464
+ "name": "eo-time-range-picker",
1469
1465
  "properties": [
1470
1466
  {
1471
1467
  "name": "name",
1472
- "description": "字段名称",
1468
+ "description": "时间段选择器字段名",
1473
1469
  "type": "string"
1474
1470
  },
1475
1471
  {
1476
1472
  "name": "label",
1477
- "description": "字段说明",
1473
+ "description": "时间段选择器说明",
1478
1474
  "type": "string"
1479
1475
  },
1480
1476
  {
1481
1477
  "name": "value",
1482
- "description": "",
1483
- "type": "string"
1484
- },
1485
- {
1486
- "name": "defaultValue",
1487
- "description": "颜色默认的值",
1488
- "type": "string | Color"
1478
+ "description": "时间段选择器的初始值",
1479
+ "default": "{ \"startTime\": \"00:00:00\", \"endTime\": \"23:59:59\" }",
1480
+ "attribute": false,
1481
+ "type": "TimeRange"
1489
1482
  },
1490
1483
  {
1491
1484
  "name": "required",
@@ -1493,54 +1486,61 @@
1493
1486
  "type": "boolean"
1494
1487
  },
1495
1488
  {
1496
- "name": "allowClear",
1497
- "description": "允许清除选择的颜色",
1498
- "type": "boolean"
1489
+ "name": "rangeType",
1490
+ "description": "时间段类型",
1491
+ "attribute": false,
1492
+ "type": "RangeType"
1499
1493
  },
1500
1494
  {
1501
- "name": "size",
1502
- "description": "设置触发器大小",
1503
- "default": "middle",
1495
+ "name": "placeholder",
1496
+ "description": "输入框提示文字,单时间段时为string,范围时间段时为[string, string]",
1504
1497
  "attribute": false,
1505
- "type": "\"small\" | \"middle\" | \"large\""
1498
+ "type": "string | [string, string]"
1506
1499
  },
1507
1500
  {
1508
- "name": "showText",
1509
- "description": "显示颜色文本",
1510
- "type": "boolean"
1501
+ "name": "inputStyle",
1502
+ "description": "输入框样式",
1503
+ "attribute": false,
1504
+ "type": "React.CSSProperties"
1511
1505
  },
1512
1506
  {
1513
- "name": "disabled",
1514
- "description": "是否禁用",
1507
+ "name": "selectNearDays",
1508
+ "description": "只有rangeType在`date` 和 `dateTime`下, 才支持只选择最近n天(当前时间向前n天)",
1509
+ "type": "number"
1510
+ },
1511
+ {
1512
+ "name": "emitChangeOnInit",
1513
+ "description": "",
1514
+ "default": "true\n是否在初始化完成后额外触发一次`time.range.change`, 这里因为历史原因之前默认行为就是在初始化后会触发该事件,这里为了兼容之前的行为,默认值只能设置为 true。",
1515
1515
  "type": "boolean"
1516
1516
  },
1517
1517
  {
1518
- "name": "format",
1519
- "description": "颜色格式",
1520
- "default": "hex",
1518
+ "name": "presetRanges",
1519
+ "description": "",
1520
+ "default": "[]\n预设时间范围快捷选择;设置了属性selectNearDays时,属性presetRanges不生效;属性rangeType为week时,presetRanges的值只能为本周、本月、本季度、今年,属性rangeType为month、quarter、year时,以此类推",
1521
1521
  "attribute": false,
1522
- "type": "\"rgb\" | \"hex\" | \"hsb\""
1522
+ "type": "presetRangeType[]"
1523
1523
  },
1524
1524
  {
1525
- "name": "configProps",
1526
- "description": "透传 antd ColorPicker 属性 [ColorPickerProps](https://ant.design/components/color-picker-cn#api)",
1525
+ "name": "validator",
1527
1526
  "attribute": false,
1528
- "type": "Partial<ColorPickerProps>"
1527
+ "type": "((value: any) => MessageBody | string)"
1529
1528
  }
1530
1529
  ],
1531
1530
  "events": [
1532
1531
  {
1533
1532
  "name": "change",
1534
- "description": "颜色变化事件, 返回值格式和`format`格式一致",
1533
+ "description": "时间段变化时触发",
1535
1534
  "detail": {
1536
- "type": "string | undefined"
1535
+ "type": "TimeRange"
1537
1536
  }
1538
1537
  }
1539
1538
  ],
1540
1539
  "slots": [],
1541
1540
  "methods": [],
1542
1541
  "parts": [],
1543
- "description": "构件 `eo-color-picker`"
1542
+ "description": "时间区间选择器",
1543
+ "category": "form-input-basic"
1544
1544
  },
1545
1545
  {
1546
1546
  "name": "eo-form-item",