@baishuyun/ui-base 6.7.3 → 6.8.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.
- package/dist/Amap/AmapCircle/index.js +1 -1
- package/dist/Amap/AmapMarker/index.js +1 -1
- package/dist/Amap/AmapMarkerCluster/index.js +1 -1
- package/dist/Amap/AmapProvider/index.js +4 -4
- package/dist/Amap/{AmapProvider-DSjQj2oA.js → AmapProvider-Cwi6WOe0.js} +1 -1
- package/dist/Amap/hooks/index.js +1 -1
- package/dist/Amap/index.js +4 -4
- package/dist/Calendar/{Calendar-C2iO_3cX.js → Calendar-DnQrN8KB.js} +2 -2
- package/dist/Calendar/context/index.js +1 -1
- package/dist/Calendar/index.js +5 -5
- package/dist/Calendar/subcomponents/AllDaySection/index.js +1 -1
- package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +1 -1
- package/dist/Calendar/subcomponents/EventCard/index.js +1 -1
- package/dist/Calendar/subcomponents/TimeAxis/index.js +1 -1
- package/dist/Calendar/subcomponents/TimeGrid/index.js +1 -1
- package/dist/Calendar/utils/index.js +1 -1
- package/dist/Calendar/utils/layout/index.js +1 -1
- package/dist/Calendar/utils/theme/index.js +1 -1
- package/dist/Card/index.js +1 -1
- package/dist/CheckBox/index.js +1 -1
- package/dist/ColorPicker/{ColorPicker-BtTIb9tX.js → ColorPicker-CL57cSDG.js} +2 -1
- package/dist/ColorPicker/index.js +4 -4
- package/dist/ConfigProvider/index.js +3 -3
- package/dist/DatePicker/{DatePicker-BMTK0Phw.js → DatePicker-C0XbZmrZ.js} +2 -2
- package/dist/DatePicker/{DatePickerPanel-BH_Z4e88.js → DatePickerPanel-BEn16cat.js} +3 -3
- package/dist/DatePicker/index.js +4 -4
- package/dist/DatePicker/style/index.js +1 -1
- package/dist/DropDown/{DropDown-CdTjlySd.js → DropDown-yDH9V_9Y.js} +2 -2
- package/dist/DropDown/index.js +5 -5
- package/dist/DropDown/style/index.js +1 -1
- package/dist/Editor/{Buttons-BcP66z6E.js → Buttons-BivKInBV.js} +144 -124
- package/dist/Editor/ToolbarPlugin/Buttons/index.js +7 -7
- package/dist/Editor/constants/index.js +1 -1
- package/dist/Editor/index.js +274 -164
- package/dist/Gantt/GanttChart/index.js +7 -7
- package/dist/Gantt/{GanttChart-BYzMKcZ2.js → GanttChart-CDw1IQ4F.js} +2 -2
- package/dist/Gantt/GanttTable/index.js +5 -5
- package/dist/Gantt/{GanttTable-DqJziqML.js → GanttTable-xbXD_PWI.js} +1 -1
- package/dist/Gantt/GanttToolBar/index.js +6 -6
- package/dist/Gantt/{GanttToolBar-C50n7PD9.js → GanttToolBar-BTeTsR6Z.js} +2 -2
- package/dist/Gantt/index.js +9 -9
- package/dist/Gantt/utils/index.js +1 -1
- package/dist/Gantt/utils/theme/index.js +1 -1
- package/dist/Icon/index.js +1 -1
- package/dist/InputTag/InputTag-hzCCJQ1z.js +144 -0
- package/dist/InputTag/index.js +4 -2
- package/dist/Loading/Loading-DiywS7ex.js +19 -0
- package/dist/Loading/index.js +4 -2
- package/dist/Modal/index.js +1 -1
- package/dist/NotFoundContent/index.js +1 -1
- package/dist/Radio/{Radio-DSoZotcs.js → Radio-CX9cUqb7.js} +12 -12
- package/dist/Radio/index.js +2 -2
- package/dist/ScrollBar/index.js +1 -1
- package/dist/Segmented/index.js +1 -1
- package/dist/Select/{Select-DujgkkUp.js → Select-D6EK7whJ.js} +195 -194
- package/dist/Select/{SelectInputSearch-Bikrj3FI.js → SelectInputSearch-COUzreau.js} +1 -1
- package/dist/Select/index.js +7 -7
- package/dist/Table/{Table-k9wdWm6V.js → Table-yQXQEk6d.js} +1 -1
- package/dist/Table/hooks/index.js +1 -1
- package/dist/Table/index.js +4 -4
- package/dist/Table/style/index.js +1 -1
- package/dist/Table/utils/index.js +1 -1
- package/dist/Tabs/Tabs-BiKW70CL.js +398 -0
- package/dist/Tabs/index.js +4 -2
- package/dist/Tooltip/index.js +1 -1
- package/dist/Tree/index.js +3 -3
- package/dist/Tree/utils/index.js +1 -1
- package/dist/components/DropDown/interface.d.ts +167 -169
- package/dist/components/Editor/LengthBadge.d.ts +6 -0
- package/dist/components/Editor/ToolbarPlugin/BaseButton/BaseButton.d.ts +1 -1
- package/dist/components/Editor/ToolbarPlugin/ToolbarPlugin.d.ts +5 -1
- package/dist/components/Editor/ToolbarPlugin/context/EditorToolbarThemeContext.d.ts +6 -0
- package/dist/components/Editor/ToolbarPlugin/interface.d.ts +30 -32
- package/dist/components/Editor/index.d.ts +1 -1
- package/dist/components/Editor/interface.d.ts +118 -60
- package/dist/components/Editor/plugins/MaxLengthPlugin.d.ts +7 -0
- package/dist/components/Editor/utils/resolveEditorToolbarThemeVars.d.ts +5 -0
- package/dist/components/Editor/utils/textLength.d.ts +4 -0
- package/dist/components/InputTag/interface.d.ts +32 -32
- package/dist/components/Radio/interface.d.ts +95 -97
- package/dist/components/Tabs/TabSelect/interface.d.ts +23 -25
- package/dist/components/Tabs/interface.d.ts +58 -60
- package/dist/components/Tree/types/node.d.ts +19 -19
- package/dist/components/Tree/types/tree.d.ts +81 -83
- package/dist/components/index.d.ts +2 -0
- package/dist/index.js +18 -18
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/lang/en-US.json.d.ts +177 -166
- package/dist/locale/lang/zh-CN.json.d.ts +177 -166
- package/dist/locale/lang/zh-TW.json.d.ts +177 -166
- package/dist/style.css +1 -1
- package/dist/vendors/{ConfigProvider-C3Uwzinj.js → ConfigProvider-DxrZpdIb.js} +23 -1
- package/dist/vendors/{LocaleContext-B1HuhJc-.js → LocaleContext-Dcw6C1LX.js} +11 -0
- package/dist/vendors/{Tree-DQkpLl6f.js → Tree-DXmVRDn0.js} +8 -7
- package/dist/vendors/{useLocale-BYtF5pxt.js → useLocale-BKZX2_zw.js} +1 -1
- package/dist/vendors/{version-Dkos5Cha.js → version-4HBYLKDL.js} +1 -1
- package/dist/vite-env.d.ts +13 -13
- package/dist/vitest-matchers.d.ts +0 -1
- package/package.json +8 -8
- package/dist/InputTag/InputTag-LnUqz0Hz.js +0 -143
- package/dist/Loading/Loading-CcTZogVx.js +0 -15
- package/dist/Tabs/Tabs-Ctgg45Ox.js +0 -410
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
type InputTagProps = {
|
|
2
|
-
/**
|
|
3
|
-
* 标签值,对象数组格式
|
|
4
|
-
*/
|
|
5
|
-
value?: string[];
|
|
6
|
-
/**
|
|
7
|
-
* 标签值变化回调
|
|
8
|
-
*/
|
|
9
|
-
onChange?: (value: string[]) => void;
|
|
10
|
-
/**
|
|
11
|
-
* 默认标签值
|
|
12
|
-
*/
|
|
13
|
-
defaultValue?: string[];
|
|
14
|
-
/**
|
|
15
|
-
* 是否启用点击高亮功能
|
|
16
|
-
*/
|
|
17
|
-
enableActive?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* 当前激活的标签索引(受控模式)
|
|
20
|
-
*/
|
|
21
|
-
activeIndex?: number;
|
|
22
|
-
/**
|
|
23
|
-
* 默认激活的标签索引(非受控模式)
|
|
24
|
-
*/
|
|
25
|
-
defaultActiveIndex?: number;
|
|
26
|
-
/**
|
|
27
|
-
* 激活标签索引变化回调
|
|
28
|
-
*/
|
|
29
|
-
onActiveIndexChange?: (index: number, text: string) => void;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export type { InputTagProps };
|
|
1
|
+
type InputTagProps = {
|
|
2
|
+
/**
|
|
3
|
+
* 标签值,对象数组格式
|
|
4
|
+
*/
|
|
5
|
+
value?: string[];
|
|
6
|
+
/**
|
|
7
|
+
* 标签值变化回调
|
|
8
|
+
*/
|
|
9
|
+
onChange?: (value: string[]) => void;
|
|
10
|
+
/**
|
|
11
|
+
* 默认标签值
|
|
12
|
+
*/
|
|
13
|
+
defaultValue?: string[];
|
|
14
|
+
/**
|
|
15
|
+
* 是否启用点击高亮功能
|
|
16
|
+
*/
|
|
17
|
+
enableActive?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* 当前激活的标签索引(受控模式)
|
|
20
|
+
*/
|
|
21
|
+
activeIndex?: number;
|
|
22
|
+
/**
|
|
23
|
+
* 默认激活的标签索引(非受控模式)
|
|
24
|
+
*/
|
|
25
|
+
defaultActiveIndex?: number;
|
|
26
|
+
/**
|
|
27
|
+
* 激活标签索引变化回调
|
|
28
|
+
*/
|
|
29
|
+
onActiveIndexChange?: (index: number, text: string) => void;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type { InputTagProps };
|
|
@@ -1,98 +1,96 @@
|
|
|
1
1
|
import { Layout } from './constants';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
style?: React.CSSProperties;
|
|
98
|
-
}
|
|
2
|
+
export interface RadioProps {
|
|
3
|
+
/**
|
|
4
|
+
* @description 是否选中
|
|
5
|
+
*/
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @description 默认是否选中
|
|
10
|
+
*/
|
|
11
|
+
defaultChecked?: boolean;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @description 是否禁用
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @description 值改变时的回调
|
|
20
|
+
*/
|
|
21
|
+
onChange?: (checked: boolean) => void;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @description 自定义类名
|
|
25
|
+
*/
|
|
26
|
+
className?: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @description 自定义样式
|
|
30
|
+
*/
|
|
31
|
+
style?: React.CSSProperties;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @description 子元素
|
|
35
|
+
*/
|
|
36
|
+
children?: React.ReactNode;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @description label 的位置,默认在右侧
|
|
40
|
+
* @default 'right'
|
|
41
|
+
*/
|
|
42
|
+
labelPosition?: 'left' | 'right';
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @description radio 的值,用于 radio group
|
|
46
|
+
*/
|
|
47
|
+
value?: string | number;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface RadioGroupProps {
|
|
51
|
+
/**
|
|
52
|
+
* @description 选中的值
|
|
53
|
+
*/
|
|
54
|
+
value?: string | number;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @description 默认选中的值
|
|
58
|
+
*/
|
|
59
|
+
defaultValue?: string | number;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @description 值改变时的回调
|
|
63
|
+
*/
|
|
64
|
+
onChange?: (value: string | number) => void;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @description 值反选的回调
|
|
68
|
+
*/
|
|
69
|
+
onDeselect?: (value: string | number) => void;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @description 是否禁用
|
|
73
|
+
*/
|
|
74
|
+
disabled?: boolean;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @description 布局方式
|
|
78
|
+
* @default 'none'
|
|
79
|
+
*/
|
|
80
|
+
layout?: Layout;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @description Radio 子元素
|
|
84
|
+
*/
|
|
85
|
+
children?: React.ReactNode;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @description 自定义类名
|
|
89
|
+
*/
|
|
90
|
+
className?: string;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @description 自定义样式
|
|
94
|
+
*/
|
|
95
|
+
style?: React.CSSProperties;
|
|
96
|
+
}
|
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
import { TabType } from '../constants';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export type { TabSelectProps };
|
|
2
|
+
type TabSelectProps = {
|
|
3
|
+
/**
|
|
4
|
+
* @description 下拉选中的 tab 类型
|
|
5
|
+
*/
|
|
6
|
+
value?: TabType;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @description 切换 tab 类型的回调
|
|
10
|
+
*/
|
|
11
|
+
onChange?: (value: TabType) => void;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @description 初始化选中 tab 类型,如果没有设置 value,则默认选中第一个
|
|
15
|
+
*/
|
|
16
|
+
defaultValue?: TabType;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @description 主题色
|
|
20
|
+
*/
|
|
21
|
+
color?: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type { TabSelectProps };
|
|
@@ -1,61 +1,59 @@
|
|
|
1
1
|
import { TabType } from './constants';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export type { TabsProps };
|
|
2
|
+
interface TabsProps {
|
|
3
|
+
items?: {
|
|
4
|
+
/**
|
|
5
|
+
* @description 页签的唯一标识
|
|
6
|
+
*/
|
|
7
|
+
key: string;
|
|
8
|
+
/**
|
|
9
|
+
* @description 页签的标签
|
|
10
|
+
*/
|
|
11
|
+
label: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* @description 页签的内容
|
|
14
|
+
*/
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
}[];
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @description 当前激活的页签的唯一标识
|
|
20
|
+
*/
|
|
21
|
+
activeKey?: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @description 初始化选中面板的 key,如果没有设置 activeKey,则默认选中第一个
|
|
25
|
+
*/
|
|
26
|
+
defaultActiveKey?: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @description 切换页签的回调
|
|
30
|
+
*/
|
|
31
|
+
onChange?: (key: string) => void;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @description 主题色
|
|
35
|
+
*/
|
|
36
|
+
color?: string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @description 页签的基本样式,可选 line、card 、 filled-card、 badge-card 类型
|
|
40
|
+
*/
|
|
41
|
+
type?: TabType;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 禁止卡片交互效果
|
|
45
|
+
*/
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @description 自定义样式类
|
|
50
|
+
*/
|
|
51
|
+
className?: string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @description 自定义样式
|
|
55
|
+
*/
|
|
56
|
+
style?: React.CSSProperties;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type { TabsProps };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
type TreeNodeDefine = {
|
|
2
|
-
[key: string]: any;
|
|
3
|
-
icon?: React.ReactNode | ((node: TreeNodeDefine) => React.ReactNode);
|
|
4
|
-
/**
|
|
5
|
-
* @description 节点是否可被选中
|
|
6
|
-
* @description 如果设置为 `false` 点击该节点不会有任何的交互和事件响应(但是如果节点有 children,会自动展开 children)
|
|
7
|
-
* @default true
|
|
8
|
-
*/
|
|
9
|
-
checkable?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* @description 节点是否被禁用
|
|
12
|
-
* @description 如果设置为 `true`,节点仍会渲染灰色 checkbox/radio,但点击不会触发选中/取消选中
|
|
13
|
-
* @description 与 `checkable: false` 不同——后者会隐藏勾选控件
|
|
14
|
-
* @default false
|
|
15
|
-
*/
|
|
16
|
-
disabled?: boolean;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export type { TreeNodeDefine };
|
|
1
|
+
type TreeNodeDefine = {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
icon?: React.ReactNode | ((node: TreeNodeDefine) => React.ReactNode);
|
|
4
|
+
/**
|
|
5
|
+
* @description 节点是否可被选中
|
|
6
|
+
* @description 如果设置为 `false` 点击该节点不会有任何的交互和事件响应(但是如果节点有 children,会自动展开 children)
|
|
7
|
+
* @default true
|
|
8
|
+
*/
|
|
9
|
+
checkable?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* @description 节点是否被禁用
|
|
12
|
+
* @description 如果设置为 `true`,节点仍会渲染灰色 checkbox/radio,但点击不会触发选中/取消选中
|
|
13
|
+
* @description 与 `checkable: false` 不同——后者会隐藏勾选控件
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type { TreeNodeDefine };
|
|
@@ -1,84 +1,82 @@
|
|
|
1
1
|
import { TreeNodeDefine } from './node';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export type
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
* @
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
showSwitcher?: boolean;
|
|
84
|
-
};
|
|
2
|
+
export type CheckType = 'radio' | 'checkbox' | 'default';
|
|
3
|
+
|
|
4
|
+
export type TreeProps = {
|
|
5
|
+
data: TreeNodeDefine[];
|
|
6
|
+
/**
|
|
7
|
+
* @description 搜索值 (用于高亮显示)
|
|
8
|
+
*/
|
|
9
|
+
searchValue?: string;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @description 字段名
|
|
13
|
+
*/
|
|
14
|
+
fieldNames?: {
|
|
15
|
+
title: string;
|
|
16
|
+
value: string;
|
|
17
|
+
children: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @description 选中的节点 (受控)
|
|
22
|
+
*/
|
|
23
|
+
selectedKeys?: (string | number)[];
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @description 默认选中的节点 (非受控)
|
|
27
|
+
*/
|
|
28
|
+
defaultSelectedKeys?: (string | number)[];
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @description 展开的节点keys (受控)
|
|
32
|
+
*/
|
|
33
|
+
expandedKeys?: (string | number)[];
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @description 默认展开的节点keys (非受控)
|
|
37
|
+
*/
|
|
38
|
+
defaultExpandedKeys?: (string | number)[];
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @description 展开/收起节点时的回调
|
|
42
|
+
*/
|
|
43
|
+
onExpand?: (expandedKeys: (string | number)[]) => void;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @description 选中节点回调
|
|
47
|
+
*/
|
|
48
|
+
onSelect?: (value: string | number, node?: TreeNodeDefine) => void;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @description 取消选中节点回调
|
|
52
|
+
*/
|
|
53
|
+
onDeSelect?: (value: string | number) => void;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @description 全局节点图标渲染函数
|
|
57
|
+
*/
|
|
58
|
+
icon?: (node: TreeNodeDefine) => React.ReactNode;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @description 全局下拉箭头图标渲染函数
|
|
62
|
+
*/
|
|
63
|
+
switcherIcon?: (expanded: boolean, node: TreeNodeDefine) => React.ReactNode;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @description 父节点是否可以被选中(如果设置为 true, 则所有节点的展开/折叠必须点击箭头按钮才能正常操作)
|
|
67
|
+
*/
|
|
68
|
+
parentCheckable?: boolean;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @description 树形节点的选择样式
|
|
72
|
+
* @description 如果设置为 `radio`,则只能单选,如果设置为 `checkbox`,则可以多选,如果设置为 `default`,则节点遵循默认行为
|
|
73
|
+
* @default default
|
|
74
|
+
*/
|
|
75
|
+
checkType?: CheckType;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @description 是否显示展开/收起节点时的箭头按钮
|
|
79
|
+
* @default true
|
|
80
|
+
*/
|
|
81
|
+
showSwitcher?: boolean;
|
|
82
|
+
};
|
|
@@ -14,6 +14,8 @@ export type { TooltipProps, TooltipTrigger, TooltipWidthMode, VirtualReference }
|
|
|
14
14
|
export { Select } from './Select';
|
|
15
15
|
export { Tree } from './Tree';
|
|
16
16
|
export { default as Checkbox } from './CheckBox';
|
|
17
|
+
export { default as Radio } from './Radio';
|
|
18
|
+
/** @deprecated 拼写错误别名,请改用 `Radio` */
|
|
17
19
|
export { default as Ratio } from './Radio';
|
|
18
20
|
export { default as Tabs } from './Tabs';
|
|
19
21
|
export { default as DropDown } from './DropDown';
|