@unicom-cloud/ui 0.8.98 → 0.8.100
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/Anchor.js +3 -1
- package/Badge.js +54 -7
- package/Copy.js +49 -2
- package/Flex.js +12 -0
- package/Grid.js +1 -1
- package/LiquidFill.js +60 -2
- package/Marquee.js +62 -0
- package/QrCode.js +14 -9
- package/Segmented.js +11 -0
- package/Space.js +14 -6
- package/Splitter.js +6 -0
- package/Tag.js +3 -2
- package/Tour.js +14 -9
- package/alert/index.js +38 -39
- package/anchor/index.js +5 -3
- package/badge/index.js +174 -80
- package/collapse/Collapse.js +54 -48
- package/components/common/space/index.js +90 -106
- package/copy/index.js +83 -35
- package/flex/index.js +59 -0
- package/flex/interface.js +34 -0
- package/flex/utils.js +13 -0
- package/grid/{GridItem.js → Item.js} +15 -15
- package/grid/index.js +1 -1
- package/index.js +490 -477
- package/input/Button.js +39 -34
- package/input/Textarea.js +108 -104
- package/liquid-fill/index.js +256 -2
- package/marquee/index.js +283 -0
- package/menu/Item.js +17 -16
- package/package.json +1 -1
- package/qr-code/index.js +54 -36
- package/rate/index.js +8 -8
- package/segmented/index.js +225 -0
- package/space/index.js +28 -29
- package/spin/index.js +75 -62
- package/splitter/Panel.js +39 -0
- package/splitter/SplitBar.js +157 -0
- package/splitter/Splitter.js +139 -0
- package/splitter/hooks/useEvent.js +12 -0
- package/splitter/hooks/useItems.js +26 -0
- package/splitter/hooks/useResizable.js +26 -0
- package/splitter/hooks/useResize.js +68 -0
- package/splitter/hooks/useSizes.js +60 -0
- package/splitter/index.js +7 -0
- package/splitter/interface.js +1 -0
- package/style.css +1 -1
- package/table/Table.js +1 -1
- package/table/hook/useThResizable.js +72 -26
- package/table/tbody/Td.js +80 -77
- package/table/th-resizable/index.js +92 -35
- package/tag/index.js +42 -41
- package/tooltip/index.js +89 -82
- package/tour/index.js +110 -89
- package/types/common/hooks/useMergeProps.d.ts +1 -1
- package/types/common/space/index.d.ts +7 -5
- package/types/common/space/interface.d.ts +29 -16
- package/types/pc/affix/interface.d.ts +0 -2
- package/types/pc/alert/index.d.ts +2 -2
- package/types/pc/anchor/index.d.ts +2 -1
- package/types/pc/anchor/interface.d.ts +0 -2
- package/types/pc/auto-complete/interface.d.ts +0 -6
- package/types/pc/avatar/interface.d.ts +0 -4
- package/types/pc/badge/index.d.ts +4 -4
- package/types/pc/badge/interface.d.ts +26 -0
- package/types/pc/breadcrumb/interface.d.ts +0 -3
- package/types/pc/carousel/interface.d.ts +2 -6
- package/types/pc/cascader/interface.d.ts +6 -18
- package/types/pc/checkbox/interface.d.ts +0 -1
- package/types/pc/collapse/interface.d.ts +4 -2
- package/types/pc/color-picker/interface.d.ts +0 -2
- package/types/pc/config-provider/interface.d.ts +16 -14
- package/types/pc/copy/interface.d.ts +2 -1
- package/types/pc/date-picker/RangePicker.d.ts +1 -1
- package/types/pc/date-picker/interface.d.ts +0 -17
- package/types/pc/descriptions/interface.d.ts +0 -1
- package/types/pc/drawer/interface.d.ts +0 -7
- package/types/pc/dropdown/interface.d.ts +0 -1
- package/types/pc/flex/index.d.ts +9 -0
- package/types/pc/flex/interface.d.ts +61 -0
- package/types/pc/flex/utils.d.ts +9 -0
- package/types/pc/form/interface.d.ts +9 -22
- package/types/pc/form/util.d.ts +1 -1
- package/types/pc/grid/index.d.ts +3 -3
- package/types/pc/grid/interface.d.ts +1 -6
- package/types/pc/image/interface.d.ts +0 -13
- package/types/pc/index.d.ts +16 -6
- package/types/pc/input/Textarea.d.ts +2 -6
- package/types/pc/input/interface.d.ts +5 -13
- package/types/pc/input-number/interface.d.ts +0 -4
- package/types/pc/input-tag/interface.d.ts +0 -13
- package/types/pc/layout/interface.d.ts +0 -1
- package/types/pc/link/interface.d.ts +0 -1
- package/types/pc/liquid-fill/index.d.ts +114 -1
- package/types/pc/list/interface.d.ts +0 -4
- package/types/pc/marquee/index.d.ts +61 -0
- package/types/pc/menu/context.d.ts +1 -1
- package/types/pc/menu/interface.d.ts +0 -8
- package/types/pc/message/interface.d.ts +0 -2
- package/types/pc/modal/interface.d.ts +0 -5
- package/types/pc/notification/interface.d.ts +0 -1
- package/types/pc/pagination/interface.d.ts +0 -2
- package/types/pc/popconfirm/interface.d.ts +8 -10
- package/types/pc/popover/interface.d.ts +0 -1
- package/types/pc/progress/interface.d.ts +0 -3
- package/types/pc/qr-code/index.d.ts +1 -1
- package/types/pc/rate/index.d.ts +2 -2
- package/types/pc/resize-box/interface.d.ts +1 -7
- package/types/pc/segmented/index.d.ts +8 -0
- package/types/pc/segmented/interface.d.ts +88 -0
- package/types/pc/select/interface.d.ts +0 -12
- package/types/pc/select-view/interface.d.ts +0 -7
- package/types/pc/slider/interface.d.ts +0 -4
- package/types/pc/space/index.d.ts +4 -1
- package/types/pc/space/interface.d.ts +6 -10
- package/types/pc/spin/interface.d.ts +4 -1
- package/types/pc/splitter/Panel.d.ts +8 -0
- package/types/pc/splitter/SplitBar.d.ts +21 -0
- package/types/pc/splitter/Splitter.d.ts +4 -0
- package/types/pc/splitter/hooks/useEvent.d.ts +3 -0
- package/types/pc/splitter/hooks/useItems.d.ts +10 -0
- package/types/pc/splitter/hooks/useResizable.d.ts +8 -0
- package/types/pc/splitter/hooks/useResize.d.ts +4 -0
- package/types/pc/splitter/hooks/useSizes.d.ts +5 -0
- package/types/pc/splitter/index.d.ts +8 -0
- package/types/pc/splitter/interface.d.ts +213 -0
- package/types/pc/statistic/interface.d.ts +0 -4
- package/types/pc/steps/interface.d.ts +0 -3
- package/types/pc/table/hook/useThResizable.d.ts +2 -2
- package/types/pc/table/interface.d.ts +4 -15
- package/types/pc/tabs/interface.d.ts +0 -7
- package/types/pc/tag/index.d.ts +2 -0
- package/types/pc/tag/interface.d.ts +0 -1
- package/types/pc/time-picker/interface.d.ts +0 -7
- package/types/pc/tooltip/interface.d.ts +4 -1
- package/types/pc/tour/index.d.ts +6 -1
- package/types/pc/transfer/interface.d.ts +2 -9
- package/types/pc/tree/interface.d.ts +2 -8
- package/types/pc/tree-select/interface.d.ts +0 -8
- package/types/pc/trigger/interface.d.ts +0 -5
- package/types/pc/typography/EditContent.d.ts +2 -1
- package/types/pc/typography/interface.d.ts +45 -30
- package/types/pc/upload/interface.d.ts +6 -11
- package/types/pc/utils/index.d.ts +1 -0
- package/types/pc/utils/names.d.ts +24 -0
- package/types/pc/utils/toArray.d.ts +7 -0
- package/types/pc/verification-code/interface.d.ts +0 -2
- package/types/pc/watermark/interface.d.ts +0 -2
- package/typography/Base.js +73 -73
- package/typography/EditContent.js +43 -33
- package/typography/Ellipsis.js +117 -184
- package/typography/Operations.js +97 -49
- package/typography/useCssEllipsis.js +7 -6
- package/utils/index.js +117 -115
- package/utils/names.js +16 -0
- package/utils/toArray.js +12 -0
- package/version/index.js +1 -1
- package/_virtual/_commonjsHelpers.js +0 -6
- package/_virtual/index.js +0 -7
- package/_virtual/index2.js +0 -4
- package/liquid-fill/LiquidFill.js +0 -226
- package/liquid-fill/LiquidFill2.js +0 -3
- package/space-/index.js +0 -93
- package/types/common/utils/color.d.ts +0 -1
- package/types/common/utils/computeScrollIntoView.d.ts +0 -1
- package/types/common/utils/index.d.ts +0 -45
- package/types/common/utils/math.d.ts +0 -1
- package/types/common/utils/reactTransitionGroup.d.ts +0 -1
- package/types/common/utils/tree.d.ts +0 -1
- package/types/common/utils/tween.d.ts +0 -1
- package/types/common/utils/uuid.d.ts +0 -1
- package/types/common/utils/validate.d.ts +0 -1
- package/types/pc/liquid-fill/LiquidFill.d.ts +0 -115
- package/types/pc/liquid-fill/LiquidFill2.d.ts +0 -1
- package/types/pc/space-/index.d.ts +0 -6
- package/types/pc/space-/interface.d.ts +0 -38
- /package/{space- → components/common/space}/toArray.js +0 -0
- /package/{space- → segmented}/interface.js +0 -0
- /package/types/{pc/space- → common/space}/toArray.d.ts +0 -0
- /package/types/pc/grid/{GridItem.d.ts → Item.d.ts} +0 -0
|
@@ -69,7 +69,6 @@ export interface FormProps<FormData = any, FieldValue = FormData[keyof FormData]
|
|
|
69
69
|
* @zh 是否在 required 的时候显示加重的红色星号,设置 position 可选择将星号置于 label 前/后
|
|
70
70
|
* @en Whether show red symbol when item is required,Set position props, you can choose to place the symbol before/after the label
|
|
71
71
|
* @defaultValue true
|
|
72
|
-
* @version `position` in 2.24.0
|
|
73
72
|
*/
|
|
74
73
|
requiredSymbol?: boolean | {
|
|
75
74
|
position: 'start' | 'end';
|
|
@@ -91,7 +90,6 @@ export interface FormProps<FormData = any, FieldValue = FormData[keyof FormData]
|
|
|
91
90
|
* @en
|
|
92
91
|
* When to trigger verification.
|
|
93
92
|
* @defaultValue onChange
|
|
94
|
-
* @version 2.28.0
|
|
95
93
|
*/
|
|
96
94
|
validateTrigger?: string | string[];
|
|
97
95
|
/**
|
|
@@ -121,19 +119,18 @@ export interface FormProps<FormData = any, FieldValue = FormData[keyof FormData]
|
|
|
121
119
|
*/
|
|
122
120
|
disabled?: boolean;
|
|
123
121
|
/**
|
|
124
|
-
* @zh 是否显示标签后的一个冒号,优先级小于 `Form.Item` 中 `colon` 的优先级。
|
|
125
|
-
* @en Whether show colon after `label`. Priority is lower than `colon` in `Form.Item`.
|
|
122
|
+
* @zh 是否显示标签后的一个冒号,优先级小于 `Form.Item` 中 `colon` 的优先级。
|
|
123
|
+
* @en Whether show colon after `label`. Priority is lower than `colon` in `Form.Item`.
|
|
126
124
|
*/
|
|
127
125
|
colon?: boolean | ReactNode;
|
|
128
126
|
/**
|
|
129
|
-
* @zh 验证失败后滚动到第一个错误字段。
|
|
130
|
-
* @en Whether scroll to first error item after validation fails.
|
|
127
|
+
* @zh 验证失败后滚动到第一个错误字段。
|
|
128
|
+
* @en Whether scroll to first error item after validation fails.
|
|
131
129
|
*/
|
|
132
130
|
scrollToFirstError?: boolean | ScrollIntoViewOptions;
|
|
133
131
|
/**
|
|
134
132
|
* @zh 校验提示信息模板 [demo](/react/component/form#表单校验信息模板)
|
|
135
133
|
* @en validation prompt template [demo](/react/en-US/component/form#validate%20messages)
|
|
136
|
-
* @version 2.32.0
|
|
137
134
|
*/
|
|
138
135
|
validateMessages?: Partial<{
|
|
139
136
|
[key in keyof ValidateMessagesTemplateType]: ValidateMessagesTemplateType[key] extends string ? ValidateMessagesTemplateType[key] | ((data: any, { label }: {
|
|
@@ -155,7 +152,6 @@ export interface FormProps<FormData = any, FieldValue = FormData[keyof FormData]
|
|
|
155
152
|
/**
|
|
156
153
|
* @zh 数据验证失败后回调事件
|
|
157
154
|
* @en Callback when validate fail
|
|
158
|
-
* @version 2.21.0
|
|
159
155
|
*/
|
|
160
156
|
onSubmitFailed?: (errors: {
|
|
161
157
|
[key: string]: FieldError;
|
|
@@ -213,7 +209,6 @@ export interface FormItemProps<FormData = any, FieldValue = FormData[keyof FormD
|
|
|
213
209
|
/**
|
|
214
210
|
* @zh 提示文本
|
|
215
211
|
* @en Tooltip text
|
|
216
|
-
* @version 2.43.0
|
|
217
212
|
*/
|
|
218
213
|
tooltip?: ReactNode | (TooltipProps & {
|
|
219
214
|
icon?: ReactElement;
|
|
@@ -232,8 +227,8 @@ export interface FormItemProps<FormData = any, FieldValue = FormData[keyof FormD
|
|
|
232
227
|
*/
|
|
233
228
|
wrapperCol?: ColProps;
|
|
234
229
|
/**
|
|
235
|
-
* @zh 是否显示标签后的一个冒号,优先级小于 `Form.Item` 中 `colon` 的优先级。
|
|
236
|
-
* @en Whether show colon after `label`. Priority is lower than `colon` in `Form.Item`.
|
|
230
|
+
* @zh 是否显示标签后的一个冒号,优先级小于 `Form.Item` 中 `colon` 的优先级。
|
|
231
|
+
* @en Whether show colon after `label`. Priority is lower than `colon` in `Form.Item`.
|
|
237
232
|
*/
|
|
238
233
|
colon?: boolean | ReactNode;
|
|
239
234
|
/**
|
|
@@ -261,7 +256,6 @@ export interface FormItemProps<FormData = any, FieldValue = FormData[keyof FormD
|
|
|
261
256
|
/**
|
|
262
257
|
* @zh 指定在子节点触发`onChange`事件时如何处理值。(如果自定义了`trigger`属性,那么这里的参数就是对应的事件回调函数的参数类型)
|
|
263
258
|
* @en Specify how to handle the value when the child node triggers the `onChange` event. (If the `trigger` attribute is customized, then the parameter here is the parameter type of the corresponding event callback function)
|
|
264
|
-
* @version 2.23.0
|
|
265
259
|
*/
|
|
266
260
|
getValueFromEvent?: (...args: any[]) => FieldValue;
|
|
267
261
|
/**
|
|
@@ -279,10 +273,10 @@ export interface FormItemProps<FormData = any, FieldValue = FormData[keyof FormD
|
|
|
279
273
|
/**
|
|
280
274
|
* @zh
|
|
281
275
|
* 不渲染任何外部标签/样式,只进行字段绑定。**注意**: 设置该属性为true时,该字段若未通过校验,
|
|
282
|
-
* 错误信息将不会显示出来。可以传入对象,并设置 showErrorTip
|
|
276
|
+
* 错误信息将不会显示出来。可以传入对象,并设置 showErrorTip 为true,错误信息将会展示在上层 formItem 节点下。
|
|
283
277
|
* @en
|
|
284
278
|
* No external tags/styles are rendered, only binding field. **Notice**: When set to true, if the field verification failed,
|
|
285
|
-
* the error message will not be displayed. You can pass in an object and set showErrorTip to true
|
|
279
|
+
* the error message will not be displayed. You can pass in an object and set showErrorTip to true,
|
|
286
280
|
* The error message will be displayed under the upper formItem node
|
|
287
281
|
*/
|
|
288
282
|
noStyle?: boolean | {
|
|
@@ -299,7 +293,6 @@ export interface FormItemProps<FormData = any, FieldValue = FormData[keyof FormD
|
|
|
299
293
|
/**
|
|
300
294
|
* @zh 隐藏表单项. 表单字段值仍然会被获取
|
|
301
295
|
* @en hide the form item
|
|
302
|
-
* @version
|
|
303
296
|
*/
|
|
304
297
|
hidden?: boolean;
|
|
305
298
|
/**
|
|
@@ -330,13 +323,11 @@ export interface FormItemProps<FormData = any, FieldValue = FormData[keyof FormD
|
|
|
330
323
|
/**
|
|
331
324
|
* @zh 将Form内保存的当前控件对应的值进行一定的转换,再传递给控件。
|
|
332
325
|
* @en Convert the `value` of the FormItem to children;
|
|
333
|
-
* @version 2.23.0
|
|
334
326
|
*/
|
|
335
327
|
formatter?: (value: FieldValue | undefined) => any;
|
|
336
328
|
/**
|
|
337
329
|
* @zh 设置依赖字段。当依赖的字段值改变时,触发自身的校验。如果是想动态渲染某个表单控件/表单区域,使用 shouldUpdate
|
|
338
330
|
* @en the dependency fields. When the value of the dependent field changes, trigger its own validation.If you want to dynamically render a form control/form area, use shouldUpdate
|
|
339
|
-
* @version 2.40.0
|
|
340
331
|
*/
|
|
341
332
|
dependencies?: string[];
|
|
342
333
|
/**
|
|
@@ -363,7 +354,6 @@ export interface FormItemProps<FormData = any, FieldValue = FormData[keyof FormD
|
|
|
363
354
|
* @zh 是否在 required 的时候显示加重的红色星号,设置 position 可选择将星号置于 label 前/后
|
|
364
355
|
* @en Whether show red symbol when item is required,Set position props, you can choose to place the symbol before/after the label
|
|
365
356
|
* @defaultValue true
|
|
366
|
-
* @version `position` in 2.24.0
|
|
367
357
|
*/
|
|
368
358
|
requiredSymbol?: boolean | {
|
|
369
359
|
position: 'start' | 'end';
|
|
@@ -417,19 +407,16 @@ export interface FormListProps<SubFieldValue = any, SubFieldKey extends KeyType
|
|
|
417
407
|
/**
|
|
418
408
|
* @zh 初始值
|
|
419
409
|
* @en Default value
|
|
420
|
-
* @version 2.22.0
|
|
421
410
|
*/
|
|
422
411
|
initialValue?: SubFieldValue[];
|
|
423
412
|
/**
|
|
424
413
|
* @zh FormItemProps['noStyle']. `rules` 存在时默认为 `false`(需要渲染校验信息),否则默认为 `true`
|
|
425
414
|
* @en FormItemProps['noStyle'].Defaults to `false` when `rules` exists (requires rendering validation information), otherwise defaults to `true`
|
|
426
|
-
* @version 2.46.0
|
|
427
415
|
*/
|
|
428
416
|
noStyle?: FormItemProps['noStyle'];
|
|
429
417
|
/**
|
|
430
418
|
* @zh 受控模式下的验证规则,[RulesProps](#rules)
|
|
431
419
|
* @en Validation rules in controlled component, [RulesProps](#rules)
|
|
432
|
-
* @version 2.46.0
|
|
433
420
|
*/
|
|
434
421
|
rules?: RulesProps<SubFieldValue[]>[];
|
|
435
422
|
/**
|
|
@@ -502,7 +489,7 @@ export declare const VALIDATE_STATUS: {
|
|
|
502
489
|
validating: string;
|
|
503
490
|
};
|
|
504
491
|
/**
|
|
505
|
-
* @title Form.Provider
|
|
492
|
+
* @title Form.Provider
|
|
506
493
|
*/
|
|
507
494
|
export interface FormProviderProps {
|
|
508
495
|
/**
|
package/types/pc/form/util.d.ts
CHANGED
package/types/pc/grid/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import Col from './Col';
|
|
2
2
|
import OriginGrid from './Grid';
|
|
3
|
-
import
|
|
3
|
+
import Item from './Item';
|
|
4
4
|
import Row from './Row';
|
|
5
5
|
declare const Grid: typeof OriginGrid & {
|
|
6
6
|
Col: typeof Col;
|
|
7
7
|
Row: typeof Row;
|
|
8
|
-
Item: typeof
|
|
8
|
+
Item: typeof Item;
|
|
9
9
|
};
|
|
10
|
-
export { Col, Col as GridCol, GridItem, Row as GridRow, Row };
|
|
10
|
+
export { Col, Col as GridCol, Item as GridItem, Row as GridRow, Row };
|
|
11
11
|
export default Grid;
|
|
12
12
|
export type { ColProps, GridProps, ResponsiveValue, RowProps, } from './interface';
|
|
@@ -13,7 +13,6 @@ export interface RowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNam
|
|
|
13
13
|
* @en
|
|
14
14
|
* Spacing between grids, could be a number or a object like { xs: 8, sm: 16, md: 24}.
|
|
15
15
|
* Or you can use array to make horizontal and vertical spacing work at the same time [horizontal, vertical]
|
|
16
|
-
* @version vertical gutter in 2.5.0
|
|
17
16
|
* @defaultValue 0
|
|
18
17
|
*/
|
|
19
18
|
gutter?: GridRowGutter | Array<GridRowGutter>;
|
|
@@ -60,13 +59,11 @@ export interface ColProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNam
|
|
|
60
59
|
/**
|
|
61
60
|
* @zh 对元素进行排序
|
|
62
61
|
* @en Raster order
|
|
63
|
-
* @version 2.20.0
|
|
64
62
|
*/
|
|
65
63
|
push?: number;
|
|
66
64
|
/**
|
|
67
65
|
* @zh 对元素进行排序
|
|
68
66
|
* @en Raster order
|
|
69
|
-
* @version 2.20.0
|
|
70
67
|
*/
|
|
71
68
|
pull?: number;
|
|
72
69
|
/**
|
|
@@ -114,7 +111,6 @@ export interface ColProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNam
|
|
|
114
111
|
/**
|
|
115
112
|
* @zh >= 2000px 响应式栅格
|
|
116
113
|
* @en `screen >= 2000px`
|
|
117
|
-
* @version 2.40.0
|
|
118
114
|
*/
|
|
119
115
|
xxxl?: number | {
|
|
120
116
|
[key: string]: any;
|
|
@@ -122,7 +118,6 @@ export interface ColProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNam
|
|
|
122
118
|
/**
|
|
123
119
|
* @zh 设置 flex 布局属性
|
|
124
120
|
* @en Set flex layout properties
|
|
125
|
-
* @version 2.26.0
|
|
126
121
|
*/
|
|
127
122
|
flex?: FlexType;
|
|
128
123
|
}
|
|
@@ -164,7 +159,7 @@ export interface GridProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNa
|
|
|
164
159
|
collapsedRows?: number;
|
|
165
160
|
}
|
|
166
161
|
/**
|
|
167
|
-
* @title
|
|
162
|
+
* @title Item
|
|
168
163
|
*/
|
|
169
164
|
export interface GridItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className'> {
|
|
170
165
|
style?: CSSProperties;
|
|
@@ -76,13 +76,11 @@ export interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, 'c
|
|
|
76
76
|
/**
|
|
77
77
|
* @zh 使用 `Image.PreviewGroup`包裹时的预览索引,一般不用指定,当多图预览顺序出现问题时,可手动指定当前 `image` 的预览顺序
|
|
78
78
|
* @en Use `Image.PreviewGroup` to wrap the preview index. Generally, you don't need to specify it. When there is a problem with the preview order of multiple images, you can manually specify the preview order of the current `image`
|
|
79
|
-
* @version 2.23.0
|
|
80
79
|
*/
|
|
81
80
|
index?: number;
|
|
82
81
|
/**
|
|
83
82
|
* @zh 开启懒加载 [Intersection_Observer](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API)
|
|
84
83
|
* @en lazyload loading [Intersection_Observer](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API)
|
|
85
|
-
* @version 2.47.0
|
|
86
84
|
*/
|
|
87
85
|
lazyload?: boolean | IntersectionObserverInit;
|
|
88
86
|
/**
|
|
@@ -110,13 +108,11 @@ export interface ImagePreviewProps {
|
|
|
110
108
|
/**
|
|
111
109
|
* @zh 图片属性,透传至预览弹窗中的 `img` 标签上
|
|
112
110
|
* @en Image props, passthrough to the `img` tag in the preview modal
|
|
113
|
-
* @version 2.39.0
|
|
114
111
|
*/
|
|
115
112
|
imgAttributes?: Omit<ImgHTMLAttributes<HTMLImageElement>, 'src'>;
|
|
116
113
|
/**
|
|
117
114
|
* @zh 自定义图片预览区域的额外节点
|
|
118
115
|
* @en Additional nodes add to the image preview area
|
|
119
|
-
* @version 2.53.0
|
|
120
116
|
*/
|
|
121
117
|
extra?: ReactNode;
|
|
122
118
|
/**
|
|
@@ -145,7 +141,6 @@ export interface ImagePreviewProps {
|
|
|
145
141
|
* @zh 是否显示关闭按钮
|
|
146
142
|
* @en Whether display close button
|
|
147
143
|
* @defaultValue true
|
|
148
|
-
* @version 2.16.0
|
|
149
144
|
*/
|
|
150
145
|
closable?: boolean;
|
|
151
146
|
/**
|
|
@@ -163,7 +158,6 @@ export interface ImagePreviewProps {
|
|
|
163
158
|
* @zh 在预览缩放时会使用当前数组中的缩放百分比。若不包含 `100%`,则会自动添加在最相邻的位置。
|
|
164
159
|
* @en The zoom percentage in the current array is used when previewing zooms. If `100%` is not included, the `100%` scale will be automatically added in the most adjacent position.
|
|
165
160
|
* @defaultValue [25, 33, 50, 67, 75, 80, 90, 100, 110, 125, 150, 175, 200, 250, 300, 400, 500];
|
|
166
|
-
* @version 2.30.0
|
|
167
161
|
*/
|
|
168
162
|
scales?: number[];
|
|
169
163
|
/**
|
|
@@ -175,35 +169,29 @@ export interface ImagePreviewProps {
|
|
|
175
169
|
* @zh 弹出层挂载的节点
|
|
176
170
|
* @en Get popup's parent node
|
|
177
171
|
* @defaultValue () => document.body
|
|
178
|
-
* @version 2.16.0
|
|
179
172
|
*/
|
|
180
173
|
getPopupContainer?: () => HTMLElement;
|
|
181
174
|
/**
|
|
182
175
|
* @zh 按 `ESC` 键关闭预览
|
|
183
176
|
* @en Whether to enable pressing `ESC` to close the preview.
|
|
184
177
|
* @defaultValue true
|
|
185
|
-
* @version 2.24.0
|
|
186
178
|
*/
|
|
187
179
|
escToExit?: boolean;
|
|
188
180
|
/**
|
|
189
181
|
* @zh 自定义 IMG 元素的渲染
|
|
190
182
|
* @en Rendering of custom IMG elements
|
|
191
|
-
* @version 2.58.0
|
|
192
183
|
*/
|
|
193
184
|
imageRender?: (originalNode: ReactElement) => ReactNode;
|
|
194
185
|
/**
|
|
195
186
|
* @zh 开启位置修正
|
|
196
187
|
* @en Enable position correction
|
|
197
188
|
* @defaultValue true
|
|
198
|
-
* @version 2.61.0
|
|
199
189
|
*/
|
|
200
190
|
resetTranslate?: boolean;
|
|
201
191
|
}
|
|
202
192
|
export type PartialImagePreviewProps = Partial<ImagePreviewProps>;
|
|
203
193
|
/**
|
|
204
194
|
* @title Image.PreviewGroup
|
|
205
|
-
* @zh 从 `v2.14.0` 开始支持
|
|
206
|
-
* @en Start from `v2.14.0`
|
|
207
195
|
*/
|
|
208
196
|
export interface ImagePreviewGroupProps extends Omit<PartialImagePreviewProps, 'src'> {
|
|
209
197
|
/**
|
|
@@ -229,7 +217,6 @@ export interface ImagePreviewGroupProps extends Omit<PartialImagePreviewProps, '
|
|
|
229
217
|
/**
|
|
230
218
|
* @zh 是否渲染图片列表,用于提前加载图片
|
|
231
219
|
* @en Whether to render the image list for loading images in advance
|
|
232
|
-
* @version 2.58.0
|
|
233
220
|
*/
|
|
234
221
|
forceRender?: boolean;
|
|
235
222
|
/**
|
package/types/pc/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export * from './hooks';
|
|
|
2
2
|
export * from './utils';
|
|
3
3
|
export { default as Affix } from './affix';
|
|
4
4
|
export { default as Alert } from './alert';
|
|
5
|
-
export { default as Anchor, AnchorLink } from './anchor';
|
|
5
|
+
export { default as Anchor, AnchorLink, findAnchorLinkNode } from './anchor';
|
|
6
6
|
export { default as AutoComplete, AutoCompleteOptGroup, AutoCompleteOption, } from './auto-complete';
|
|
7
7
|
export { default as Avatar, AvatarGroup } from './avatar';
|
|
8
8
|
export { default as BackTop } from './back-top';
|
|
@@ -73,6 +73,8 @@ export type { DividerProps } from './divider/interface';
|
|
|
73
73
|
export type { DrawerProps } from './drawer/interface';
|
|
74
74
|
export type { DropdownButtonProps, DropdownProps } from './dropdown/interface';
|
|
75
75
|
export type { EmptyProps } from './empty/interface';
|
|
76
|
+
export { default as Flex, FlexVertical } from './flex';
|
|
77
|
+
export type { FlexProps } from './flex/interface';
|
|
76
78
|
export type { FormInstance, FormItemProps, FormListProps, FormProps, RulesProps, } from './form/interface';
|
|
77
79
|
export type { ColProps, GridItemProps, GridProps, RowProps, } from './grid/interface';
|
|
78
80
|
export { default as IconHover } from './icon-hover';
|
|
@@ -83,8 +85,11 @@ export type { InputProps, TextAreaProps } from './input/interface';
|
|
|
83
85
|
export type { ContentProps, FooterProps, HeaderProps, LayoutProps, SiderProps, } from './layout/interface';
|
|
84
86
|
export type { LinkProps } from './link/interface';
|
|
85
87
|
export { default as LiquidFill } from './liquid-fill';
|
|
88
|
+
export type { LiquidFillProps } from './liquid-fill';
|
|
86
89
|
export type { ListItemMetaProps, ListItemProps, ListProps, } from './list/interface';
|
|
87
90
|
export { default as Loading } from './loading';
|
|
91
|
+
export { default as Marquee } from './marquee';
|
|
92
|
+
export type { MarqueeProps } from './marquee';
|
|
88
93
|
export type { MentionsProps } from './mentions/interface';
|
|
89
94
|
export type { MenuItemGroupProps, MenuItemProps, MenuProps, MenuSubMenuProps, } from './menu/interface';
|
|
90
95
|
export type { MessageHookReturnType, MessageProps } from './message/interface';
|
|
@@ -96,6 +101,7 @@ export type { PopconfirmProps } from './popconfirm/interface';
|
|
|
96
101
|
export type { PopoverProps } from './popover/interface';
|
|
97
102
|
export type { ProgressProps } from './progress/interface';
|
|
98
103
|
export { default as QRCode } from './qr-code';
|
|
104
|
+
export type { QRCodeProps } from './qr-code';
|
|
99
105
|
export { default as Radio, RadioGroup, RadioGroupBlock, RadioGroupContext, } from './radio';
|
|
100
106
|
export type { RadioGroupProps, RadioProps } from './radio/interface';
|
|
101
107
|
export { default as Rate } from './rate';
|
|
@@ -104,19 +110,22 @@ export { default as ResizeBox, ResizeBoxSplit, ResizeBoxSplitGroup, } from './re
|
|
|
104
110
|
export type { ResizeBoxProps } from './resize-box/interface';
|
|
105
111
|
export { default as Result } from './result';
|
|
106
112
|
export type { ResultProps } from './result/interface';
|
|
113
|
+
export { default as Segmented } from './segmented';
|
|
114
|
+
export type { SegmentedProps } from './segmented/interface';
|
|
107
115
|
export { default as Select, SelectOption, SelectOptionGroup } from './select';
|
|
108
116
|
export type { OptGroupProps as SelectOptionGroupProps, OptionProps as SelectOptionProps, SelectProps, } from './select/interface';
|
|
109
117
|
export { default as Skeleton } from './skeleton';
|
|
110
118
|
export type { SkeletonImageProps, SkeletonProps, SkeletonTextProps, } from './skeleton/interface';
|
|
111
119
|
export { default as Slider } from './slider';
|
|
112
120
|
export type { SliderProps } from './slider/interface';
|
|
113
|
-
export { default as Space,
|
|
114
|
-
|
|
115
|
-
export type { SpaceProps
|
|
116
|
-
export type { SpaceProps } from './space/interface';
|
|
121
|
+
export { default as Space, default as Space_, // 历史原因,要兼容一些项目的名字
|
|
122
|
+
SpaceVertical, SpaceVertical as SpaceVertical_, } from './space';
|
|
123
|
+
export type { SpaceGap, SpaceProps } from './space/interface';
|
|
117
124
|
export { default as SpeechSynthesis } from './speech-synthesis';
|
|
118
125
|
export { default as Spin } from './spin';
|
|
119
126
|
export type { SpinProps } from './spin/interface';
|
|
127
|
+
export { default as Splitter } from './splitter';
|
|
128
|
+
export type { SplitterProps } from './splitter/interface';
|
|
120
129
|
export { default as Statistic, StatisticCountdown } from './statistic';
|
|
121
130
|
export type { CountdownProps, StatisticProps } from './statistic/interface';
|
|
122
131
|
export { default as Steps, StepsItem, StepsStep } from './steps';
|
|
@@ -129,7 +138,7 @@ export type { ColumnProps as TableColumnProps, TableProps, RowSelectionProps as
|
|
|
129
138
|
export type { TableInstance } from './table/Table';
|
|
130
139
|
export { TabPane, default as Tabs, TabsTabPane } from './tabs';
|
|
131
140
|
export type { TabsProps } from './tabs/interface';
|
|
132
|
-
export { default as Tag } from './tag';
|
|
141
|
+
export { default as Tag, TAG_COLORS } from './tag';
|
|
133
142
|
export type { TagProps } from './tag/interface';
|
|
134
143
|
export { default as TimePicker, TimePickerRange } from './time-picker';
|
|
135
144
|
export type { TimePickerProps, RangePickerProps as TimeRangePickerProps, } from './time-picker/interface';
|
|
@@ -138,6 +147,7 @@ export type { TimelineItemProps, TimelineProps } from './timeline/interface';
|
|
|
138
147
|
export { default as Tooltip } from './tooltip';
|
|
139
148
|
export type { TooltipProps } from './tooltip/interface';
|
|
140
149
|
export { default as Tour } from './tour';
|
|
150
|
+
export type { TourProps } from './tour';
|
|
141
151
|
export { default as Transfer } from './transfer';
|
|
142
152
|
export type { TransferItemProps, TransferProps } from './transfer/interface';
|
|
143
153
|
export { default as Tree, TreeNode } from './tree';
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TextAreaProps } from './interface';
|
|
2
|
+
import { TextAreaProps, type RefInputType } from './interface';
|
|
3
3
|
export type RefTextAreaType = {
|
|
4
|
-
/** 使输入框失去焦点 */
|
|
5
|
-
blur: () => void;
|
|
6
|
-
/** 使输入框获取焦点 */
|
|
7
|
-
focus: () => void;
|
|
8
4
|
/** textarea dom元素 */
|
|
9
5
|
dom: HTMLTextAreaElement;
|
|
10
|
-
};
|
|
6
|
+
} & RefInputType;
|
|
11
7
|
declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<RefTextAreaType>>;
|
|
12
8
|
export default TextArea;
|
|
@@ -43,13 +43,11 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
43
43
|
/**
|
|
44
44
|
* @zh 状态
|
|
45
45
|
* @en Status
|
|
46
|
-
* @version 2.45.0
|
|
47
46
|
*/
|
|
48
|
-
status?: 'error' | 'warning';
|
|
47
|
+
status?: 'error' | 'warning' | 'success';
|
|
49
48
|
/**
|
|
50
49
|
* @zh 设置宽度自适应。minWidth 默认为 0,maxWidth 默认为 100%
|
|
51
50
|
* @en auto width. minWidth defaults to 0, maxWidth defaults to 100%
|
|
52
|
-
* @version 2.54.0
|
|
53
51
|
*/
|
|
54
52
|
autoWidth?: boolean | {
|
|
55
53
|
minWidth?: CSSProperties['minWidth'];
|
|
@@ -74,14 +72,12 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
74
72
|
/**
|
|
75
73
|
* @zh 指定 normalize 执行的时机
|
|
76
74
|
* @en Specify the timing of normalize execution
|
|
77
|
-
* @version 2.50.0
|
|
78
75
|
* @defaultValue ['onBlur']
|
|
79
76
|
*/
|
|
80
77
|
normalizeTrigger?: ('onBlur' | 'onPressEnter')[];
|
|
81
78
|
/**
|
|
82
79
|
* @zh 在指定时机对用户输入的值进行格式化处理。前后值不一致时,会触发 onChange
|
|
83
80
|
* @en Format the value entered by the user at the specified time, and when the previous and subsequent values are inconsistent, onChange will be triggered
|
|
84
|
-
* @version 2.50.0
|
|
85
81
|
*/
|
|
86
82
|
normalize?: (value: string) => string;
|
|
87
83
|
/**
|
|
@@ -133,7 +129,6 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
133
129
|
/**
|
|
134
130
|
* @zh 输入框最大输入的长度;设置 `errorOnly`为 `true` 后,超过 `maxLength` 会展示 `error` 状态,并不限制用户输入。
|
|
135
131
|
* @en The max content length;After setting `errorOnly` to `true`, if `maxLength` is exceeded, the `error` status will be displayed, and user input will not be restricted.
|
|
136
|
-
* @version `errorOnly` in 2.23.0
|
|
137
132
|
*/
|
|
138
133
|
maxLength?: number | {
|
|
139
134
|
length: number;
|
|
@@ -147,7 +142,6 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
147
142
|
/**
|
|
148
143
|
* @zh `allowClear` 时配置清除按钮的图标。
|
|
149
144
|
* @en Configure the icon of the clear button when `allowClear`.
|
|
150
|
-
* @version 2.50.0
|
|
151
145
|
*/
|
|
152
146
|
clearIcon?: ReactNode;
|
|
153
147
|
}
|
|
@@ -185,6 +179,10 @@ export interface TextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaE
|
|
|
185
179
|
minRows?: number;
|
|
186
180
|
maxRows?: number;
|
|
187
181
|
};
|
|
182
|
+
/**
|
|
183
|
+
* @zh 用于设置元素是否可调整尺寸,以及可调整的方向
|
|
184
|
+
*/
|
|
185
|
+
resize?: 'none' | 'both' | 'horizontal' | 'vertical' | 'block' | 'inline' | 'inherit' | 'initial' | 'revert' | 'revert-layer' | 'unset';
|
|
188
186
|
/**
|
|
189
187
|
* @zh 是否是错误状态。(废弃,下个大版本移除,使用 status='error' 替代)
|
|
190
188
|
* @en Whether the textarea is error.(Deprecated, removed in the next major version, use status='error' instead)
|
|
@@ -194,7 +192,6 @@ export interface TextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaE
|
|
|
194
192
|
/**
|
|
195
193
|
* @zh 状态
|
|
196
194
|
* @en Status
|
|
197
|
-
* @version 2.45.0
|
|
198
195
|
*/
|
|
199
196
|
status?: 'error' | 'warning';
|
|
200
197
|
/**
|
|
@@ -215,7 +212,6 @@ export interface TextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaE
|
|
|
215
212
|
/**
|
|
216
213
|
* @zh 输入框最大输入的长度;设置 `errorOnly`为 `true` 后,超过 `maxLength` 会展示 `error` 状态,并不限制用户输入。
|
|
217
214
|
* @en The max content length;After setting `errorOnly` to `true`, if `maxLength` is exceeded, the `error` status will be displayed, and user input will not be restricted.
|
|
218
|
-
* @version `errorOnly` in 2.23.0
|
|
219
215
|
*/
|
|
220
216
|
maxLength?: number | {
|
|
221
217
|
length: number;
|
|
@@ -225,19 +221,16 @@ export interface TextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaE
|
|
|
225
221
|
/**
|
|
226
222
|
* @zh 允许清空输入框
|
|
227
223
|
* @en Whether allow clear the content
|
|
228
|
-
* @version 2.2.0
|
|
229
224
|
*/
|
|
230
225
|
allowClear?: boolean;
|
|
231
226
|
/**
|
|
232
227
|
* @zh 点击清除按钮的回调
|
|
233
228
|
* @en Callback when click clear button
|
|
234
|
-
* @version 2.2.0
|
|
235
229
|
*/
|
|
236
230
|
onClear?: () => void;
|
|
237
231
|
/**
|
|
238
232
|
* @zh `allowClear` 时配置清除按钮的图标。
|
|
239
233
|
* @en Configure the icon of the clear button when `allowClear`.
|
|
240
|
-
* @version 2.50.0
|
|
241
234
|
*/
|
|
242
235
|
clearIcon?: ReactNode;
|
|
243
236
|
}
|
|
@@ -289,7 +282,6 @@ export interface InputSearchProps extends InputButtonProps {
|
|
|
289
282
|
/**
|
|
290
283
|
* @zh 搜索按钮
|
|
291
284
|
* @en Search button
|
|
292
|
-
* @version `ReactNode` in 2.6.0
|
|
293
285
|
*/
|
|
294
286
|
searchButton?: boolean | ReactNode;
|
|
295
287
|
}
|
|
@@ -42,13 +42,11 @@ export interface InputNumberProps extends Omit<InputHTMLAttributes<HTMLInputElem
|
|
|
42
42
|
/**
|
|
43
43
|
* @zh 是否只读
|
|
44
44
|
* @en Whether input is readonly
|
|
45
|
-
* @version 2.17.0
|
|
46
45
|
*/
|
|
47
46
|
readOnly?: boolean;
|
|
48
47
|
/**
|
|
49
48
|
* @zh 严格模式下,`onChange` 回调将返回字符串类型
|
|
50
49
|
* @en `onChange` will return a string in strict mode
|
|
51
|
-
* @version 2.42.0
|
|
52
50
|
*/
|
|
53
51
|
strictMode?: boolean;
|
|
54
52
|
/**
|
|
@@ -90,7 +88,6 @@ export interface InputNumberProps extends Omit<InputHTMLAttributes<HTMLInputElem
|
|
|
90
88
|
/**
|
|
91
89
|
* @zh 定义输入框展示值
|
|
92
90
|
* @en Specifies the format of the value presented
|
|
93
|
-
* @version Param `info` in `2.41.0`
|
|
94
91
|
*/
|
|
95
92
|
formatter?: (value: number | string, info: {
|
|
96
93
|
userTyping: boolean;
|
|
@@ -105,7 +102,6 @@ export interface InputNumberProps extends Omit<InputHTMLAttributes<HTMLInputElem
|
|
|
105
102
|
/**
|
|
106
103
|
* @zh 变化回调
|
|
107
104
|
* @en Callback when the value changes
|
|
108
|
-
* @version `reason` in 2.61.0
|
|
109
105
|
*/
|
|
110
106
|
onChange?: (value: number, reason?: InputNumberValueChangeReason) => void;
|
|
111
107
|
/**
|
|
@@ -31,7 +31,6 @@ export interface InputTagProps<T = unknown> {
|
|
|
31
31
|
/**
|
|
32
32
|
* @zh 状态
|
|
33
33
|
* @en Status
|
|
34
|
-
* @version 2.45.0
|
|
35
34
|
*/
|
|
36
35
|
status?: 'error' | 'warning';
|
|
37
36
|
/**
|
|
@@ -57,14 +56,12 @@ export interface InputTagProps<T = unknown> {
|
|
|
57
56
|
/**
|
|
58
57
|
* @zh 是否为内部标签变化添加动画。
|
|
59
58
|
* @en Whether to add animation for internal label changes
|
|
60
|
-
* @version 2.15.0
|
|
61
59
|
* @defaultValue true
|
|
62
60
|
*/
|
|
63
61
|
animation?: boolean;
|
|
64
62
|
/**
|
|
65
63
|
* @zh 是否在失焦时自动存储正在输入的文本
|
|
66
64
|
* @en Whether to automatically store the text entering when blur InputTag
|
|
67
|
-
* @version 2.25.0
|
|
68
65
|
*/
|
|
69
66
|
saveOnBlur?: boolean;
|
|
70
67
|
/**
|
|
@@ -90,13 +87,11 @@ export interface InputTagProps<T = unknown> {
|
|
|
90
87
|
/**
|
|
91
88
|
* @zh 是否可以通过拖拽为 Tag 排序
|
|
92
89
|
* @en Weather it is possible to sort tags by drag
|
|
93
|
-
* @version 2.27.0
|
|
94
90
|
*/
|
|
95
91
|
dragToSort?: boolean;
|
|
96
92
|
/**
|
|
97
93
|
* @zh 最多显示多少个 `tag`
|
|
98
94
|
* @en The maximum number of `tags` is displayed
|
|
99
|
-
* @version 2.59.0. `responsive ` in `2.62.0`
|
|
100
95
|
*/
|
|
101
96
|
maxTagCount?: number | 'responsive' | {
|
|
102
97
|
count: number | 'responsive';
|
|
@@ -106,7 +101,6 @@ export interface InputTagProps<T = unknown> {
|
|
|
106
101
|
/**
|
|
107
102
|
* @zh 添加前缀文字或者图标
|
|
108
103
|
* @en The prefix icon or text for the input-tag
|
|
109
|
-
* @version 2.47.0
|
|
110
104
|
*/
|
|
111
105
|
prefix?: ReactNode;
|
|
112
106
|
/**
|
|
@@ -117,13 +111,11 @@ export interface InputTagProps<T = unknown> {
|
|
|
117
111
|
/**
|
|
118
112
|
* @zh 输入框前添加元素
|
|
119
113
|
* @en The label text displayed before (on the left side of) the input-tag field
|
|
120
|
-
* @version 2.47.0
|
|
121
114
|
*/
|
|
122
115
|
addBefore?: ReactNode;
|
|
123
116
|
/**
|
|
124
117
|
* @zh 输入框后添加元素
|
|
125
118
|
* @en The label text displayed after (on the right side of) the input-tag field
|
|
126
|
-
* @version 2.47.0
|
|
127
119
|
*/
|
|
128
120
|
addAfter?: ReactNode;
|
|
129
121
|
/**
|
|
@@ -137,20 +129,17 @@ export interface InputTagProps<T = unknown> {
|
|
|
137
129
|
/**
|
|
138
130
|
* @zh 触发自动分词的分隔符
|
|
139
131
|
* @en Separator used to tokenize
|
|
140
|
-
* @version 2.44.0
|
|
141
132
|
*/
|
|
142
133
|
tokenSeparators?: string[];
|
|
143
134
|
/**
|
|
144
135
|
* @zh 校验函数,默认在 按下enter时候触发。
|
|
145
136
|
* @en Function to check user's input, which is triggered when `Enter` is pressed
|
|
146
137
|
* @defaultValue (inputValue, values) => inputValue && values.every((item) => item !== inputValue)
|
|
147
|
-
* @version return type T and `Promise<T>` in 2.37.0
|
|
148
138
|
*/
|
|
149
139
|
validate?: (inputValue: string, values: T[]) => boolean | Promise<boolean> | T | Promise<T>;
|
|
150
140
|
/**
|
|
151
141
|
* @zh 自定义标签渲染,`props` 为当前标签属性,`index` 为当前标签的顺序,`values` 为所有标签的值.
|
|
152
142
|
* @en Custom tag rendering, `props` is the current tag attribute, `index` is the order of the current tag, `values` is the value of all tags
|
|
153
|
-
* @version index、values added in 2.15.0
|
|
154
143
|
*/
|
|
155
144
|
renderTag?: (props: {
|
|
156
145
|
value: any;
|
|
@@ -166,7 +155,6 @@ export interface InputTagProps<T = unknown> {
|
|
|
166
155
|
/**
|
|
167
156
|
* @zh 控件值改变时触发
|
|
168
157
|
* @en Callback when value changes
|
|
169
|
-
* @version `reason` in 2.27.0
|
|
170
158
|
*/
|
|
171
159
|
onChange?: (value: T[], reason: ValueChangeReason) => void;
|
|
172
160
|
/**
|
|
@@ -202,7 +190,6 @@ export interface InputTagProps<T = unknown> {
|
|
|
202
190
|
/**
|
|
203
191
|
* @zh 点击清除按钮的回调
|
|
204
192
|
* @en Callback when clear button is clicked
|
|
205
|
-
* @version 2.20.0
|
|
206
193
|
*/
|
|
207
194
|
onClear?: () => void;
|
|
208
195
|
/**
|
|
@@ -113,7 +113,6 @@ export interface SiderProps {
|
|
|
113
113
|
/**
|
|
114
114
|
* @zh 可以接受 `ResizeBox` 所有参数,在伸缩开启时,可以通过 `resizeBoxProps` 对菜单栏的 `width` 进行受控展示或者与 `collapsed` 联动
|
|
115
115
|
* @en All props of `ResizeBox` can be accepted. The `width` of the menu bar can be displayed in a controlled manner through `resizeBoxProps` or linked with `collapsed`
|
|
116
|
-
* @version 2.34.0
|
|
117
116
|
*/
|
|
118
117
|
resizeBoxProps?: ResizeBoxProps;
|
|
119
118
|
onSiderMount?: (id: string) => void;
|