@unicom-cloud/ui 0.8.99 → 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.
Files changed (136) hide show
  1. package/Anchor.js +3 -1
  2. package/Badge.js +7 -6
  3. package/Copy.js +49 -2
  4. package/Flex.js +12 -0
  5. package/Grid.js +1 -1
  6. package/LiquidFill.js +3 -2
  7. package/Marquee.js +3 -2
  8. package/QrCode.js +3 -2
  9. package/Splitter.js +4 -5
  10. package/Tag.js +3 -2
  11. package/Tour.js +3 -2
  12. package/alert/index.js +38 -39
  13. package/anchor/index.js +5 -3
  14. package/badge/index.js +19 -18
  15. package/copy/index.js +83 -35
  16. package/flex/index.js +59 -0
  17. package/flex/interface.js +34 -0
  18. package/flex/utils.js +13 -0
  19. package/grid/{GridItem.js → Item.js} +15 -15
  20. package/grid/index.js +1 -1
  21. package/index.js +503 -493
  22. package/input/Button.js +39 -34
  23. package/input/Textarea.js +108 -104
  24. package/liquid-fill/index.js +3 -2
  25. package/marquee/index.js +3 -2
  26. package/package.json +1 -1
  27. package/qr-code/index.js +3 -2
  28. package/segmented/index.js +112 -104
  29. package/spin/index.js +75 -62
  30. package/splitter/Panel.js +39 -0
  31. package/splitter/SplitBar.js +157 -0
  32. package/splitter/Splitter.js +139 -0
  33. package/splitter/hooks/useEvent.js +12 -0
  34. package/splitter/hooks/useItems.js +26 -0
  35. package/splitter/hooks/useResizable.js +26 -0
  36. package/splitter/hooks/useResize.js +68 -0
  37. package/splitter/hooks/useSizes.js +60 -0
  38. package/splitter/index.js +5 -115
  39. package/style.css +1 -1
  40. package/table/Table.js +1 -1
  41. package/table/hook/useThResizable.js +72 -26
  42. package/table/tbody/Td.js +80 -77
  43. package/table/th-resizable/index.js +92 -35
  44. package/tag/index.js +42 -41
  45. package/tooltip/index.js +89 -82
  46. package/tour/index.js +5 -6
  47. package/types/common/space/index.d.ts +2 -1
  48. package/types/pc/affix/interface.d.ts +0 -2
  49. package/types/pc/alert/index.d.ts +2 -2
  50. package/types/pc/anchor/index.d.ts +2 -1
  51. package/types/pc/anchor/interface.d.ts +0 -2
  52. package/types/pc/auto-complete/interface.d.ts +0 -6
  53. package/types/pc/avatar/interface.d.ts +0 -4
  54. package/types/pc/breadcrumb/interface.d.ts +0 -3
  55. package/types/pc/carousel/interface.d.ts +2 -6
  56. package/types/pc/cascader/interface.d.ts +6 -18
  57. package/types/pc/checkbox/interface.d.ts +0 -1
  58. package/types/pc/collapse/interface.d.ts +0 -2
  59. package/types/pc/color-picker/interface.d.ts +0 -2
  60. package/types/pc/config-provider/interface.d.ts +13 -17
  61. package/types/pc/copy/interface.d.ts +2 -1
  62. package/types/pc/date-picker/interface.d.ts +0 -17
  63. package/types/pc/descriptions/interface.d.ts +0 -1
  64. package/types/pc/drawer/interface.d.ts +0 -7
  65. package/types/pc/dropdown/interface.d.ts +0 -1
  66. package/types/pc/flex/index.d.ts +9 -0
  67. package/types/pc/flex/interface.d.ts +61 -0
  68. package/types/pc/flex/utils.d.ts +9 -0
  69. package/types/pc/form/interface.d.ts +9 -22
  70. package/types/pc/form/util.d.ts +1 -1
  71. package/types/pc/grid/index.d.ts +3 -3
  72. package/types/pc/grid/interface.d.ts +1 -6
  73. package/types/pc/image/interface.d.ts +0 -13
  74. package/types/pc/index.d.ts +6 -2
  75. package/types/pc/input/Textarea.d.ts +2 -6
  76. package/types/pc/input/interface.d.ts +5 -13
  77. package/types/pc/input-number/interface.d.ts +0 -4
  78. package/types/pc/input-tag/interface.d.ts +0 -13
  79. package/types/pc/layout/interface.d.ts +0 -1
  80. package/types/pc/link/interface.d.ts +0 -1
  81. package/types/pc/list/interface.d.ts +0 -4
  82. package/types/pc/menu/interface.d.ts +0 -8
  83. package/types/pc/message/interface.d.ts +0 -2
  84. package/types/pc/modal/interface.d.ts +0 -5
  85. package/types/pc/notification/interface.d.ts +0 -1
  86. package/types/pc/pagination/interface.d.ts +0 -2
  87. package/types/pc/popconfirm/interface.d.ts +8 -10
  88. package/types/pc/popover/interface.d.ts +0 -1
  89. package/types/pc/progress/interface.d.ts +0 -3
  90. package/types/pc/resize-box/interface.d.ts +1 -7
  91. package/types/pc/select/interface.d.ts +0 -12
  92. package/types/pc/select-view/interface.d.ts +0 -7
  93. package/types/pc/slider/interface.d.ts +0 -4
  94. package/types/pc/space/index.d.ts +1 -0
  95. package/types/pc/spin/interface.d.ts +4 -1
  96. package/types/pc/splitter/Panel.d.ts +8 -0
  97. package/types/pc/splitter/SplitBar.d.ts +21 -0
  98. package/types/pc/splitter/Splitter.d.ts +4 -0
  99. package/types/pc/splitter/hooks/useEvent.d.ts +3 -0
  100. package/types/pc/splitter/hooks/useItems.d.ts +10 -0
  101. package/types/pc/splitter/hooks/useResizable.d.ts +8 -0
  102. package/types/pc/splitter/hooks/useResize.d.ts +4 -0
  103. package/types/pc/splitter/hooks/useSizes.d.ts +5 -0
  104. package/types/pc/splitter/index.d.ts +8 -4
  105. package/types/pc/splitter/interface.d.ts +181 -38
  106. package/types/pc/statistic/interface.d.ts +0 -4
  107. package/types/pc/steps/interface.d.ts +0 -3
  108. package/types/pc/table/hook/useThResizable.d.ts +2 -2
  109. package/types/pc/table/interface.d.ts +4 -15
  110. package/types/pc/tabs/interface.d.ts +0 -7
  111. package/types/pc/tag/index.d.ts +2 -0
  112. package/types/pc/tag/interface.d.ts +0 -1
  113. package/types/pc/time-picker/interface.d.ts +0 -7
  114. package/types/pc/tooltip/interface.d.ts +4 -1
  115. package/types/pc/transfer/interface.d.ts +2 -9
  116. package/types/pc/tree/interface.d.ts +2 -8
  117. package/types/pc/tree-select/interface.d.ts +0 -8
  118. package/types/pc/trigger/interface.d.ts +0 -5
  119. package/types/pc/typography/EditContent.d.ts +2 -1
  120. package/types/pc/typography/interface.d.ts +45 -30
  121. package/types/pc/upload/interface.d.ts +6 -11
  122. package/types/pc/utils/index.d.ts +1 -0
  123. package/types/pc/utils/names.d.ts +6 -0
  124. package/types/pc/utils/toArray.d.ts +7 -0
  125. package/types/pc/verification-code/interface.d.ts +0 -2
  126. package/types/pc/watermark/interface.d.ts +0 -2
  127. package/typography/Base.js +73 -73
  128. package/typography/EditContent.js +43 -33
  129. package/typography/Ellipsis.js +117 -184
  130. package/typography/Operations.js +97 -49
  131. package/typography/useCssEllipsis.js +7 -6
  132. package/utils/index.js +117 -115
  133. package/utils/names.js +4 -0
  134. package/utils/toArray.js +12 -0
  135. package/version/index.js +1 -1
  136. /package/types/pc/grid/{GridItem.d.ts → Item.d.ts} +0 -0
@@ -1,70 +1,213 @@
1
- import { CSSProperties, ReactNode } from 'react';
1
+ import React from 'react';
2
2
  /**
3
- * @title Splitter 分隔面板
3
+ * Splitter 组件属性接口
4
4
  */
5
5
  export interface SplitterProps {
6
6
  /**
7
- * 分割方向
8
- * @default 'horizontal'
7
+ * @zh 自定义类名前缀
8
+ * @en Custom prefix class name
9
9
  */
10
- direction?: 'horizontal' | 'vertical';
10
+ prefixCls?: string;
11
11
  /**
12
- * 初始分割比例 (0~1)
13
- * @default 0.5
12
+ * @zh 自定义类名(字符串或数组)
13
+ * @en Custom class name (string or array)
14
14
  */
15
- initialSize?: number;
15
+ className?: string | string[];
16
16
  /**
17
- * 第一个面板最小尺寸
18
- * @default '10%'
17
+ * @zh 自定义样式
18
+ * @en Custom style
19
19
  */
20
- minSize?: number | string;
20
+ style?: React.CSSProperties;
21
21
  /**
22
- * 第一个面板最大尺寸
23
- * @default '90%'
22
+ * @zh 根节点类名
23
+ * @en Root node class name
24
24
  */
25
- maxSize?: number | string;
25
+ rootClassName?: string;
26
26
  /**
27
- * 分隔条尺寸(像素)
28
- * @default 8
27
+ * @zh 布局方向
28
+ * @defaultValue 'horizontal'
29
+ * @en Layout direction
29
30
  */
30
- gutterSize?: number;
31
+ layout?: 'horizontal' | 'vertical';
31
32
  /**
32
- * 分隔条样式
33
+ * @zh 开始调整大小时的回调
34
+ * @en Callback when resize starts
35
+ * @param sizes - 各面板当前尺寸数组
33
36
  */
34
- gutterStyle?: CSSProperties;
37
+ onResizeStart?: (sizes: number[]) => void;
35
38
  /**
36
- * 是否禁用拖拽
37
- * @default false
39
+ * @zh 调整大小过程中的回调
40
+ * @en Callback during resizing
41
+ * @param sizes - 各面板当前尺寸数组
38
42
  */
39
- disabled?: boolean;
43
+ onResize?: (sizes: number[]) => void;
40
44
  /**
41
- * 拖拽开始回调
45
+ * @zh 调整大小结束时的回调
46
+ * @en Callback when resize ends
47
+ * @param sizes - 各面板最终尺寸数组
42
48
  */
43
- onDragStart?: () => void;
49
+ onResizeEnd?: (sizes: number[]) => void;
44
50
  /**
45
- * 拖拽结束回调
46
- * @param newSize - 新分割比例 (0~1)
51
+ * @zh 是否启用懒加载模式(只在拖动结束时触发回调)
52
+ * @en Whether to enable lazy mode (only trigger callback when drag ends)
47
53
  */
48
- onDragEnd?: (newSize: number) => void;
54
+ lazy?: boolean;
55
+ }
56
+ /**
57
+ * Splitter.Panel 组件属性接口
58
+ */
59
+ export interface PanelProps {
60
+ /**
61
+ * @zh 自定义类名(字符串或数组)
62
+ * @en Custom class name (string or array)
63
+ */
64
+ className?: string | string[];
65
+ /**
66
+ * @zh 自定义样式
67
+ * @en Custom style
68
+ */
69
+ style?: React.CSSProperties;
70
+ /**
71
+ * @zh 最小尺寸(像素或百分比字符串,如 "20%")
72
+ * @en Minimum size (pixels or percentage string e.g. "20%")
73
+ */
74
+ min?: number | string;
49
75
  /**
50
- * 拖拽中回调
51
- * @param newSize - 当前分割比例 (0~1)
76
+ * @zh 最大尺寸(像素或百分比字符串)
77
+ * @en Maximum size (pixels or percentage string)
52
78
  */
53
- onDrag?: (newSize: number) => void;
79
+ max?: number | string;
54
80
  /**
55
- * 第一个面板内容
81
+ * @zh 当前尺寸(像素或百分比字符串)
82
+ * @en Current size (pixels or percentage string)
56
83
  */
57
- firstPane: ReactNode;
84
+ size?: number | string;
58
85
  /**
59
- * 第二个面板内容
86
+ * @zh 是否可折叠(或配置具体哪边可折叠)
87
+ * @en Whether collapsible (or configure which side is collapsible)
60
88
  */
61
- secondPane: ReactNode;
89
+ collapsible?: boolean | {
90
+ /** @zh 起始边是否可折叠 */
91
+ start?: boolean;
92
+ /** @zh 结束边是否可折叠 */
93
+ end?: boolean;
94
+ };
62
95
  /**
63
- * 容器样式
96
+ * @zh 是否可调整大小
97
+ * @defaultValue true
98
+ * @en Whether resizable
64
99
  */
65
- style?: CSSProperties;
100
+ resizable?: boolean;
66
101
  /**
67
- * 容器类名
102
+ * @zh 默认尺寸(像素或百分比字符串)
103
+ * @en Default size (pixels or percentage string)
68
104
  */
69
- className?: string;
105
+ defaultSize?: number | string;
106
+ }
107
+ /**
108
+ * 内部使用的 Panel 组件属性(继承自 PanelProps 并扩展)
109
+ */
110
+ export interface InternalPanelProps extends PanelProps {
111
+ /** @zh 类名前缀 */
112
+ prefixCls?: string;
113
+ }
114
+ /**
115
+ * 调整大小相关属性
116
+ */
117
+ export interface UseResizeProps extends Pick<SplitterProps, 'onResize'> {
118
+ /** @zh 基础尺寸状态 */
119
+ basicsState: number[];
120
+ /** @zh 面板项数组 */
121
+ items: PanelProps[];
122
+ /** @zh 面板引用数组 */
123
+ panelsRef: React.RefObject<(HTMLDivElement | null)[]>;
124
+ /** @zh 是否反向(RTL模式) */
125
+ reverse: boolean;
126
+ /** @zh 设置基础尺寸状态的函数 */
127
+ setBasicsState: React.Dispatch<React.SetStateAction<number[]>>;
128
+ }
129
+ /**
130
+ * 调整大小返回值接口
131
+ */
132
+ export interface UseResize {
133
+ /** @zh 设置尺寸函数 */
134
+ setSize: (data: {
135
+ size: number;
136
+ index: number;
137
+ }[]) => void;
138
+ /** @zh 设置偏移量函数 */
139
+ setOffset: (offset: number, containerSize: number, index: number) => void;
140
+ }
141
+ /**
142
+ * 拖拽处理相关属性
143
+ */
144
+ export interface UseHandleProps extends Pick<SplitterProps, 'layout' | 'onResizeStart' | 'onResizeEnd'> {
145
+ /** @zh 基础尺寸状态 */
146
+ basicsState: number[];
147
+ /** @zh 容器引用 */
148
+ containerRef?: React.RefObject<HTMLDivElement | null>;
149
+ /** @zh 设置偏移量函数 */
150
+ setOffset: UseResize['setOffset'];
151
+ /** @zh 设置调整状态函数 */
152
+ setResizing: React.Dispatch<React.SetStateAction<boolean>>;
153
+ }
154
+ /**
155
+ * 拖拽处理返回值接口
156
+ */
157
+ export interface UseHandle {
158
+ /** @zh 开始拖拽函数 */
159
+ onStart: (x: number, y: number, index: number) => void;
160
+ }
161
+ /**
162
+ * 可折叠相关属性
163
+ */
164
+ export interface UseCollapsibleProps {
165
+ /** @zh 基础尺寸状态 */
166
+ basicsState: number[];
167
+ /** @zh 可折叠配置 */
168
+ collapsible?: PanelProps['collapsible'];
169
+ /** @zh 当前索引 */
170
+ index: number;
171
+ /** @zh 是否反向 */
172
+ reverse: boolean;
173
+ /** @zh 设置尺寸函数 */
174
+ setSize?: UseResize['setSize'];
175
+ }
176
+ /**
177
+ * 可折叠返回值接口
178
+ */
179
+ export interface UseCollapsible {
180
+ /** @zh 是否显示下一个图标 */
181
+ nextIcon: boolean;
182
+ /** @zh 是否重叠 */
183
+ overlap: boolean;
184
+ /** @zh 是否显示上一个图标 */
185
+ previousIcon: boolean;
186
+ /** @zh 折叠/展开函数 */
187
+ onFold: (type: 'previous' | 'next') => void;
188
+ /** @zh 保存旧尺寸函数 */
189
+ setOldBasics: () => void;
190
+ }
191
+ /**
192
+ * 可调整大小信息接口
193
+ */
194
+ export interface ResizableInfo {
195
+ /** @zh 是否可调整大小 */
196
+ resizable: boolean;
197
+ /** @zh 起始边是否可折叠 */
198
+ startCollapsible: boolean;
199
+ /** @zh 结束边是否可折叠 */
200
+ endCollapsible: boolean;
201
+ }
202
+ /**
203
+ * 面板项类型(用于内部处理)
204
+ */
205
+ export interface PanelItemType extends Omit<PanelProps, 'collapsible'> {
206
+ /** @zh 可折叠配置 */
207
+ collapsible: {
208
+ /** @zh 起始边是否可折叠 */
209
+ start?: boolean;
210
+ /** @zh 结束边是否可折叠 */
211
+ end?: boolean;
212
+ };
70
213
  }
@@ -14,7 +14,6 @@ export interface StatisticProps {
14
14
  /**
15
15
  * @zh 数值小数部分的样式
16
16
  * @en The style of the decimal part of the value
17
- * @version 2.47.0
18
17
  */
19
18
  styleDecimal?: CSSProperties;
20
19
  /**
@@ -77,13 +76,11 @@ export interface StatisticProps {
77
76
  /**
78
77
  * @zh 自定义 render 函数。`formattedValue` 表示格式化后的值。
79
78
  * @en Custom render function. `formattedValue` represents the formatted value.
80
- * @version 2.36.0
81
79
  */
82
80
  renderFormat?: (value: StatisticProps['value'], formattedValue: string) => ReactNode;
83
81
  /**
84
82
  * @zh 数字是否加载中
85
83
  * @en Is the number loading
86
- * @version 2.20.0
87
84
  */
88
85
  loading?: boolean;
89
86
  }
@@ -117,7 +114,6 @@ export interface CountdownProps {
117
114
  /**
118
115
  * @zh 自定义 render 函数。`valueDiff` 表示两个时间的时间差,`formattedDiff` 表示格式化后的时间差,
119
116
  * @en Custom render function, the input parameter is the result formatted by `dayjs`
120
- * @version 2.36.0
121
117
  */
122
118
  renderFormat?: (valueDiff: number, formattedDiff: string) => ReactNode;
123
119
  /**
@@ -70,13 +70,11 @@ export interface StepProps {
70
70
  /**
71
71
  * @zh 节点样式
72
72
  * @en The additional css style
73
- * @version 2.11.0
74
73
  */
75
74
  style?: CSSProperties;
76
75
  /**
77
76
  * @zh 节点类名
78
77
  * @en The additional css className
79
- * @version 2.11.0
80
78
  */
81
79
  className?: string | string[];
82
80
  prefixCls?: string;
@@ -92,7 +90,6 @@ export interface StepProps {
92
90
  /**
93
91
  * @zh 点击回调
94
92
  * @en Callback when item is clicked
95
- * @version `e` in `2.40.0`
96
93
  */
97
94
  onClick?: (index: number, id: any, e: any) => void;
98
95
  onChange?: (index: number, id: any) => void;
@@ -1,7 +1,7 @@
1
1
  export default useThResizable;
2
- declare function useThResizable(props?: {}): {
2
+ declare function useThResizable(props?: {}, deps?: any[]): {
3
3
  columns: any;
4
- setColumns(columns_: any): void;
4
+ setColumns(c: any): void;
5
5
  ThResizable: typeof ThResizable;
6
6
  };
7
7
  import ThResizable from '../th-resizable';
@@ -125,7 +125,6 @@ export interface TableProps<T = any> {
125
125
  * @en
126
126
  * Whether the header shows the tooltip for the next sorting. The object can be set,
127
127
  * and all the parameters of the `Tooltip` component can be passed.
128
- * @version 2.19.0
129
128
  * @defaultValue true
130
129
  */
131
130
  showSorterTooltip?: boolean | TooltipProps;
@@ -142,7 +141,6 @@ export interface TableProps<T = any> {
142
141
  /**
143
142
  * @zh 分页、排序、筛选时的回调
144
143
  * @en Callback when pagination, sorting, and filtering changes
145
- * @version extra in `2.19.0`, currentAllData in 2.53.0
146
144
  */
147
145
  onChange?: (pagination: PaginationProps, sorter: SorterInfo | SorterInfo[], filters: Partial<Record<keyof T, string[]>>, extra: {
148
146
  currentData: T[];
@@ -157,7 +155,6 @@ export interface TableProps<T = any> {
157
155
  /**
158
156
  * @zh 自定义分页渲染。
159
157
  * @en Customized pagination render
160
- * @version 2.11.0
161
158
  */
162
159
  renderPagination?: (paginationNode?: ReactNode) => ReactNode;
163
160
  /**
@@ -196,7 +193,6 @@ export interface TableProps<T = any> {
196
193
  /**
197
194
  * @zh 当单元格内容为空时,显示占位符,优先级低于 `column.placeholder`。
198
195
  * @en When the cell content is empty, a placeholder is displayed, and the priority is lower than `column.placeholder`.
199
- * @version 2.23.0
200
196
  */
201
197
  placeholder?: ReactNode;
202
198
  /**
@@ -240,13 +236,11 @@ export interface TableProps<T = any> {
240
236
  * 用于配置虚拟滚动。
241
237
  * @en
242
238
  * Used to configure `VirtualList`.
243
- * @version 2.46.0
244
239
  */
245
240
  virtualListProps?: AvailableVirtualListProps;
246
241
  /**
247
242
  * @zh 总结栏
248
243
  * @en Table Summary
249
- * @version 2.17.0
250
244
  */
251
245
  summary?: (currentData?: T[]) => ReactNode;
252
246
  }
@@ -265,7 +259,6 @@ export interface RowSelectionProps<T = any> {
265
259
  /**
266
260
  * @zh 设置为 `false` 的时候父子选择会自动关联。
267
261
  * @en When set to `false`, parent-child selections are automatically associated.
268
- * @version 2.33.0
269
262
  * @defaultValue true
270
263
  */
271
264
  checkStrictly?: boolean;
@@ -304,25 +297,21 @@ export interface RowSelectionProps<T = any> {
304
297
  /**
305
298
  * @zh 用户手动选择/取消选择的回调
306
299
  * @en Callback for user manual selection/deselection
307
- * @version 2.22.0
308
300
  */
309
301
  onSelect?: (selected: boolean, record: T, selectedRows: T[]) => void;
310
302
  /**
311
303
  * @zh 用户手动选择/取消选择所有行的回调
312
304
  * @en Callback when the user to manually select/deselect all rows
313
- * @version 2.6.0
314
305
  */
315
306
  onSelectAll?: (selected: boolean, selectedRows: any) => void;
316
307
  /**
317
308
  * @zh 在数据项被删除时仍然保留选项的 `key`
318
309
  * @en The `key` is still retained in `selectedRowKeys` when the data item is deleted
319
- * @version 2.19.0
320
310
  */
321
311
  preserveSelectedRowKeys?: boolean;
322
312
  /**
323
313
  * @zh 定制复选框,用法与 `column.render` 相同。
324
314
  * @en Customize checkbox, the usage is same as `column.render`.
325
- * @version 2.19.0
326
315
  */
327
316
  renderCell?: (originNode: any, checked: boolean, record: T) => ReactNode;
328
317
  /**
@@ -368,20 +357,17 @@ export interface ExpandProps<T = any> {
368
357
  * @en
369
358
  * Whether to allow row expansion. If this parameter is not specified,
370
359
  * it will be determined by whether expandedRowRender has a return value. When performance problems occur, rowExpandable is recommended.
371
- * @version 2.16.0
372
360
  */
373
361
  rowExpandable?: (record: T) => boolean;
374
362
  /**
375
363
  * @zh 支持通过点击行来展开
376
364
  * @en Clicking on the row to expand
377
- * @version 2.19.0
378
365
  */
379
366
  expandRowByClick?: boolean;
380
367
  /**
381
368
  * @zh 树形数据时,只有 `children` 是数组且长度大于 1 才显示展开图标。
382
369
  * @en For tree data, only when `children` is an array and the length is greater than 1, the expand icon will be displayed.
383
370
  * @defaultValue true
384
- * @version 2.27.0
385
371
  */
386
372
  strictTreeData?: boolean;
387
373
  }
@@ -458,7 +444,6 @@ export interface ColumnProps<T = unknown> {
458
444
  /**
459
445
  * @zh 当单元格内容为空时,显示占位符,优先级低于 `render`。
460
446
  * @en When the cell content is empty, a placeholder is displayed, and the priority is lower than `render`.
461
- * @version 2.22.0
462
447
  */
463
448
  placeholder?: ReactNode;
464
449
  /**
@@ -572,6 +557,10 @@ export interface ColumnProps<T = unknown> {
572
557
  columnFixedStyle?: CSSProperties;
573
558
  column?: any;
574
559
  [key: string]: any;
560
+ tooltip: TooltipProps & {
561
+ show: boolean;
562
+ render?: (record: any, trIndex: any, column: any) => ReactNode;
563
+ };
575
564
  }
576
565
  export type InternalColumnProps<T = any> = ColumnProps<T> & {
577
566
  $$isOperation?: boolean;
@@ -50,7 +50,6 @@ export interface TabsProps {
50
50
  /**
51
51
  * @zh 定制下划线尺寸
52
52
  * @en custom the size of underline
53
- * @version 2.54.0
54
53
  */
55
54
  inkBarSize?: {
56
55
  width?: CSSProperties['width'];
@@ -60,7 +59,6 @@ export interface TabsProps {
60
59
  * @zh 选项卡头部是否存在水平边距。仅对 `type`等于 `line`、`text`类型的选项卡生效
61
60
  * @en Whether there is a horizontal margin on the tab. It only effect when `type` is `line` or `text`
62
61
  * @defaultValue true
63
- * @version 2.6.0
64
62
  */
65
63
  headerPadding?: boolean;
66
64
  /**
@@ -83,7 +81,6 @@ export interface TabsProps {
83
81
  /**
84
82
  * @zh 标签页头部 编辑/滚动/下拉 图标配置。对于不想展示的图标可以将其设置为`null`
85
83
  * @en Tab header edit/scroll/dropdown icon configuration. You can set it to `null` for icons you don't want to display
86
- * @version 2.15.0, `prev`,`next`,`dropdown` in `2.47.0`
87
84
  */
88
85
  icons?: {
89
86
  add?: ReactNode;
@@ -96,7 +93,6 @@ export interface TabsProps {
96
93
  * @zh 是否在标签增减后,自动进行滚动调整(`editable`为`true`时生效)
97
94
  * @en Whether to automatically scroll to the selected label after the label is dynamically increased or decreased (only effective when `editable` is `true`)
98
95
  * @defaultValue { add: true, delete: true }
99
- * @version 2.25.0
100
96
  */
101
97
  scrollAfterEdit?: {
102
98
  delete?: boolean;
@@ -126,19 +122,16 @@ export interface TabsProps {
126
122
  /**
127
123
  * @zh 自定义删除按钮
128
124
  * @en Custom delete button
129
- * @version 2.16.0
130
125
  */
131
126
  deleteButton?: ReactNode;
132
127
  /**
133
128
  * @zh 自定义新增按钮
134
129
  * @en Custom add button
135
- * @version 2.16.0
136
130
  */
137
131
  addButton?: ReactNode;
138
132
  /**
139
133
  * @zh 被选中 tab 的滚动位置,默认 auto 即会将 activeTab 滚动到可见区域,但不会特意做位置调整
140
134
  * @en The scroll position of the selected tab, the default auto will scroll the activeTab to the visible area, but will not adjust the position intentionally
141
- * @version 2.25.0
142
135
  * @defaultValue auto
143
136
  */
144
137
  scrollPosition?: 'start' | 'end' | 'center' | 'auto' | number;
@@ -1,4 +1,6 @@
1
1
  import { TagProps } from './interface';
2
+ declare const COLORS: string[];
2
3
  declare const TagComponent: import("react").ForwardRefExoticComponent<TagProps & import("react").RefAttributes<unknown>>;
4
+ export { COLORS as TAG_COLORS };
3
5
  export default TagComponent;
4
6
  export type { TagProps };
@@ -14,7 +14,6 @@ export interface TagProps extends Omit<HTMLAttributes<HTMLDivElement>, 'classNam
14
14
  /**
15
15
  * @zh 是否显示边框
16
16
  * @en Whether the tag is bordered
17
- * @version 2.26.0
18
17
  */
19
18
  bordered?: boolean;
20
19
  /**
@@ -24,13 +24,11 @@ export interface PickerProps {
24
24
  /**
25
25
  * @zh 状态
26
26
  * @en Status
27
- * @version 2.45.0
28
27
  */
29
28
  status?: 'error' | 'warning';
30
29
  /**
31
30
  * @zh 前缀
32
31
  * @en prefix
33
- * @version 2.43.0
34
32
  */
35
33
  prefix?: ReactNode;
36
34
  /**
@@ -42,7 +40,6 @@ export interface PickerProps {
42
40
  /**
43
41
  * @zh 禁用确认步骤,开启后直接点选时间不需要点击确认按钮。
44
42
  * @en Disable the confirm step, click to select time directly without click the confirm button.
45
- * @version 2.12.0
46
43
  */
47
44
  disableConfirm?: boolean;
48
45
  /**
@@ -85,7 +82,6 @@ export interface PickerProps {
85
82
  /**
86
83
  * @zh 触发元素。
87
84
  * @en Trigger element.
88
- * @version 2.38.0
89
85
  */
90
86
  triggerElement?: ReactNode;
91
87
  /**
@@ -131,7 +127,6 @@ export interface PickerProps {
131
127
  * @zh 时间列在滚动的时候自动吸附和选中
132
128
  * @en The time column is automatically adsorbed and selected when scrolling
133
129
  * @defaultValue true
134
- * @version 2.23.0
135
130
  */
136
131
  scrollSticky?: boolean;
137
132
  /**
@@ -196,7 +191,6 @@ export type BaseTimePickerProps = {
196
191
  * @zh 是否显示选择当前时间的按钮
197
192
  * @en Whether to show the button to select current time
198
193
  * @defaultValue true
199
- * @version 2.21.0
200
194
  */
201
195
  showNowBtn?: boolean;
202
196
  };
@@ -234,7 +228,6 @@ export type BaseRangePickerProps = {
234
228
  * @zh 起止时间是否自动排序
235
229
  * @en Whether the start and end times are automatically sorted
236
230
  * @defaultValue true
237
- * @version 2.21.0
238
231
  */
239
232
  order?: boolean;
240
233
  };
@@ -21,7 +21,6 @@ export interface TooltipProps {
21
21
  /**
22
22
  * @zh 弹出层背景色
23
23
  * @en background color of the popup-layer
24
- * @version 2.22.0
25
24
  */
26
25
  color?: string;
27
26
  /**
@@ -89,4 +88,8 @@ export interface TooltipProps {
89
88
  * @en Set an additional class name(`${childrenPrefix}-open`) for the container of the popup.
90
89
  */
91
90
  childrenPrefix?: string;
91
+ /**
92
+ * @zh 是否以 HTML <pre> 元素预定义格式文本展示。在该元素中的文本通常按照原文件中的编排,以等宽字体的形式展现出来,文本中的空白符(比如空格和换行符)都会显示出来。(紧跟在 <pre> 开始标签后的换行符也会被省略)
93
+ */
94
+ pre?: boolean;
92
95
  }
@@ -19,31 +19,26 @@ interface TransferPropsWithArrayType {
19
19
  /**
20
20
  * @zh 搜索框默认提示文字,通过数组为左右列表传入不同属性
21
21
  * @en Placeholder of search box, pass in different properties for lists through array
22
- * @version Array format in '2.40.0'
23
22
  */
24
23
  searchPlaceholder?: string | string[];
25
24
  /**
26
25
  * @zh 左右两栏是否显示搜索框,通过数组为左右列表传入不同属性
27
26
  * @en Whether to display the search box in columns, pass in different properties for lists through array
28
- * @version Array format in '2.40.0'
29
27
  */
30
28
  showSearch?: boolean | InputProps | Array<boolean | InputProps>;
31
29
  /**
32
30
  * @zh 左右两栏是否显示底部重置按钮,通过数组为左右列表传入不同属性
33
31
  * @en Whether to display the reset-button in columns, pass in different properties for lists through array
34
- * @version ReactNode in `2.11.0`, array format in '2.40.0'
35
32
  */
36
33
  showFooter?: boolean | ReactNode | Array<boolean | ReactNode>;
37
34
  /**
38
35
  * @zh 是否使用分页,也可传入 `Pagination` 的配置,通过数组为左右列表传入不同属性
39
36
  * @en Whether to divide into pages, you can also pass in the configuration of `Pagination`, pass in different properties for lists through array
40
- * @version Array format in '2.40.0'
41
37
  */
42
38
  pagination?: boolean | PaginationProps | Array<boolean | PaginationProps>;
43
39
  /**
44
40
  * @zh 左右两栏框的样式,通过数组为左右列表传入不同属性
45
41
  * @en The additional css style of columns, pass in different properties for lists through array
46
- * @version Array format in '2.40.0'
47
42
  */
48
43
  listStyle?: CSSProperties | CSSProperties[];
49
44
  }
@@ -87,8 +82,8 @@ export interface TransferProps extends TransferPropsWithArrayType {
87
82
  */
88
83
  selectedKeys?: string[];
89
84
  /**
90
- * @zh 穿梭框左右栏标题数组。(函数写法 `2.18.0` 开始支持)
91
- * @en Title list of Transfer columns. (`2.18.0` began to support function)
85
+ * @zh 穿梭框左右栏标题数组。
86
+ * @en Title list of Transfer columns.
92
87
  * @defaultValue ['Source', 'Target']
93
88
  */
94
89
  titleTexts?: Array<TransferListTitle>;
@@ -110,7 +105,6 @@ export interface TransferProps extends TransferPropsWithArrayType {
110
105
  /**
111
106
  * @zh 简单模式
112
107
  * @en Whether to automatically move an item when it is selected
113
- * @version `retainSelectedItems` in '2.21.0'
114
108
  */
115
109
  simple?: boolean | {
116
110
  retainSelectedItems?: boolean;
@@ -128,7 +122,6 @@ export interface TransferProps extends TransferPropsWithArrayType {
128
122
  /**
129
123
  * @zh 传递虚拟滚动属性。
130
124
  * @en Pass properties used by VirtualList.
131
- * @version 2.42.0
132
125
  */
133
126
  virtualListProps?: AvailableVirtualListProps;
134
127
  /**
@@ -88,10 +88,9 @@ export interface TreeProps {
88
88
  */
89
89
  animation?: boolean;
90
90
  /**
91
- * @zh 是否允许拖拽时放置在该节点。 (`dragNode` in `2.23.0`)
92
- * @en Whether to allow dropping on node. (`dragNode` in `2.23.0`)
91
+ * @zh 是否允许拖拽时放置在该节点。
92
+ * @en Whether to allow dropping on node.
93
93
  * @defaultValue () => true
94
- * @version 2.7.0
95
94
  */
96
95
  allowDrop?: AllowDrop;
97
96
  /**
@@ -137,7 +136,6 @@ export interface TreeProps {
137
136
  /**
138
137
  * @zh 半选状态的节点.仅在 checkable 且 checkStrictly 时生效
139
138
  * @en the keys of half checked
140
- * @version 2.27.0
141
139
  */
142
140
  halfCheckedKeys?: string[];
143
141
  /**
@@ -158,14 +156,12 @@ export interface TreeProps {
158
156
  /**
159
157
  * @zh 指定 key,title,isLeaf,disabled,children 对应的字段
160
158
  * @en Custom field name for key, title, isLeaf, disabled and children
161
- * @version 2.11.0
162
159
  */
163
160
  fieldNames?: FieldNamesType;
164
161
  /**
165
162
  * @zh 定制节点图标
166
163
  * @en Customize node icon
167
164
  * @defaultValue FieldNamesType
168
- * @version 2.9.0
169
165
  */
170
166
  icons?: ((nodeProps: NodeProps) => {
171
167
  dragIcon?: ReactNode;
@@ -179,7 +175,6 @@ export interface TreeProps {
179
175
  /**
180
176
  * @zh 传递虚拟列表属性,传入此参数以开启虚拟滚动
181
177
  * @en Pass the virtual-list properties, pass in this parameter to turn on virtual scrolling
182
- * @version 2.11.0
183
178
  */
184
179
  virtualListProps?: AvailableVirtualListProps;
185
180
  /**
@@ -200,7 +195,6 @@ export interface TreeProps {
200
195
  /**
201
196
  * @zh 点击节点时对应的操作,可以是选中,复选选中,展开/收起
202
197
  * @en The action when click node
203
- * @version select
204
198
  */
205
199
  actionOnClick?: ActionOnClick | ActionOnClick[];
206
200
  /**