@agentscope-ai/design 1.0.8 → 1.0.10
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/lib/antd/styles/alert.style.d.ts +2 -10
- package/lib/antd/styles/alert.style.js +11 -12
- package/lib/antd/styles/breadcrumb.style.d.ts +2 -18
- package/lib/antd/styles/breadcrumb.style.js +13 -15
- package/lib/antd/styles/button.style.d.ts +2 -80
- package/lib/antd/styles/button.style.js +63 -47
- package/lib/antd/styles/dropdown.style.d.ts +2 -15
- package/lib/antd/styles/dropdown.style.js +27 -16
- package/lib/antd/styles/floatButton.style.d.ts +2 -8
- package/lib/antd/styles/floatButton.style.js +13 -12
- package/lib/antd/styles/index.style.d.ts +4 -18
- package/lib/antd/styles/index.style.js +52 -53
- package/lib/antd/styles/inputNumber.style.d.ts +2 -18
- package/lib/antd/styles/inputNumber.style.js +23 -17
- package/lib/antd/styles/message.style.d.ts +2 -5
- package/lib/antd/styles/message.style.js +9 -10
- package/lib/antd/styles/notification.style.d.ts +2 -46
- package/lib/antd/styles/notification.style.js +31 -29
- package/lib/antd/styles/popover.style.d.ts +2 -13
- package/lib/antd/styles/popover.style.js +15 -14
- package/lib/antd/styles/radio.style.d.ts +2 -24
- package/lib/antd/styles/radio.style.js +29 -18
- package/lib/antd/styles/segment.style.d.ts +2 -7
- package/lib/antd/styles/segment.style.js +11 -12
- package/lib/antd/styles/select.style.d.ts +2 -31
- package/lib/antd/styles/select.style.js +51 -28
- package/lib/antd/styles/slider.style.d.ts +2 -22
- package/lib/antd/styles/slider.style.js +19 -21
- package/lib/antd/styles/table.style.d.ts +2 -5
- package/lib/antd/styles/table.style.js +7 -10
- package/lib/antd/styles/tooltip.style.d.ts +2 -8
- package/lib/antd/styles/tooltip.style.js +13 -11
- package/lib/antd/themes/generateThemeByToken.js +8 -2
- package/lib/components/commonComponents/AlertDialog/demo/demo1.js +13 -79
- package/lib/components/commonComponents/AlertDialog/demo/demo2.js +44 -64
- package/lib/components/commonComponents/AlertDialog/index.d.ts +14 -1
- package/lib/components/commonComponents/AlertDialog/index.js +25 -17
- package/lib/components/commonComponents/AlertDialog/index.style.d.ts +1 -17
- package/lib/components/commonComponents/AlertDialog/index.style.js +16 -30
- package/lib/components/commonComponents/Anchor/demo/demo1.d.ts +0 -4
- package/lib/components/commonComponents/Anchor/demo/demo1.js +3 -4
- package/lib/components/commonComponents/Anchor/demo/demo2.d.ts +0 -4
- package/lib/components/commonComponents/Anchor/demo/demo2.js +3 -5
- package/lib/components/commonComponents/Anchor/index.js +7 -3
- package/lib/components/commonComponents/Anchor/index.style.d.ts +1 -14
- package/lib/components/commonComponents/Anchor/index.style.js +18 -23
- package/lib/components/commonComponents/Avatar/index.js +11 -7
- package/lib/components/commonComponents/Avatar/index.style.d.ts +1 -7
- package/lib/components/commonComponents/Avatar/index.style.js +6 -21
- package/lib/components/commonComponents/Breadcrumb/index.js +9 -6
- package/lib/components/commonComponents/Breadcrumb/index.style.d.ts +1 -117
- package/lib/components/commonComponents/Breadcrumb/index.style.js +32 -61
- package/lib/components/commonComponents/Button/index.d.ts +1 -1
- package/lib/components/commonComponents/Button/index.js +7 -7
- package/lib/components/commonComponents/Card/index.js +23 -20
- package/lib/components/commonComponents/Card/index.style.d.ts +1 -71
- package/lib/components/commonComponents/Card/index.style.js +24 -46
- package/lib/components/commonComponents/Checkbox/index.js +13 -10
- package/lib/components/commonComponents/Checkbox/index.style.d.ts +1 -34
- package/lib/components/commonComponents/Checkbox/index.style.js +50 -38
- package/lib/components/commonComponents/CodeBlock/index.js +15 -13
- package/lib/components/commonComponents/CodeBlock/index.style.d.ts +1 -354
- package/lib/components/commonComponents/CodeBlock/index.style.js +26 -72
- package/lib/components/commonComponents/Collapse/index.js +7 -3
- package/lib/components/commonComponents/Collapse/index.style.d.ts +1 -57
- package/lib/components/commonComponents/Collapse/index.style.js +34 -47
- package/lib/components/commonComponents/CollapsePanel/index.d.ts +10 -0
- package/lib/components/commonComponents/CollapsePanel/index.js +56 -44
- package/lib/components/commonComponents/CollapsePanel/index.style.d.ts +1 -287
- package/lib/components/commonComponents/CollapsePanel/index.style.js +42 -97
- package/lib/components/commonComponents/ConfigProvider/index.js +20 -14
- package/lib/components/commonComponents/DatePicker/index.js +45 -39
- package/lib/components/commonComponents/DatePicker/index.style.d.ts +1 -102
- package/lib/components/commonComponents/DatePicker/index.style.js +66 -61
- package/lib/components/commonComponents/Descriptions/index.js +14 -10
- package/lib/components/commonComponents/Descriptions/index.style.d.ts +1 -17
- package/lib/components/commonComponents/Descriptions/index.style.js +32 -29
- package/lib/components/commonComponents/Drawer/Confirm.d.ts +1 -1
- package/lib/components/commonComponents/Drawer/Confirm.js +26 -24
- package/lib/components/commonComponents/Drawer/index.js +15 -11
- package/lib/components/commonComponents/Drawer/index.style.d.ts +1 -84
- package/lib/components/commonComponents/Drawer/index.style.js +44 -54
- package/lib/components/commonComponents/Dropdown/index.d.ts +1 -2
- package/lib/components/commonComponents/Dropdown/index.js +15 -12
- package/lib/components/commonComponents/Dropdown/index.style.d.ts +1 -78
- package/lib/components/commonComponents/Dropdown/index.style.js +48 -40
- package/lib/components/commonComponents/EllipsisTip/index.js +14 -10
- package/lib/components/commonComponents/EllipsisTip/index.style.d.ts +1 -10
- package/lib/components/commonComponents/EllipsisTip/index.style.js +6 -24
- package/lib/components/commonComponents/Empty/index.js +46 -44
- package/lib/components/commonComponents/Empty/index.style.d.ts +1 -113
- package/lib/components/commonComponents/Empty/index.style.js +22 -51
- package/lib/components/commonComponents/FileIcon/index.js +27 -24
- package/lib/components/commonComponents/FileIcon/index.style.d.ts +1 -61
- package/lib/components/commonComponents/FileIcon/index.style.js +20 -42
- package/lib/components/commonComponents/FloatButton/demo/demo1.js +1 -1
- package/lib/components/commonComponents/FloatButton/demo/demo2.js +1 -1
- package/lib/components/commonComponents/Form/index.js +6 -5
- package/lib/components/commonComponents/Form/index.style.d.ts +1 -53
- package/lib/components/commonComponents/Form/index.style.js +26 -38
- package/lib/components/commonComponents/HelpIcon/index.js +25 -20
- package/lib/components/commonComponents/HelpIcon/index.style.d.ts +1 -16
- package/lib/components/commonComponents/HelpIcon/index.style.js +16 -29
- package/lib/components/commonComponents/IconButton/index.js +15 -11
- package/lib/components/commonComponents/IconButton/index.style.d.ts +1 -11
- package/lib/components/commonComponents/IconButton/index.style.js +10 -24
- package/lib/components/commonComponents/IconFont/index.d.ts +1 -2
- package/lib/components/commonComponents/IconFont/index.js +14 -9
- package/lib/components/commonComponents/IconFont/index.style.d.ts +1 -67
- package/lib/components/commonComponents/IconFont/index.style.js +14 -44
- package/lib/components/commonComponents/Image/index.js +8 -5
- package/lib/components/commonComponents/Image/index.style.d.ts +1 -22
- package/lib/components/commonComponents/Image/index.style.js +16 -30
- package/lib/components/commonComponents/Input/index.js +17 -11
- package/lib/components/commonComponents/Input/index.style.d.ts +1 -70
- package/lib/components/commonComponents/Input/index.style.js +46 -42
- package/lib/components/commonComponents/Modal/index.js +18 -16
- package/lib/components/commonComponents/Modal/index.style.d.ts +1 -111
- package/lib/components/commonComponents/Modal/index.style.js +54 -72
- package/lib/components/commonComponents/Pagination/index.d.ts +1 -1
- package/lib/components/commonComponents/Pagination/index.js +96 -36
- package/lib/components/commonComponents/Pagination/index.style.d.ts +1 -49
- package/lib/components/commonComponents/Pagination/index.style.js +26 -42
- package/lib/components/commonComponents/Popconfirm/demo/demo1.js +13 -0
- package/lib/components/commonComponents/Popconfirm/demo/demo2.d.ts +3 -0
- package/lib/components/commonComponents/Popconfirm/demo/demo2.js +49 -0
- package/lib/components/commonComponents/Popconfirm/index.d.ts +9 -2
- package/lib/components/commonComponents/Popconfirm/index.js +50 -8
- package/lib/components/commonComponents/PromptsEditor/demo/basic.js +5 -4
- package/lib/components/commonComponents/PromptsEditor/index.d.ts +8 -2
- package/lib/components/commonComponents/PromptsEditor/index.js +17 -11
- package/lib/components/commonComponents/RadioButton/index.js +9 -10
- package/lib/components/commonComponents/RadioButton/index.style.d.ts +1 -72
- package/lib/components/commonComponents/RadioButton/index.style.js +52 -63
- package/lib/components/commonComponents/Result/index.style.d.ts +1 -3
- package/lib/components/commonComponents/Result/index.style.js +4 -16
- package/lib/components/commonComponents/Select/demo/demo2.js +0 -1
- package/lib/components/commonComponents/SlateEditor/elements/Var.js +11 -8
- package/lib/components/commonComponents/SlateEditor/elements/index.style.d.ts +1 -14
- package/lib/components/commonComponents/SlateEditor/elements/index.style.js +4 -21
- package/lib/components/commonComponents/SlateEditor/index.js +34 -31
- package/lib/components/commonComponents/SlateEditor/index.style.d.ts +1 -28
- package/lib/components/commonComponents/SlateEditor/index.style.js +4 -36
- package/lib/components/commonComponents/Slider/{slider.input.d.ts → Input/index.d.ts} +1 -1
- package/lib/components/commonComponents/Slider/Input/index.js +93 -0
- package/lib/components/commonComponents/Slider/Input/index.style.d.ts +1 -0
- package/lib/components/commonComponents/Slider/Input/index.style.js +22 -0
- package/lib/components/commonComponents/Slider/demo/demo4.d.ts +3 -0
- package/lib/components/commonComponents/Slider/demo/demo4.js +33 -0
- package/lib/components/commonComponents/Slider/demo/demo5.d.ts +3 -0
- package/lib/components/commonComponents/Slider/demo/demo5.js +34 -0
- package/lib/components/commonComponents/Slider/index.d.ts +2 -2
- package/lib/components/commonComponents/Slider/index.js +11 -7
- package/lib/components/commonComponents/Slider/index.style.d.ts +1 -7
- package/lib/components/commonComponents/Slider/index.style.js +10 -22
- package/lib/components/commonComponents/SliderSelector/index.js +38 -35
- package/lib/components/commonComponents/SliderSelector/index.style.d.ts +1 -38
- package/lib/components/commonComponents/SliderSelector/index.style.js +20 -37
- package/lib/components/commonComponents/Spinner/index.d.ts +4 -4
- package/lib/components/commonComponents/Spinner/index.js +28 -24
- package/lib/components/commonComponents/Spinner/index.style.d.ts +1 -79
- package/lib/components/commonComponents/Spinner/index.style.js +30 -61
- package/lib/components/commonComponents/Statistic/index.js +7 -3
- package/lib/components/commonComponents/Statistic/index.style.d.ts +1 -15
- package/lib/components/commonComponents/Statistic/index.style.js +14 -26
- package/lib/components/commonComponents/Steps/index.js +10 -6
- package/lib/components/commonComponents/Steps/index.style.d.ts +1 -162
- package/lib/components/commonComponents/Steps/index.style.js +68 -78
- package/lib/components/commonComponents/Switch/index.js +14 -11
- package/lib/components/commonComponents/Switch/index.style.d.ts +1 -25
- package/lib/components/commonComponents/Switch/index.style.js +22 -33
- package/lib/components/commonComponents/Table/demo/demo1.js +1 -9
- package/lib/components/commonComponents/Table/demo/demo2.js +1 -9
- package/lib/components/commonComponents/Table/demo/demo3.js +1 -9
- package/lib/components/commonComponents/Table/demo/demo4.js +1 -9
- package/lib/components/commonComponents/Table/index.d.ts +1 -1
- package/lib/components/commonComponents/Table/index.js +11 -7
- package/lib/components/commonComponents/Table/index.style.d.ts +1 -52
- package/lib/components/commonComponents/Table/index.style.js +34 -32
- package/lib/components/commonComponents/Tabs/index.js +37 -29
- package/lib/components/commonComponents/Tabs/index.style.d.ts +1 -55
- package/lib/components/commonComponents/Tabs/index.style.js +38 -44
- package/lib/components/commonComponents/Tag/index.js +13 -9
- package/lib/components/commonComponents/Tag/index.style.d.ts +1 -56
- package/lib/components/commonComponents/Tag/index.style.js +54 -58
- package/lib/components/commonComponents/TimePicker/index.js +36 -30
- package/lib/components/commonComponents/TimePicker/index.style.d.ts +1 -71
- package/lib/components/commonComponents/TimePicker/index.style.js +54 -50
- package/lib/components/commonComponents/Tooltip/index.js +14 -10
- package/lib/components/commonComponents/Tooltip/index.style.d.ts +1 -24
- package/lib/components/commonComponents/Tooltip/index.style.js +26 -32
- package/lib/components/commonComponents/Upload/index.js +15 -9
- package/lib/components/commonComponents/Upload/index.style.d.ts +1 -125
- package/lib/components/commonComponents/Upload/index.style.js +80 -90
- package/lib/components/commonComponents/Video/Control.d.ts +19 -0
- package/lib/components/commonComponents/Video/Control.js +104 -0
- package/lib/components/commonComponents/Video/demo/demo1.d.ts +2 -0
- package/lib/components/commonComponents/Video/demo/demo1.js +12 -0
- package/lib/components/commonComponents/Video/index.d.ts +18 -0
- package/lib/components/commonComponents/Video/index.js +222 -0
- package/lib/components/commonComponents/Video/index.style.d.ts +1 -0
- package/lib/components/commonComponents/Video/index.style.js +40 -0
- package/lib/i18n/strings/en-US.json +3 -1
- package/lib/i18n/strings/zh-CN.json +3 -1
- package/lib/index.d.ts +5 -4
- package/lib/index.js +3 -2
- package/lib/libs/createStyle/index.d.ts +7 -1
- package/lib/libs/createStyle/index.js +24 -72
- package/lib/libs/env/index.js +1 -1
- package/lib/libs/generateCssVars/index.js +1 -1
- package/package.json +3 -3
- package/lib/components/commonComponents/Popconfirm/demo/demo.js +0 -155
- package/lib/components/commonComponents/Slider/slider.input.js +0 -76
- package/lib/components/commonComponents/spark.style.d.ts +0 -45
- package/lib/components/commonComponents/spark.style.js +0 -62
- package/llms/all.llms.txt +0 -4235
- package/llms/components/commonComponents/Alert/index.zh-CN.llms.txt +0 -74
- package/llms/components/commonComponents/Anchor/index.zh-CN.llms.txt +0 -71
- package/llms/components/commonComponents/Avatar/index.zh-CN.llms.txt +0 -61
- package/llms/components/commonComponents/Breadcrumb/index.zh-CN.llms.txt +0 -89
- package/llms/components/commonComponents/Button/index.zh-CN.llms.txt +0 -99
- package/llms/components/commonComponents/Card/index.zh-CN.llms.txt +0 -79
- package/llms/components/commonComponents/Checkbox/index.zh-CN.llms.txt +0 -88
- package/llms/components/commonComponents/CodeBlock/index.zh-CN.llms.txt +0 -34
- package/llms/components/commonComponents/Collapse/index.zh-CN.llms.txt +0 -76
- package/llms/components/commonComponents/CollapsePanel/index.zh-CN.llms.txt +0 -75
- package/llms/components/commonComponents/DatePicker/index.zh-CN.llms.txt +0 -227
- package/llms/components/commonComponents/Descriptions/index.zh-CN.llms.txt +0 -60
- package/llms/components/commonComponents/Drawer/index.zh-CN.llms.txt +0 -87
- package/llms/components/commonComponents/Dropdown/index.zh-CN.llms.txt +0 -87
- package/llms/components/commonComponents/Empty/index.zh-CN.llms.txt +0 -100
- package/llms/components/commonComponents/FloatButton/index.zh-CN.llms.txt +0 -70
- package/llms/components/commonComponents/Form/index.zh-CN.llms.txt +0 -383
- package/llms/components/commonComponents/IconButton/index.zh-CN.llms.txt +0 -68
- package/llms/components/commonComponents/Image/index.zh-CN.llms.txt +0 -118
- package/llms/components/commonComponents/Input/index.zh-CN.llms.txt +0 -168
- package/llms/components/commonComponents/InputNumber/index.zh-CN.llms.txt +0 -66
- package/llms/components/commonComponents/Message/index.zh-CN.llms.txt +0 -114
- package/llms/components/commonComponents/Modal/index.zh-CN.llms.txt +0 -154
- package/llms/components/commonComponents/Notification/index.zh-CN.llms.txt +0 -118
- package/llms/components/commonComponents/Pagination/index.zh-CN.llms.txt +0 -62
- package/llms/components/commonComponents/Popover/index.zh-CN.llms.txt +0 -56
- package/llms/components/commonComponents/Progress/index.zh-CN.llms.txt +0 -64
- package/llms/components/commonComponents/Radio/index.zh-CN.llms.txt +0 -75
- package/llms/components/commonComponents/RadioButton/index.zh-CN.llms.txt +0 -94
- package/llms/components/commonComponents/Result/index.zh-CN.llms.txt +0 -63
- package/llms/components/commonComponents/Select/index.zh-CN.llms.txt +0 -120
- package/llms/components/commonComponents/Skeleton/index.zh-CN.llms.txt +0 -71
- package/llms/components/commonComponents/Slider/index.zh-CN.llms.txt +0 -83
- package/llms/components/commonComponents/Spinner/index.zh-CN.llms.txt +0 -38
- package/llms/components/commonComponents/Statistic/index.zh-CN.llms.txt +0 -77
- package/llms/components/commonComponents/Steps/index.zh-CN.llms.txt +0 -82
- package/llms/components/commonComponents/Switch/index.zh-CN.llms.txt +0 -58
- package/llms/components/commonComponents/Table/index.zh-CN.llms.txt +0 -228
- package/llms/components/commonComponents/Tabs/index.zh-CN.llms.txt +0 -95
- package/llms/components/commonComponents/Tag/index.zh-CN.llms.txt +0 -57
- package/llms/components/commonComponents/TimePicker/index.zh-CN.llms.txt +0 -104
- package/llms/components/commonComponents/Tooltip/index.zh-CN.llms.txt +0 -63
- package/llms/components/commonComponents/Upload/index.zh-CN.llms.txt +0 -105
- package/llms/index.llms.txt +0 -45
- /package/lib/components/commonComponents/Popconfirm/demo/{demo.d.ts → demo1.d.ts} +0 -0
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<DemoTitle title="Statistic" desc="展示统计数值"></DemoTitle>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
示例
|
|
10
|
-
|
|
11
|
-
<Install>Statistic</Install>
|
|
12
|
-
|
|
13
|
-
#### 统计数值示例
|
|
14
|
-
|
|
15
|
-
以下是此组件的示例和变体
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
通过前缀和后缀添加元素
|
|
22
|
-
|
|
23
|
-
#### API
|
|
24
|
-
|
|
25
|
-
本组件完全兼容 antd 同名组件,详情可访问 [antd statistic](https://ant.design/components/statistic-cn) 查看更多 API
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## antd API
|
|
29
|
-
|
|
30
|
-
通用属性参考:[通用属性](/docs/react/common-props)
|
|
31
|
-
|
|
32
|
-
#### Statistic
|
|
33
|
-
|
|
34
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
35
|
-
|--------|--------|--------|--------|--------|
|
|
36
|
-
| decimalSeparator | 设置小数点 | string | . | |
|
|
37
|
-
| formatter | 自定义数值展示 | (value) => ReactNode | - | |
|
|
38
|
-
| groupSeparator | 设置千分位标识符 | string | , | |
|
|
39
|
-
| loading | 数值是否加载中 | boolean | false | 4.8.0 |
|
|
40
|
-
| precision | 数值精度 | number | - | |
|
|
41
|
-
| prefix | 设置数值的前缀 | ReactNode | - | |
|
|
42
|
-
| suffix | 设置数值的后缀 | ReactNode | - | |
|
|
43
|
-
| title | 数值的标题 | ReactNode | - | |
|
|
44
|
-
| value | 数值内容 | string | number | - | |
|
|
45
|
-
| valueStyle | 设置数值区域的样式 | CSSProperties | - | |
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
#### Statistic.Countdown <Badge type="error">Deprecated</Badge>
|
|
49
|
-
|
|
50
|
-
<Antd component="Alert" message="版本 >= 5.25.0 时请使用 Statistic.Timer 作为替代方案。" type="warning" banner="true"></Antd>
|
|
51
|
-
|
|
52
|
-
<!-- prettier-ignore -->
|
|
53
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
54
|
-
|--------|--------|--------|--------|--------|
|
|
55
|
-
| format | 格式化倒计时展示,参考 | string | HH:mm:ss | |
|
|
56
|
-
| prefix | 设置数值的前缀 | ReactNode | - | |
|
|
57
|
-
| suffix | 设置数值的后缀 | ReactNode | - | |
|
|
58
|
-
| title | 数值的标题 | ReactNode | - | |
|
|
59
|
-
| value | 数值内容 | number | - | |
|
|
60
|
-
| valueStyle | 设置数值区域的样式 | CSSProperties | - | |
|
|
61
|
-
| onFinish | 倒计时完成时触发 | () => void | - | |
|
|
62
|
-
| onChange | 倒计时时间变化时触发 | (value: number) => void | - | |
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
#### Statistic.Timer <Badge>5.25.0+</Badge>
|
|
66
|
-
|
|
67
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
68
|
-
|--------|--------|--------|--------|--------|
|
|
69
|
-
| type | 计时类型,正计时或者倒计时 | countdown | - | |
|
|
70
|
-
| format | 格式化倒计时展示,参考 | string | HH:mm:ss | |
|
|
71
|
-
| prefix | 设置数值的前缀 | ReactNode | - | |
|
|
72
|
-
| suffix | 设置数值的后缀 | ReactNode | - | |
|
|
73
|
-
| title | 数值的标题 | ReactNode | - | |
|
|
74
|
-
| value | 数值内容 | number | - | |
|
|
75
|
-
| valueStyle | 设置数值区域的样式 | CSSProperties | - | |
|
|
76
|
-
| onFinish | 倒计时完成时触发, 指定为 | () => void | - | |
|
|
77
|
-
| onChange | 倒计时时间变化时触发 | (value: number) => void | - | |
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<DemoTitle title="Steps" desc="引导用户按照流程完成任务的导航条。"></DemoTitle>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
示例
|
|
10
|
-
|
|
11
|
-
<Install>Steps</Install>
|
|
12
|
-
|
|
13
|
-
#### 步骤条示例
|
|
14
|
-
|
|
15
|
-
以下是此组件的示例和变体
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
附带描述
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
垂直方向
|
|
28
|
-
|
|
29
|
-
#### API
|
|
30
|
-
|
|
31
|
-
本组件完全兼容 antd 同名组件,详情可访问 [antd steps](https://ant.design/components/steps-cn) 查看更多 API
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
## antd API
|
|
35
|
-
|
|
36
|
-
通用属性参考:[通用属性](/docs/react/common-props)
|
|
37
|
-
|
|
38
|
-
### Steps
|
|
39
|
-
|
|
40
|
-
整体步骤条。
|
|
41
|
-
|
|
42
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
43
|
-
|--------|--------|--------|--------|--------|
|
|
44
|
-
| className | 步骤条类名 | string | - | |
|
|
45
|
-
| current | 指定当前步骤,从 0 开始记数。在子 Step 元素中,可以通过 | number | 0 | |
|
|
46
|
-
| direction | 指定步骤条方向。目前支持水平( | string | horizontal | |
|
|
47
|
-
| initial | 起始序号,从 0 开始记数 | number | 0 | |
|
|
48
|
-
| labelPlacement | 指定标签放置位置,默认水平放图标右侧,可选 | string | horizontal | |
|
|
49
|
-
| percent | 当前 | number | - | 4.5.0 |
|
|
50
|
-
| progressDot | 点状步骤条,可以设置为一个 function,labelPlacement 将强制为 | boolean | (iconDot, {index, status, title, description}) => ReactNode | false | |
|
|
51
|
-
| responsive | 当屏幕宽度小于 | boolean | true | |
|
|
52
|
-
| size | 指定大小,目前支持普通( | string | default | |
|
|
53
|
-
| status | 指定当前步骤的状态,可选 | string | process | |
|
|
54
|
-
| type | 步骤条类型,可选 | string | default | inline: 5.0 |
|
|
55
|
-
| onChange | 点击切换步骤时触发 | (current) => void | - | |
|
|
56
|
-
| items | 配置选项卡内容 | | [] | 4.24.0 |
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
### `type="inline"`
|
|
60
|
-
|
|
61
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
62
|
-
|--------|--------|--------|--------|--------|
|
|
63
|
-
| className | 步骤条类名 | string | - | |
|
|
64
|
-
| current | 指定当前步骤,从 0 开始记数。在子 Step 元素中,可以通过 | number | 0 | |
|
|
65
|
-
| initial | 起始序号,从 0 开始记数 | number | 0 | |
|
|
66
|
-
| status | 指定当前步骤的状态,可选 | string | process | |
|
|
67
|
-
| onChange | 点击切换步骤时触发 | (current) => void | - | |
|
|
68
|
-
| items | 配置选项卡内容,不支持 | | [] | 4.24.0 |
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
### StepItem
|
|
72
|
-
|
|
73
|
-
步骤条内的每一个步骤。
|
|
74
|
-
|
|
75
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
76
|
-
|--------|--------|--------|--------|--------|
|
|
77
|
-
| description | 步骤的详情描述,可选 | ReactNode | - | |
|
|
78
|
-
| disabled | 禁用点击 | boolean | false | |
|
|
79
|
-
| icon | 步骤图标的类型,可选 | ReactNode | - | |
|
|
80
|
-
| status | 指定状态。当不配置该属性时,会使用 Steps 的 | string | wait | |
|
|
81
|
-
| subTitle | 子标题 | ReactNode | - | |
|
|
82
|
-
| title | 标题 | ReactNode | - | |
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<DemoTitle title="Switch" desc="使用开关切换两种状态之间。"></DemoTitle>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
示例
|
|
10
|
-
|
|
11
|
-
<Install>Switch</Install>
|
|
12
|
-
|
|
13
|
-
#### 开关示例
|
|
14
|
-
|
|
15
|
-
以下是此开关组件的示例和变体
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
两种大小
|
|
22
|
-
|
|
23
|
-
#### API
|
|
24
|
-
|
|
25
|
-
| <div><span class="lang-en">Attribute</span><span class="lang-cn">属性名</span></div> | <div><span class="lang-en">Description</span><span class="lang-cn">描述</span></div> | <div><span class="lang-en">Type</span><span class="lang-cn">类型</span></div> | <div><span class="lang-en">Default</span><span class="lang-cn">默认值</span></div> |
|
|
26
|
-
|--------|--------|--------|--------|
|
|
27
|
-
| label | <div><span class="lang-en">content after the switch</span><span class="lang-cn">Switch后的内容</span></div> | ReactNode | |
|
|
28
|
-
|
|
29
|
-
本组件完全兼容 antd 同名组件,详情可访问 [antd switch](https://ant.design/components/switch-cn) 查看更多 API
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
## antd API
|
|
33
|
-
|
|
34
|
-
通用属性参考:[通用属性](/docs/react/common-props)
|
|
35
|
-
|
|
36
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
37
|
-
|--------|--------|--------|--------|--------|
|
|
38
|
-
| autoFocus | 组件自动获取焦点 | boolean | false | |
|
|
39
|
-
| checked | 指定当前是否选中 | boolean | false | |
|
|
40
|
-
| checkedChildren | 选中时的内容 | ReactNode | - | |
|
|
41
|
-
| className | Switch 器类名 | string | - | |
|
|
42
|
-
| defaultChecked | 初始是否选中 | boolean | false | |
|
|
43
|
-
| defaultValue | defaultChecked | boolean | - | 5.12.0 |
|
|
44
|
-
| disabled | 是否禁用 | boolean | false | |
|
|
45
|
-
| loading | 加载中的开关 | boolean | false | |
|
|
46
|
-
| size | 开关大小,可选值: | string | default | |
|
|
47
|
-
| unCheckedChildren | 非选中时的内容 | ReactNode | - | |
|
|
48
|
-
| value | checked | boolean | - | 5.12.0 |
|
|
49
|
-
| onChange | 变化时的回调函数 | function(checked: boolean, event: Event) | - | |
|
|
50
|
-
| onClick | 点击时的回调函数 | function(checked: boolean, event: Event) | - | |
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
## 方法
|
|
54
|
-
|
|
55
|
-
| 名称 | 描述 |
|
|
56
|
-
|--------|--------|
|
|
57
|
-
| blur() | 移除焦点 |
|
|
58
|
-
| focus() | 获取焦点 |
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<DemoTitle title="Table" desc="展示行列数据。"></DemoTitle>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
示例
|
|
10
|
-
|
|
11
|
-
<Install>Table</Install>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
首列为单选框时
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
首列为多选框时
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
支持从列头排序
|
|
30
|
-
|
|
31
|
-
#### FAQs
|
|
32
|
-
|
|
33
|
-
本组件完全兼容 antd 同名组件,详情可访问 [antd table](https://ant.design/components/table-cn) 查看更多 API
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
## antd API
|
|
37
|
-
|
|
38
|
-
通用属性参考:[通用属性](/docs/react/common-props)
|
|
39
|
-
|
|
40
|
-
### Table
|
|
41
|
-
|
|
42
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
43
|
-
|--------|--------|--------|--------|--------|
|
|
44
|
-
| bordered | 是否展示外边框和列边框 | boolean | false | |
|
|
45
|
-
| columns | 表格列的配置描述,具体项见下表 | | - | |
|
|
46
|
-
| components | 覆盖默认的 table 元素 | | - | |
|
|
47
|
-
| dataSource | 数据数组 | object[] | - | |
|
|
48
|
-
| expandable | 配置展开属性 | | - | |
|
|
49
|
-
| footer | 表格尾部 | function(currentPageData) | - | |
|
|
50
|
-
| getPopupContainer | 设置表格内各类浮层的渲染节点,如筛选菜单 | (triggerNode) => HTMLElement | () => TableHtmlElement | |
|
|
51
|
-
| loading | 页面是否加载中 | boolean | | false | |
|
|
52
|
-
| locale | 默认文案设置,目前包括排序、过滤、空数据文案 | object | | |
|
|
53
|
-
| pagination | 分页器,参考 | object | | - | |
|
|
54
|
-
| rowClassName | 表格行的类名 | function(record, index): string | - | |
|
|
55
|
-
| rowKey | 表格行 key 的取值,可以是字符串或一个函数 | string | function(record): string | key | |
|
|
56
|
-
| rowSelection | 表格行是否可选择, | object | - | |
|
|
57
|
-
| rowHoverable | 表格行是否开启 hover 交互 | boolean | true | 5.16.0 |
|
|
58
|
-
| scroll | 表格是否可滚动,也可以指定滚动区域的宽、高, | object | - | |
|
|
59
|
-
| showHeader | 是否显示表头 | boolean | true | |
|
|
60
|
-
| showSorterTooltip | 表头是否显示下一次排序的 tooltip 提示。当参数类型为对象时,将被设置为 Tooltip 的属性 | boolean | | { target: 'full-header' } | 5.16.0 |
|
|
61
|
-
| size | 表格大小 | large | large | |
|
|
62
|
-
| sortDirections | 支持的排序方式,取值为 | Array | [ | |
|
|
63
|
-
| sticky | 设置粘性头部和滚动条 | boolean | | - | 4.6.0 (getContainer: 4.7.0) |
|
|
64
|
-
| summary | 总结栏 | (currentData) => ReactNode | - | |
|
|
65
|
-
| tableLayout | 表格元素的 | - | | 无 | |
|
|
66
|
-
| title | 表格标题 | function(currentPageData) | - | |
|
|
67
|
-
| virtual | 支持虚拟列表 | boolean | - | 5.9.0 |
|
|
68
|
-
| onChange | 分页、排序、筛选变化时触发 | function(pagination, filters, sorter, extra: { currentDataSource: [], action: | - | |
|
|
69
|
-
| onHeaderRow | 设置头部行属性 | function(columns, index) | - | |
|
|
70
|
-
| onRow | 设置行属性 | function(record, index) | - | |
|
|
71
|
-
| onScroll | 表单内容滚动时触发(虚拟滚动下只有垂直滚动会触发事件) | function(event) | - | 5.16.0 |
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
### Table ref
|
|
75
|
-
|
|
76
|
-
| 参数 | 说明 | 类型 | 版本 |
|
|
77
|
-
|--------|--------|--------|--------|
|
|
78
|
-
| nativeElement | 最外层 div 元素 | HTMLDivElement | 5.11.0 |
|
|
79
|
-
| scrollTo | 滚动到目标位置(设置 | (config: { index?: number, key?: React.Key, top?: number }) => void | 5.11.0 |
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
#### onRow 用法
|
|
83
|
-
|
|
84
|
-
适用于 `onRow` `onHeaderRow` `onCell` `onHeaderCell`。
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
### Column
|
|
91
|
-
|
|
92
|
-
列描述数据对象,是 columns 中的一项,Column 使用相同的 API。
|
|
93
|
-
|
|
94
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
95
|
-
|--------|--------|--------|--------|--------|
|
|
96
|
-
| align | 设置列的对齐方式 | left | left | |
|
|
97
|
-
| className | 列样式类名 | string | - | |
|
|
98
|
-
| colSpan | 表头列合并,设置为 0 时,不渲染 | number | - | |
|
|
99
|
-
| dataIndex | 列数据在数据项中对应的路径,支持通过数组查询嵌套路径 | string | string[] | - | |
|
|
100
|
-
| defaultFilteredValue | 默认筛选值 | string[] | - | |
|
|
101
|
-
| filterResetToDefaultFilteredValue | 点击重置按钮的时候,是否恢复默认筛选值 | boolean | false | |
|
|
102
|
-
| defaultSortOrder | 默认排序顺序 | ascend | - | |
|
|
103
|
-
| ellipsis | 超过宽度将自动省略,暂不支持和排序筛选一起使用。 | boolean | { showTitle?: boolean } | false | showTitle: 4.3.0 |
|
|
104
|
-
| filterDropdown | 可以自定义筛选菜单,此函数只负责渲染图层,需要自行编写各种交互 | ReactNode | (props: | - | |
|
|
105
|
-
| filtered | 标识数据是否经过过滤,筛选图标会高亮 | boolean | false | |
|
|
106
|
-
| filteredValue | 筛选的受控属性,外界可用此控制列的筛选状态,值为已筛选的 value 数组 | string[] | - | |
|
|
107
|
-
| filterIcon | 自定义 filter 图标。 | ReactNode | (filtered: boolean) => ReactNode | false | |
|
|
108
|
-
| filterOnClose | 是否在筛选菜单关闭时触发筛选 | boolean | true | 5.15.0 |
|
|
109
|
-
| filterMultiple | 是否多选 | boolean | true | |
|
|
110
|
-
| filterMode | 指定筛选菜单的用户界面 | 'menu' | 'tree' | 'menu' | 4.17.0 |
|
|
111
|
-
| filterSearch | 筛选菜单项是否可搜索 | boolean | function(input, record):boolean | false | boolean:4.17.0 function:4.19.0 |
|
|
112
|
-
| filters | 表头的筛选菜单项 | object[] | - | |
|
|
113
|
-
| filterDropdownProps | 自定义下拉属性,在 | | - | 5.22.0 |
|
|
114
|
-
| fixed | (IE 下无效)列是否固定,可选 | boolean | string | false | |
|
|
115
|
-
| key | React 需要的 key,如果已经设置了唯一的 | string | - | |
|
|
116
|
-
| render | 生成复杂数据的渲染函数,参数分别为当前单元格的值,当前行数据,行索引 | function(value, record, index) {} | - | |
|
|
117
|
-
| responsive | 响应式 breakpoint 配置列表。未设置则始终可见。 | | - | 4.2.0 |
|
|
118
|
-
| rowScope | 设置列范围 | row | - | 5.1.0 |
|
|
119
|
-
| shouldCellUpdate | 自定义单元格渲染时机 | (record, prevRecord) => boolean | - | 4.3.0 |
|
|
120
|
-
| showSorterTooltip | 表头显示下一次排序的 tooltip 提示, 覆盖 table 中 | boolean | | { target: 'full-header' } | 5.16.0 |
|
|
121
|
-
| sortDirections | 支持的排序方式,覆盖 | Array | [ | |
|
|
122
|
-
| sorter | 排序函数,本地排序使用一个函数(参考 | function | boolean | { compare: function, multiple: number } | - | |
|
|
123
|
-
| sortOrder | 排序的受控属性,外界可用此控制列的排序,可设置为 | ascend | - | |
|
|
124
|
-
| sortIcon | 自定义 sort 图标 | (props: { sortOrder }) => ReactNode | - | 5.6.0 |
|
|
125
|
-
| title | 列头显示文字(函数用法 | ReactNode | ({ sortOrder, sortColumn, filters }) => ReactNode | - | |
|
|
126
|
-
| width | 列宽度( | string | number | - | |
|
|
127
|
-
| minWidth | 最小列宽度,只在 | number | - | 5.21.0 |
|
|
128
|
-
| hidden | 隐藏列 | boolean | false | 5.13.0 |
|
|
129
|
-
| onCell | 设置单元格属性 | function(record, rowIndex) | - | |
|
|
130
|
-
| onFilter | 本地模式下,确定筛选的运行函数 | function | - | |
|
|
131
|
-
| onHeaderCell | 设置头部单元格属性 | function(column) | - | |
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
### ColumnGroup
|
|
135
|
-
|
|
136
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
137
|
-
|--------|--------|--------|--------|
|
|
138
|
-
| title | 列头显示文字 | ReactNode | - |
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
### pagination
|
|
142
|
-
|
|
143
|
-
分页的配置项。
|
|
144
|
-
|
|
145
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
146
|
-
|--------|--------|--------|--------|
|
|
147
|
-
| position | 指定分页显示的位置, 取值为 | Array | [ |
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
更多配置项,请查看 [`Pagination`](/components/pagination-cn)。
|
|
151
|
-
|
|
152
|
-
### expandable
|
|
153
|
-
|
|
154
|
-
展开功能的配置。
|
|
155
|
-
|
|
156
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
157
|
-
|--------|--------|--------|--------|--------|
|
|
158
|
-
| childrenColumnName | 指定树形结构的列名 | string | children | |
|
|
159
|
-
| columnTitle | 自定义展开列表头 | ReactNode | - | 4.23.0 |
|
|
160
|
-
| columnWidth | 自定义展开列宽度 | string | number | - | |
|
|
161
|
-
| defaultExpandAllRows | 初始时,是否展开所有行 | boolean | false | |
|
|
162
|
-
| defaultExpandedRowKeys | 默认展开的行 | string[] | - | |
|
|
163
|
-
| expandedRowClassName | 展开行的 className | string | (record, index, indent) => string | - | string: 5.22.0 |
|
|
164
|
-
| expandedRowKeys | 展开的行,控制属性 | string[] | - | |
|
|
165
|
-
| expandedRowRender | 额外的展开行 | function(record, index, indent, expanded): ReactNode | - | |
|
|
166
|
-
| expandIcon | 自定义展开图标,参考 | function(props): ReactNode | - | |
|
|
167
|
-
| expandRowByClick | 通过点击行来展开子行 | boolean | false | |
|
|
168
|
-
| fixed | 控制展开图标是否固定,可选 | boolean | string | false | 4.16.0 |
|
|
169
|
-
| indentSize | 展示树形数据时,每层缩进的宽度,以 px 为单位 | number | 15 | |
|
|
170
|
-
| rowExpandable | 设置是否允许行展开( | (record) => boolean | - | |
|
|
171
|
-
| showExpandColumn | 是否显示展开图标列 | boolean | true | 4.18.0 |
|
|
172
|
-
| onExpand | 点击展开图标时触发 | function(expanded, record) | - | |
|
|
173
|
-
| onExpandedRowsChange | 展开的行变化时触发 | function(expandedRows) | - | |
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
### rowSelection
|
|
177
|
-
|
|
178
|
-
选择功能的配置。
|
|
179
|
-
|
|
180
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
181
|
-
|--------|--------|--------|--------|--------|
|
|
182
|
-
| align | 设置选择列的对齐方式 | left | left | 5.25.0 |
|
|
183
|
-
| checkStrictly | checkable 状态下节点选择完全受控(父子数据选中状态不再关联) | boolean | true | 4.4.0 |
|
|
184
|
-
| columnTitle | 自定义列表选择框标题 | ReactNode | (originalNode: ReactNode) => ReactNode | - | |
|
|
185
|
-
| columnWidth | 自定义列表选择框宽度 | string | number | 32px | |
|
|
186
|
-
| fixed | 把选择框列固定在左边 | boolean | - | |
|
|
187
|
-
| getCheckboxProps | 选择框的默认属性配置 | function(record) | - | |
|
|
188
|
-
| hideSelectAll | 隐藏全选勾选框与自定义选择项 | boolean | false | 4.3.0 |
|
|
189
|
-
| preserveSelectedRowKeys | 当数据被删除时仍然保留选项的 | boolean | - | 4.4.0 |
|
|
190
|
-
| renderCell | 渲染勾选框,用法与 Column 的 | function(checked, record, index, originNode) {} | - | 4.1.0 |
|
|
191
|
-
| selectedRowKeys | 指定选中项的 key 数组,需要和 onChange 进行配合 | string[] | number[] | [] | |
|
|
192
|
-
| defaultSelectedRowKeys | 默认选中项的 key 数组 | string[] | number[] | [] | |
|
|
193
|
-
| selections | 自定义选择项 | object[] | boolean | true | |
|
|
194
|
-
| type | 多选/单选 | checkbox | checkbox | |
|
|
195
|
-
| onCell | 设置单元格属性,用法与 Column 的 | function(record, rowIndex) | - | 5.5.0 |
|
|
196
|
-
| onChange | 选中项发生变化时的回调 | function(selectedRowKeys, selectedRows, info: { type }) | - | info.type |
|
|
197
|
-
| onSelect | 用户手动选择/取消选择某行的回调 | function(record, selected, selectedRows, nativeEvent) | - | |
|
|
198
|
-
| onSelectAll | 用户手动选择/取消选择所有行的回调 | function(selected, selectedRows, changeRows) | - | |
|
|
199
|
-
| onSelectInvert | 用户手动选择反选的回调 | function(selectedRowKeys) | - | |
|
|
200
|
-
| onSelectNone | 用户清空选择的回调 | function() | - | |
|
|
201
|
-
| onSelectMultiple | 用户使用键盘 shift 选择多行的回调 | function(selected, selectedRows, changeRows) | - | |
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
### scroll
|
|
205
|
-
|
|
206
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
207
|
-
|--------|--------|--------|--------|
|
|
208
|
-
| scrollToFirstRowOnChange | 当分页、排序、筛选变化后是否滚动到表格顶部 | boolean | - |
|
|
209
|
-
| x | 设置横向滚动,也可用于指定滚动区域的宽,可以设置为像素值,百分比, | string | number | true | - |
|
|
210
|
-
| y | 设置纵向滚动,也可用于指定滚动区域的高,可以设置为像素值 | string | number | - |
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
### selection
|
|
214
|
-
|
|
215
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
216
|
-
|--------|--------|--------|--------|
|
|
217
|
-
| key | React 需要的 key,建议设置 | string | - |
|
|
218
|
-
| text | 选择项显示的文字 | ReactNode | - |
|
|
219
|
-
| onSelect | 选择项点击回调 | function(changeableRowKeys) | - |
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
## 在 TypeScript 中使用
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
TypeScript 里使用 Table 的 [CodeSandbox 实例](https://codesandbox.io/s/serene-platform-0jo5t)。
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<DemoTitle title="Tabs" desc="用户可以通过点击不同的标签在同一页面中查看不同的内容区域。"></DemoTitle>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
示例
|
|
10
|
-
|
|
11
|
-
<Install>Tabs</Install>
|
|
12
|
-
|
|
13
|
-
## 标签页示例
|
|
14
|
-
|
|
15
|
-
以下是此组件的示例和变体
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
默认样式
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
下划线样式
|
|
28
|
-
|
|
29
|
-
#### API
|
|
30
|
-
|
|
31
|
-
| <div><span class="lang-en">Attribute</span><span class="lang-cn">属性名</span></div> | <div><span class="lang-en">Description</span><span class="lang-cn">描述</span></div> | <div><span class="lang-en">Type</span><span class="lang-cn">类型</span></div> | <div><span class="lang-en">Default</span><span class="lang-cn">默认值</span></div> |
|
|
32
|
-
|--------|--------|--------|--------|
|
|
33
|
-
| type | <div><span class="lang-en">Type</span><span class="lang-cn">类型</span></div> | 'segmented' | 'card' | 'editable-card' | 'line' | 'segmented' |
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
本组件完全兼容 antd 同名组件,详情可访问[antd tabs](https://ant.design/components/tabs-cn/)查看更多 API。
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
## antd API
|
|
40
|
-
|
|
41
|
-
通用属性参考:[通用属性](/docs/react/common-props)
|
|
42
|
-
|
|
43
|
-
### Tabs
|
|
44
|
-
|
|
45
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
46
|
-
|--------|--------|--------|--------|--------|
|
|
47
|
-
| activeKey | 当前激活 tab 面板的 key | string | - | |
|
|
48
|
-
| addIcon | 自定义添加按钮,设置 | ReactNode | <PlusOutlined /> | 4.4.0 |
|
|
49
|
-
| animated | 是否使用动画切换 Tabs | boolean| { inkBar: boolean, tabPane: boolean } | { inkBar: true, tabPane: false } | |
|
|
50
|
-
| centered | 标签居中展示 | boolean | false | 4.4.0 |
|
|
51
|
-
| defaultActiveKey | 初始化选中面板的 key,如果没有设置 activeKey | string | 第一个面板的 key | |
|
|
52
|
-
| hideAdd | 是否隐藏加号图标,在 | boolean | false | |
|
|
53
|
-
| indicator | 自定义指示条的长度和对齐方式 | { size?: number | (origin: number) => number; align: | - | 5.13.0 |
|
|
54
|
-
| items | 配置选项卡内容 | | [] | 4.23.0 |
|
|
55
|
-
| more | 自定义折叠菜单属性 | | { icon: | |
|
|
56
|
-
| removeIcon | 自定义删除按钮,设置 | ReactNode | <CloseOutlined /> | 5.15.0 |
|
|
57
|
-
| popupClassName | 更多菜单的 | string | - | 4.21.0 |
|
|
58
|
-
| renderTabBar | 替换 TabBar,用于二次封装标签头 | (props: DefaultTabBarProps, DefaultTabBar: React.ComponentClass) => React.ReactElement | - | |
|
|
59
|
-
| size | 大小,提供 | string | middle | |
|
|
60
|
-
| tabBarExtraContent | tab bar 上额外的元素 | ReactNode | {left?: ReactNode, right?: ReactNode} | - | object: 4.6.0 |
|
|
61
|
-
| tabBarGutter | tabs 之间的间隙 | number | - | |
|
|
62
|
-
| tabBarStyle | tab bar 的样式对象 | CSSProperties | - | |
|
|
63
|
-
| tabPosition | 页签位置,可选值有 | string | top | |
|
|
64
|
-
| | 被隐藏时是否销毁 DOM 结构,使用 | boolean | false | |
|
|
65
|
-
| destroyOnHidden | 被隐藏时是否销毁 DOM 结构 | boolean | false | 5.25.0 |
|
|
66
|
-
| onChange | 切换面板的回调 | (activeKey: string) => void | - | |
|
|
67
|
-
| onEdit | 新增和删除页签的回调,在 | (action === 'add' ? event : targetKey, action) => void | - | |
|
|
68
|
-
| onTabClick | tab 被点击的回调 | (key: string, event: MouseEvent) => void | - | |
|
|
69
|
-
| onTabScroll | tab 滚动时触发 | ({ direction: | - | 4.3.0 |
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
更多属性查看 [rc-tabs tabs](https://github.com/react-component/tabs#tabs)
|
|
73
|
-
|
|
74
|
-
### TabItemType
|
|
75
|
-
|
|
76
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
77
|
-
|--------|--------|--------|--------|--------|
|
|
78
|
-
| closeIcon | 自定义关闭图标,在 | ReactNode | - | |
|
|
79
|
-
| | 被隐藏时是否销毁 DOM 结构,使用 | boolean | false | 5.11.0 |
|
|
80
|
-
| destroyOnHidden | 被隐藏时是否销毁 DOM 结构 | boolean | false | 5.25.0 |
|
|
81
|
-
| disabled | 禁用某一项 | boolean | false | |
|
|
82
|
-
| forceRender | 被隐藏时是否渲染 DOM 结构 | boolean | false | |
|
|
83
|
-
| key | 对应 activeKey | string | - | |
|
|
84
|
-
| label | 选项卡头显示文字 | ReactNode | - | |
|
|
85
|
-
| icon | 选项卡头显示图标 | ReactNode | - | 5.12.0 |
|
|
86
|
-
| children | 选项卡头显示内容 | ReactNode | - | |
|
|
87
|
-
| closable | 是否显示选项卡的关闭按钮,在 | boolean | true | |
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
### MoreProps
|
|
91
|
-
|
|
92
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
93
|
-
|--------|--------|--------|--------|--------|
|
|
94
|
-
| icon | 自定义折叠图标 | ReactNode | - | |
|
|
95
|
-
| | | | | |
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<DemoTitle title="Tag" desc="进行标记和分类的小标签"></DemoTitle>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
示例
|
|
10
|
-
|
|
11
|
-
<Install>Tag</Install>
|
|
12
|
-
|
|
13
|
-
#### 标签示例
|
|
14
|
-
|
|
15
|
-
以下是此标签组件的示例和变体
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
支持 Icon
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
支持关闭
|
|
27
|
-
|
|
28
|
-
#### API
|
|
29
|
-
|
|
30
|
-
| <div><span class="lang-en">Attribute</span><span class="lang-cn">属性名</span></div> | <div><span class="lang-en">Description</span><span class="lang-cn">描述</span></div> | <div><span class="lang-en">Type</span><span class="lang-cn">类型</span></div> | <div><span class="lang-en">Default</span><span class="lang-cn">默认值</span></div> |
|
|
31
|
-
|--------|--------|--------|--------|
|
|
32
|
-
| size | <div><span class="lang-en">size of the tag</span><span class="lang-cn">尺寸</span></div> | 'small' | 'middle' | 'middle' |
|
|
33
|
-
|
|
34
|
-
本组件完全兼容 antd 同名组件,详情可访问 [antd tag](https://ant.design/components/tag-cn) 查看更多 API
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
## antd API
|
|
38
|
-
|
|
39
|
-
通用属性参考:[通用属性](/docs/react/common-props)
|
|
40
|
-
|
|
41
|
-
### Tag
|
|
42
|
-
|
|
43
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
44
|
-
|--------|--------|--------|--------|--------|
|
|
45
|
-
| closeIcon | 自定义关闭按钮。5.7.0:设置为 | ReactNode | false | 4.4.0 |
|
|
46
|
-
| color | 标签色 | string | - | |
|
|
47
|
-
| icon | 设置图标 | ReactNode | - | |
|
|
48
|
-
| bordered | 是否有边框 | boolean | true | 5.4.0 |
|
|
49
|
-
| onClose | 关闭时的回调(可通过 | (e: React.MouseEvent<HTMLElement, MouseEvent>) => void | - | |
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
### Tag.CheckableTag
|
|
53
|
-
|
|
54
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
55
|
-
|--------|--------|--------|--------|
|
|
56
|
-
| checked | 设置标签的选中状态 | boolean | false |
|
|
57
|
-
| onChange | 点击标签时触发的回调 | (checked) => void | - |
|