@agentscope-ai/design 1.0.9 → 1.0.11
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.js +1 -1
- package/lib/antd/styles/breadcrumb.style.js +1 -1
- package/lib/antd/styles/button.style.js +1 -1
- package/lib/antd/styles/dropdown.style.js +1 -1
- package/lib/antd/styles/floatButton.style.js +1 -1
- package/lib/antd/styles/index.style.js +1 -1
- package/lib/antd/styles/inputNumber.style.js +1 -1
- package/lib/antd/styles/message.style.js +1 -1
- package/lib/antd/styles/notification.style.js +1 -1
- package/lib/antd/styles/popover.style.js +1 -1
- package/lib/antd/styles/radio.style.js +1 -1
- package/lib/antd/styles/segment.style.js +1 -1
- package/lib/antd/styles/select.style.js +1 -1
- package/lib/antd/styles/slider.style.js +1 -1
- package/lib/antd/styles/table.style.js +1 -1
- package/lib/antd/styles/tooltip.style.js +1 -1
- package/lib/antd/themes/bailianTheme.json +1 -1
- package/lib/antd/themes/generateThemeByToken.js +7 -1
- package/lib/components/commonComponents/AlertDialog/index.style.js +1 -1
- package/lib/components/commonComponents/Anchor/index.style.js +1 -1
- package/lib/components/commonComponents/Avatar/index.style.js +1 -1
- package/lib/components/commonComponents/Breadcrumb/index.style.js +1 -1
- 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.style.js +1 -1
- package/lib/components/commonComponents/Checkbox/index.style.js +1 -1
- package/lib/components/commonComponents/CodeBlock/index.js +2 -1
- package/lib/components/commonComponents/CodeBlock/index.style.js +1 -1
- package/lib/components/commonComponents/Collapse/index.style.js +1 -1
- package/lib/components/commonComponents/CollapsePanel/index.style.js +1 -1
- package/lib/components/commonComponents/ConfigProvider/index.js +10 -7
- package/lib/components/commonComponents/DatePicker/index.style.js +1 -1
- package/lib/components/commonComponents/Descriptions/index.style.js +1 -1
- package/lib/components/commonComponents/Drawer/index.style.js +1 -1
- package/lib/components/commonComponents/Dropdown/index.style.js +1 -1
- package/lib/components/commonComponents/EllipsisTip/index.style.js +1 -1
- package/lib/components/commonComponents/Empty/index.style.js +1 -1
- package/lib/components/commonComponents/FileIcon/index.style.js +1 -1
- package/lib/components/commonComponents/Form/index.style.js +1 -1
- package/lib/components/commonComponents/HelpIcon/index.style.js +1 -1
- package/lib/components/commonComponents/IconButton/index.style.js +1 -1
- package/lib/components/commonComponents/IconFont/index.style.js +1 -1
- package/lib/components/commonComponents/Image/index.style.js +1 -1
- package/lib/components/commonComponents/Input/index.style.js +1 -1
- package/lib/components/commonComponents/Modal/index.js +0 -1
- package/lib/components/commonComponents/Modal/index.style.js +1 -1
- package/lib/components/commonComponents/Pagination/index.js +75 -20
- package/lib/components/commonComponents/Pagination/index.style.js +1 -1
- 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 +16 -10
- package/lib/components/commonComponents/RadioButton/index.style.js +1 -1
- package/lib/components/commonComponents/Result/index.style.js +1 -1
- package/lib/components/commonComponents/SlateEditor/elements/index.style.js +1 -1
- package/lib/components/commonComponents/SlateEditor/index.style.js +1 -1
- package/lib/components/commonComponents/Slider/Input/index.js +6 -4
- package/lib/components/commonComponents/Slider/Input/index.style.js +2 -2
- package/lib/components/commonComponents/Slider/index.style.js +1 -1
- package/lib/components/commonComponents/SliderSelector/index.style.js +1 -1
- package/lib/components/commonComponents/Spinner/index.style.js +1 -1
- package/lib/components/commonComponents/Statistic/index.style.js +1 -1
- package/lib/components/commonComponents/Steps/index.style.js +1 -1
- package/lib/components/commonComponents/Switch/index.js +3 -3
- package/lib/components/commonComponents/Switch/index.style.js +1 -1
- 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 +1 -1
- package/lib/components/commonComponents/Table/index.style.js +18 -2
- package/lib/components/commonComponents/Tabs/index.js +3 -1
- package/lib/components/commonComponents/Tabs/index.style.js +1 -1
- package/lib/components/commonComponents/Tag/index.style.js +1 -1
- package/lib/components/commonComponents/TimePicker/index.style.js +1 -1
- package/lib/components/commonComponents/Tooltip/index.style.js +1 -1
- package/lib/components/commonComponents/Upload/index.style.js +1 -1
- 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 +2 -1
- package/lib/index.js +1 -0
- package/lib/libs/createStyle/index.d.ts +7 -1
- package/lib/libs/createStyle/index.js +24 -72
- package/lib/libs/generateCssVars/index.js +1 -1
- package/package.json +12 -12
- package/lib/libs/newCreateStyle/index.d.ts +0 -7
- package/lib/libs/newCreateStyle/index.js +0 -26
- 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
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<DemoTitle title="Input" desc="通过鼠标或键盘输入内容,为表单提供输入字段的基础容器。。"></DemoTitle>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
示例
|
|
10
|
-
|
|
11
|
-
<Install>Input</Install>
|
|
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
|
-
#### API
|
|
50
|
-
|
|
51
|
-
| <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> |
|
|
52
|
-
|--------|--------|--------|--------|
|
|
53
|
-
| shape | <div><span class="lang-en">Shape</span><span class="lang-cn">形态</span></div> | 'default' | 'round' | default 默认 |
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
本组件完全兼容 antd 同名组件,详情可访问 [antd input](https://ant.design/components/input-cn) 查看更多 API
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
## antd API
|
|
60
|
-
|
|
61
|
-
通用属性参考:[通用属性](/docs/react/common-props)
|
|
62
|
-
|
|
63
|
-
### Input
|
|
64
|
-
|
|
65
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
66
|
-
|--------|--------|--------|--------|--------|
|
|
67
|
-
| addonAfter | 带标签的 input,设置后置标签 | ReactNode | - | |
|
|
68
|
-
| addonBefore | 带标签的 input,设置前置标签 | ReactNode | - | |
|
|
69
|
-
| allowClear | 可以点击清除图标删除内容 | boolean | { clearIcon: ReactNode } | - | |
|
|
70
|
-
| | 是否有边框, 请使用 | boolean | true | 4.5.0 |
|
|
71
|
-
| classNames | 语义化结构 class | Record< | - | 5.4.0 |
|
|
72
|
-
| count | 字符计数配置 | | - | 5.10.0 |
|
|
73
|
-
| defaultValue | 输入框默认内容 | string | - | |
|
|
74
|
-
| disabled | 是否禁用状态,默认为 false | boolean | false | |
|
|
75
|
-
| id | 输入框的 id | string | - | |
|
|
76
|
-
| maxLength | 最大长度 | number | - | |
|
|
77
|
-
| prefix | 带有前缀图标的 input | ReactNode | - | |
|
|
78
|
-
| showCount | 是否展示字数 | boolean | { formatter: (info: { value: string, count: number, maxLength?: number }) => ReactNode } | false | 4.18.0 info.value: 4.23.0 |
|
|
79
|
-
| status | 设置校验状态 | 'error' | 'warning' | - | 4.19.0 |
|
|
80
|
-
| styles | 语义化结构 style | Record< | - | 5.4.0 |
|
|
81
|
-
| size | 控件大小。注:标准表单内的输入框大小限制为 | large | - | |
|
|
82
|
-
| suffix | 带有后缀图标的 input | ReactNode | - | |
|
|
83
|
-
| type | 声明 input 类型,同原生 input 标签的 type 属性,见: | string | text | |
|
|
84
|
-
| value | 输入框内容 | string | - | |
|
|
85
|
-
| variant | 形态变体 | outlined | outlined | 5.13.0 | |
|
|
86
|
-
| onChange | 输入框内容变化时的回调 | function(e) | - | |
|
|
87
|
-
| onPressEnter | 按下回车的回调 | function(e) | - | |
|
|
88
|
-
| onClear | 按下清除按钮的回调 | () => void | - | 5.20.0 |
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
如果 `Input` 在 `Form.Item` 内,并且 `Form.Item` 设置了 `id` 属性,则 `value` `defaultValue` 和 `id` 属性会被自动设置。
|
|
92
|
-
|
|
93
|
-
Input 的其他属性和 React 自带的 [input](https://reactjs.org/docs/dom-elements.html#all-supported-html-attributes) 一致。
|
|
94
|
-
|
|
95
|
-
#### CountConfig
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
### Input.TextArea
|
|
102
|
-
|
|
103
|
-
同 Input 属性,外加:
|
|
104
|
-
|
|
105
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
106
|
-
|--------|--------|--------|--------|--------|
|
|
107
|
-
| autoSize | 自适应内容高度,可设置为 true | false 或对象:{ minRows: 2, maxRows: 6 } | boolean | object | false | |
|
|
108
|
-
| classNames | 语义化结构 class | Record< | - | 5.4.0 |
|
|
109
|
-
| styles | 语义化结构 style | Record< | - | 5.4.0 |
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
`Input.TextArea` 的其他属性和浏览器自带的 [textarea](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea) 一致。
|
|
113
|
-
|
|
114
|
-
### Input.Search
|
|
115
|
-
|
|
116
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
117
|
-
|--------|--------|--------|--------|
|
|
118
|
-
| enterButton | 是否有确认按钮,可设为按钮文字。该属性会与 | ReactNode | false |
|
|
119
|
-
| loading | 搜索 loading | boolean | false |
|
|
120
|
-
| onSearch | 点击搜索图标、清除图标,或按下回车键时的回调 | function(value, event, { source: "input" | "clear" }) | - |
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
其余属性和 Input 一致。
|
|
124
|
-
|
|
125
|
-
### Input.Password
|
|
126
|
-
|
|
127
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
128
|
-
|--------|--------|--------|--------|--------|
|
|
129
|
-
| iconRender | 自定义切换按钮 | (visible) => ReactNode | (visible) => (visible ? <EyeOutlined /> : <EyeInvisibleOutlined />) | 4.3.0 |
|
|
130
|
-
| visibilityToggle | 是否显示切换按钮或者控制密码显隐 | boolean | | true | |
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
### Input.OTP
|
|
134
|
-
|
|
135
|
-
`5.16.0` 新增。
|
|
136
|
-
|
|
137
|
-
开发者注意事项:当 `mask` 属性的类型为 string 时,我们强烈推荐接收单个字符或单个 emoji,如果传入多个字符或多个 emoji,则会在控制台抛出警告。
|
|
138
|
-
|
|
139
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
140
|
-
|--------|--------|--------|--------|--------|
|
|
141
|
-
| defaultValue | 默认值 | string | - | |
|
|
142
|
-
| disabled | 是否禁用 | boolean | false | |
|
|
143
|
-
| formatter | 格式化展示,留空字段会被 | (value: string) => string | - | |
|
|
144
|
-
| separator | 分隔符,在指定索引的输入框后渲染分隔符 | ReactNode |((i: number) => ReactNode) | - | 5.24.0 |
|
|
145
|
-
| mask | 自定义展示,和 | boolean | string | false | 5.17.0 |
|
|
146
|
-
| length | 输入元素数量 | number | 6 | |
|
|
147
|
-
| status | 设置校验状态 | 'error' | 'warning' | - | |
|
|
148
|
-
| size | 输入框大小 | small | middle | |
|
|
149
|
-
| variant | 形态变体 | outlined | outlined | underlined |
|
|
150
|
-
| value | 输入框内容 | string | - | |
|
|
151
|
-
| onChange | 当输入框内容全部填充时触发回调 | (value: string) => void | - | |
|
|
152
|
-
| onInput | 输入值变化时触发的回调 | (value: string[]) => void | - | 5.22.0 |
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
#### VisibilityToggle
|
|
156
|
-
|
|
157
|
-
| Property | Description | Type | Default | Version |
|
|
158
|
-
|--------|--------|--------|--------|--------|
|
|
159
|
-
| visible | 用于手动控制密码显隐 | boolean | false | 4.24 |
|
|
160
|
-
| onVisibleChange | 显隐密码的回调 | (visible) => void | - | 4.24 |
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
#### Input Methods
|
|
164
|
-
|
|
165
|
-
| 名称 | 说明 | 参数 | 版本 |
|
|
166
|
-
|--------|--------|--------|--------|
|
|
167
|
-
| blur | 取消焦点 | - | |
|
|
168
|
-
| focus | 获取焦点 | (option?: { preventScroll?: boolean, cursor?: 'start' | 'end' | 'all' }) | option - 4.10.0 |
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<DemoTitle title="InputNumber" desc="通过鼠标或键盘,输入范围内的数值。"></DemoTitle>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
示例
|
|
10
|
-
|
|
11
|
-
<Install>InputNumber</Install>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
三种大小
|
|
18
|
-
|
|
19
|
-
#### API
|
|
20
|
-
|
|
21
|
-
本组件完全兼容 antd 同名组件,详情可访问 [antd input-number](https://ant.design/components/input-number-cn) 查看更多 API
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
## antd API
|
|
25
|
-
|
|
26
|
-
通用属性参考:[通用属性](/docs/react/common-props)
|
|
27
|
-
|
|
28
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
29
|
-
|--------|--------|--------|--------|--------|
|
|
30
|
-
| addonAfter | 带标签的 input,设置后置标签 | ReactNode | - | 4.17.0 |
|
|
31
|
-
| addonBefore | 带标签的 input,设置前置标签 | ReactNode | - | 4.17.0 |
|
|
32
|
-
| autoFocus | 自动获取焦点 | boolean | false | - |
|
|
33
|
-
| changeOnBlur | 是否在失去焦点时,触发 | boolean | true | 5.11.0 |
|
|
34
|
-
| changeOnWheel | 允许鼠标滚轮改变数值 | boolean | - | 5.14.0 |
|
|
35
|
-
| controls | 是否显示增减按钮,也可设置自定义箭头图标 | boolean | { upIcon?: React.ReactNode; downIcon?: React.ReactNode; } | - | 4.19.0 |
|
|
36
|
-
| decimalSeparator | 小数点 | string | - | - |
|
|
37
|
-
| placeholder | 占位符 | string | - | |
|
|
38
|
-
| defaultValue | 初始值 | number | - | - |
|
|
39
|
-
| disabled | 禁用 | boolean | false | - |
|
|
40
|
-
| formatter | 指定输入框展示值的格式 | function(value: number | string, info: { userTyping: boolean, input: string }): string | - | info: 4.17.0 |
|
|
41
|
-
| keyboard | 是否启用键盘快捷行为 | boolean | true | 4.12.0 |
|
|
42
|
-
| max | 最大值 | number | | - |
|
|
43
|
-
| min | 最小值 | number | | - |
|
|
44
|
-
| parser | 指定从 | function(string): number | - | - |
|
|
45
|
-
| precision | 数值精度,配置 | number | - | - |
|
|
46
|
-
| readOnly | 只读 | boolean | false | - |
|
|
47
|
-
| status | 设置校验状态 | 'error' | 'warning' | - | 4.19.0 |
|
|
48
|
-
| prefix | 带有前缀图标的 input | ReactNode | - | 4.17.0 |
|
|
49
|
-
| suffix | 带有后缀图标的 input | ReactNode | - | 5.20.0 |
|
|
50
|
-
| size | 输入框大小 | large | - | - |
|
|
51
|
-
| step | 每次改变步数,可以为小数 | number | string | 1 | - |
|
|
52
|
-
| stringMode | 字符值模式,开启后支持高精度小数。同时 | boolean | false | 4.13.0 |
|
|
53
|
-
| value | 当前值 | number | - | - |
|
|
54
|
-
| variant | 形态变体 | outlined | outlined | 5.13.0 | |
|
|
55
|
-
| onChange | 变化回调 | function(value: number | string | null) | - | - |
|
|
56
|
-
| onPressEnter | 按下回车的回调 | function(e) | - | - |
|
|
57
|
-
| onStep | 点击上下箭头的回调 | (value: number, info: { offset: number, type: 'up' | 'down' }) => void | - | 4.7.0 |
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
## Ref
|
|
61
|
-
|
|
62
|
-
| 名称 | 说明 | 参数 | 版本 |
|
|
63
|
-
|--------|--------|--------|--------|
|
|
64
|
-
| blur() | 移除焦点 | - | |
|
|
65
|
-
| focus() | 获取焦点 | (option?: { preventScroll?: boolean, cursor?: 'start' | 'end' | 'all' }) | cursor - 5.22.0 |
|
|
66
|
-
| nativeElement | 获取原生 DOM 元素 | - | 5.17.3 |
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<DemoTitle title="Message" desc="一条简洁且临时显示的消息,为操作提供全局反馈"></DemoTitle>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
示例
|
|
10
|
-
|
|
11
|
-
<Install>Message</Install>
|
|
12
|
-
|
|
13
|
-
#### 全局提示示例
|
|
14
|
-
|
|
15
|
-
以下是全局提示组件的示例和变体
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
不同状态的的全局提示
|
|
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
|
-
| conent | <div><span class="lang-en">content to be displayed</span><span class="lang-cn">显示的内容</span></div> | string | "" |
|
|
33
|
-
|
|
34
|
-
本组件完全兼容 antd 同名组件,详情可访问 [antd message](https://ant.design/components/message-cn) 查看更多 API
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
## antd API
|
|
38
|
-
|
|
39
|
-
通用属性参考:[通用属性](/docs/react/common-props)
|
|
40
|
-
|
|
41
|
-
组件提供了一些静态方法,使用方式和参数如下:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- `message.success(content, [duration], onClose)`
|
|
45
|
-
- `message.error(content, [duration], onClose)`
|
|
46
|
-
- `message.info(content, [duration], onClose)`
|
|
47
|
-
- `message.warning(content, [duration], onClose)`
|
|
48
|
-
- `message.loading(content, [duration], onClose)`
|
|
49
|
-
|
|
50
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
51
|
-
|--------|--------|--------|--------|
|
|
52
|
-
| content | 提示内容 | ReactNode | config | - |
|
|
53
|
-
| duration | 自动关闭的延时,单位秒。设为 0 时不自动关闭 | number | 3 |
|
|
54
|
-
| onClose | 关闭时触发的回调函数 | function | - |
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
组件同时提供 promise 接口。
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
- `message[level](content, [duration]).then(afterClose)`
|
|
61
|
-
- `message[level](content, [duration], onClose).then(afterClose)`
|
|
62
|
-
|
|
63
|
-
其中 `message[level]` 是组件已经提供的静态方法。`then` 接口返回值是 Promise。
|
|
64
|
-
|
|
65
|
-
也可以对象的形式传递参数:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
- `message.open(config)`
|
|
69
|
-
- `message.success(config)`
|
|
70
|
-
- `message.error(config)`
|
|
71
|
-
- `message.info(config)`
|
|
72
|
-
- `message.warning(config)`
|
|
73
|
-
- `message.loading(config)`
|
|
74
|
-
|
|
75
|
-
`config` 对象属性如下:
|
|
76
|
-
|
|
77
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
78
|
-
|--------|--------|--------|--------|
|
|
79
|
-
| className | 自定义 CSS class | string | - |
|
|
80
|
-
| content | 提示内容 | ReactNode | - |
|
|
81
|
-
| duration | 自动关闭的延时,单位秒。设为 0 时不自动关闭 | number | 3 |
|
|
82
|
-
| icon | 自定义图标 | ReactNode | - |
|
|
83
|
-
| key | 当前提示的唯一标志 | string | number | - |
|
|
84
|
-
| style | 自定义内联样式 | | - |
|
|
85
|
-
| onClick | 点击 message 时触发的回调函数 | function | - |
|
|
86
|
-
| onClose | 关闭时触发的回调函数 | function | - |
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
### 全局方法
|
|
90
|
-
|
|
91
|
-
还提供了全局配置和全局销毁方法:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
- `message.config(options)`
|
|
95
|
-
- `message.destroy()`
|
|
96
|
-
|
|
97
|
-
也可通过 `message.destroy(key)` 来关闭一条消息。
|
|
98
|
-
|
|
99
|
-
#### message.config
|
|
100
|
-
|
|
101
|
-
当你使用 `ConfigProvider` 进行全局化配置时,系统会默认自动开启 RTL 模式。(4.3.0+)当你想单独使用,可通过如下设置开启 RTL 模式。
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
108
|
-
|--------|--------|--------|--------|--------|
|
|
109
|
-
| duration | 默认自动关闭延时,单位秒 | number | 3 | |
|
|
110
|
-
| getContainer | 配置渲染节点的输出位置,但依旧为全屏展示 | () => HTMLElement | () => document.body | |
|
|
111
|
-
| maxCount | 最大显示数,超过限制时,最早的消息会被自动关闭 | number | - | |
|
|
112
|
-
| prefixCls | 消息节点的 className 前缀 | string | ant-message | 4.5.0 |
|
|
113
|
-
| rtl | 是否开启 RTL 模式 | boolean | false | |
|
|
114
|
-
| top | 消息距离顶部的位置 | string | number | 8 | |
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<DemoTitle title="Modal" desc="用于叠加当前页面上的对话框窗口,提供标题、内容区、操作区。"></DemoTitle>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
示例
|
|
10
|
-
|
|
11
|
-
<Install>Modal</Install>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
自定义样式
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
预设宽度
|
|
23
|
-
|
|
24
|
-
#### API
|
|
25
|
-
|
|
26
|
-
| <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> |
|
|
27
|
-
|--------|--------|--------|--------|
|
|
28
|
-
| info | <div><span class="lang-en"></span><span class="lang-cn"></span></div> | string | React.ReactNode | |
|
|
29
|
-
| showDivider | <div><span class="lang-en"></span><span class="lang-cn"></span></div> | boolean | |
|
|
30
|
-
|
|
31
|
-
本组件完全兼容 antd 同名组件,详情可访问 [antd modal](https://ant.design/components/modal-cn) 查看更多 API
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
## antd API
|
|
35
|
-
|
|
36
|
-
通用属性参考:[通用属性](/docs/react/common-props)
|
|
37
|
-
|
|
38
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
39
|
-
|--------|--------|--------|--------|--------|
|
|
40
|
-
| afterClose | Modal 完全关闭后的回调 | function | - | |
|
|
41
|
-
| classNames | 配置弹窗内置模块的 className | | - | |
|
|
42
|
-
| styles | 配置弹窗内置模块的 style | | - | 5.10.0 |
|
|
43
|
-
| cancelButtonProps | cancel 按钮 props | | - | |
|
|
44
|
-
| cancelText | 取消按钮文字 | ReactNode | 取消 | |
|
|
45
|
-
| centered | 垂直居中展示 Modal | boolean | false | |
|
|
46
|
-
| closable | 是否显示右上角的关闭按钮 | boolean | { closeIcon?: React.ReactNode; disabled?: boolean; } | true | |
|
|
47
|
-
| closeIcon | 自定义关闭图标。5.7.0:设置为 | ReactNode | <CloseOutlined /> | |
|
|
48
|
-
| confirmLoading | 确定按钮 loading | boolean | false | |
|
|
49
|
-
| | 关闭时销毁 Modal 里的子元素 | boolean | false | |
|
|
50
|
-
| destroyOnHidden | 关闭时销毁 Modal 里的子元素 | boolean | false | 5.25.0 |
|
|
51
|
-
| focusTriggerAfterClose | 对话框关闭后是否需要聚焦触发元素 | boolean | true | 4.9.0 |
|
|
52
|
-
| footer | 底部内容,当不需要默认底部按钮时,可以设为 | ReactNode | (originNode: ReactNode, extra: { OkBtn: React.FC, CancelBtn: React.FC }) => ReactNode | (确定取消按钮) | renderFunction: 5.9.0 |
|
|
53
|
-
| forceRender | 强制渲染 Modal | boolean | false | |
|
|
54
|
-
| getContainer | 指定 Modal 挂载的节点,但依旧为全屏展示, | HTMLElement | () => HTMLElement | Selectors | false | document.body | |
|
|
55
|
-
| keyboard | 是否支持键盘 esc 关闭 | boolean | true | |
|
|
56
|
-
| mask | 是否展示遮罩 | boolean | true | |
|
|
57
|
-
| maskClosable | 点击蒙层是否允许关闭 | boolean | true | |
|
|
58
|
-
| modalRender | 自定义渲染对话框 | (node: ReactNode) => ReactNode | - | 4.7.0 |
|
|
59
|
-
| okButtonProps | ok 按钮 props | | - | |
|
|
60
|
-
| okText | 确认按钮文字 | ReactNode | 确定 | |
|
|
61
|
-
| okType | 确认按钮类型 | string | primary | |
|
|
62
|
-
| style | 可用于设置浮层的样式,调整浮层位置等 | CSSProperties | - | |
|
|
63
|
-
| loading | 显示骨架屏 | boolean | | 5.18.0 |
|
|
64
|
-
| title | 标题 | ReactNode | - | |
|
|
65
|
-
| open | 对话框是否可见 | boolean | - | |
|
|
66
|
-
| width | 宽度 | string | number | | 520 | Breakpoint: 5.23.0 |
|
|
67
|
-
| wrapClassName | 对话框外层容器的类名 | string | - | |
|
|
68
|
-
| zIndex | 设置 Modal 的 | number | 1000 | |
|
|
69
|
-
| onCancel | 点击遮罩层或右上角叉或取消按钮的回调 | function(e) | - | |
|
|
70
|
-
| onOk | 点击确定回调 | function(e) | - | |
|
|
71
|
-
| afterOpenChange | 打开和关闭 Modal 时动画结束后的回调 | (open: boolean) => void | - | 5.4.0 |
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
#### 注意
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
- `<Modal />` 默认关闭后状态不会自动清空,如果希望每次打开都是新内容,请设置 `destroyOnHidden`。
|
|
78
|
-
- `<Modal />` 和 Form 一起配合使用时,设置 `destroyOnHidden` 也不会在 Modal 关闭时销毁表单字段数据,需要设置 `<Form preserve={false} />`。
|
|
79
|
-
- `Modal.method()` RTL 模式仅支持 hooks 用法。
|
|
80
|
-
|
|
81
|
-
### Modal.method()
|
|
82
|
-
|
|
83
|
-
包括:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
- `Modal.info`
|
|
87
|
-
- `Modal.success`
|
|
88
|
-
- `Modal.error`
|
|
89
|
-
- `Modal.warning`
|
|
90
|
-
- `Modal.confirm`
|
|
91
|
-
|
|
92
|
-
以上均为一个函数,参数为 object,具体属性如下:
|
|
93
|
-
|
|
94
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
95
|
-
|--------|--------|--------|--------|--------|
|
|
96
|
-
| afterClose | Modal 完全关闭后的回调 | function | - | 4.9.0 |
|
|
97
|
-
| autoFocusButton | 指定自动获得焦点的按钮 | null | | ok | |
|
|
98
|
-
| cancelButtonProps | cancel 按钮 props | | - | |
|
|
99
|
-
| cancelText | 设置 Modal.confirm 取消按钮文字 | string | 取消 | |
|
|
100
|
-
| centered | 垂直居中展示 Modal | boolean | false | |
|
|
101
|
-
| className | 容器类名 | string | - | |
|
|
102
|
-
| closable | 是否显示右上角的关闭按钮 | boolean | false | 4.9.0 |
|
|
103
|
-
| closeIcon | 自定义关闭图标 | ReactNode | undefined | 4.9.0 |
|
|
104
|
-
| content | 内容 | ReactNode | - | |
|
|
105
|
-
| footer | 底部内容,当不需要默认底部按钮时,可以设为 | ReactNode | (originNode: ReactNode, extra: { OkBtn: React.FC, CancelBtn: React.FC }) => ReactNode | - | renderFunction: 5.9.0 |
|
|
106
|
-
| getContainer | 指定 Modal 挂载的 HTML 节点,false 为挂载在当前 dom | HTMLElement | () => HTMLElement | Selectors | false | document.body | |
|
|
107
|
-
| icon | 自定义图标 | ReactNode | <ExclamationCircleFilled /> | |
|
|
108
|
-
| keyboard | 是否支持键盘 esc 关闭 | boolean | true | |
|
|
109
|
-
| mask | 是否展示遮罩 | boolean | true | |
|
|
110
|
-
| maskClosable | 点击蒙层是否允许关闭 | boolean | false | |
|
|
111
|
-
| okButtonProps | ok 按钮 props | | - | |
|
|
112
|
-
| okText | 确认按钮文字 | string | 确定 | |
|
|
113
|
-
| okType | 确认按钮类型 | string | primary | |
|
|
114
|
-
| style | 可用于设置浮层的样式,调整浮层位置等 | CSSProperties | - | |
|
|
115
|
-
| title | 标题 | ReactNode | - | |
|
|
116
|
-
| width | 宽度 | string | number | 416 | |
|
|
117
|
-
| wrapClassName | 对话框外层容器的类名 | string | - | 4.18.0 |
|
|
118
|
-
| zIndex | 设置 Modal 的 | number | 1000 | |
|
|
119
|
-
| onCancel | 点击取消回调,参数为关闭函数,若返回 promise 时 resolve 为正常关闭, reject 为不关闭 | function(close) | - | |
|
|
120
|
-
| onOk | 点击确定回调,参数为关闭函数,若返回 promise 时 resolve 为正常关闭, reject 为不关闭 | function(close) | - | |
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
以上函数调用后,会返回一个引用,可以通过该引用更新和关闭弹窗。
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
- `Modal.destroyAll`
|
|
131
|
-
|
|
132
|
-
使用 `Modal.destroyAll()` 可以销毁弹出的确认窗(即上述的 `Modal.info`、`Modal.success`、`Modal.error`、`Modal.warning`、`Modal.confirm`)。通常用于路由监听当中,处理路由前进、后退不能销毁确认对话框的问题,而不用各处去使用实例的返回值进行关闭(`modal.destroy()` 适用于主动关闭,而不是路由这样被动关闭)
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
### Modal.useModal()
|
|
139
|
-
|
|
140
|
-
当你需要使用 Context 时,可以通过 `Modal.useModal` 创建一个 `contextHolder` 插入子节点中。通过 hooks 创建的临时 Modal 将会得到 `contextHolder` 所在位置的所有上下文。创建的 `modal` 对象拥有与 [`Modal.method`](#modalmethod) 相同的创建通知方法。
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
`modal.confirm` 返回方法:
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
- `destroy`:销毁当前窗口
|
|
150
|
-
- `update`:更新当前窗口
|
|
151
|
-
- `then`:Promise 链式调用,支持 `await` 操作。该方法为 Hooks 仅有
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<DemoTitle title="Notification" desc="用于指示任务的完成进度"></DemoTitle>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
示例
|
|
10
|
-
|
|
11
|
-
<Install>Notification</Install>
|
|
12
|
-
|
|
13
|
-
#### 带图标的通知提醒框
|
|
14
|
-
|
|
15
|
-
使用 useNotification hooks 调用,支持不同类型的通知
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
提供下一步操作
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
不同状态的通知提醒框
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
不同弹出位置
|
|
32
|
-
|
|
33
|
-
#### API
|
|
34
|
-
|
|
35
|
-
ApiParser解析结果为空
|
|
36
|
-
本组件完全兼容 antd 同名组件,详情可访问 [antd notification](https://ant.design/components/notification-cn) 查看更多 API
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
## antd API
|
|
40
|
-
|
|
41
|
-
通用属性参考:[通用属性](/docs/react/common-props)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- `notification.success(config)`
|
|
45
|
-
- `notification.error(config)`
|
|
46
|
-
- `notification.info(config)`
|
|
47
|
-
- `notification.warning(config)`
|
|
48
|
-
- `notification.open(config)`
|
|
49
|
-
- `notification.destroy(key?: String)`
|
|
50
|
-
|
|
51
|
-
config 参数如下:
|
|
52
|
-
|
|
53
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
54
|
-
|--------|--------|--------|--------|--------|
|
|
55
|
-
| actions | 自定义按钮组 | ReactNode | - | 5.24.0 |
|
|
56
|
-
| | 自定义按钮组,请使用 | ReactNode | - | - |
|
|
57
|
-
| className | 自定义 CSS class | string | - | - |
|
|
58
|
-
| closeIcon | 自定义关闭图标 | ReactNode | true | 5.7.0:设置为 null 或 false 时隐藏关闭按钮 |
|
|
59
|
-
| description | 通知提醒内容,必选 | ReactNode | - | - |
|
|
60
|
-
| duration | 默认 4.5 秒后自动关闭,配置为 null 则不自动关闭 | number | 4.5 | - |
|
|
61
|
-
| showProgress | 显示自动关闭通知框的进度条 | boolean | | 5.18.0 |
|
|
62
|
-
| pauseOnHover | 悬停时是否暂停计时器 | boolean | true | 5.18.0 |
|
|
63
|
-
| icon | 自定义图标 | ReactNode | - | - |
|
|
64
|
-
| key | 当前通知唯一标志 | string | - | - |
|
|
65
|
-
| message | 通知提醒标题,必选 | ReactNode | - | - |
|
|
66
|
-
| placement | 弹出位置,可选 | string | topRight | - |
|
|
67
|
-
| style | 自定义内联样式 | | - | - |
|
|
68
|
-
| role | 供屏幕阅读器识别的通知内容语义,默认为 | alert | status | alert | 5.6.0 |
|
|
69
|
-
| onClick | 点击通知时触发的回调函数 | function | - | - |
|
|
70
|
-
| onClose | 当通知关闭时触发 | function | - | - |
|
|
71
|
-
| props | 透传至通知 | Object | - | - |
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
- `notification.useNotification(config)`
|
|
76
|
-
|
|
77
|
-
config 参数如下:
|
|
78
|
-
|
|
79
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
80
|
-
|--------|--------|--------|--------|--------|
|
|
81
|
-
| bottom | 消息从底部弹出时,距离底部的位置,单位像素 | number | 24 | |
|
|
82
|
-
| closeIcon | 自定义关闭图标 | ReactNode | true | 5.7.0:设置为 null 或 false 时隐藏关闭按钮 |
|
|
83
|
-
| getContainer | 配置渲染节点的输出位置 | () => HTMLNode | () => document.body | |
|
|
84
|
-
| placement | 弹出位置,可选 | string | topRight | |
|
|
85
|
-
| showProgress | 显示自动关闭通知框的进度条 | boolean | | 5.18.0 |
|
|
86
|
-
| pauseOnHover | 悬停时是否暂停计时器 | boolean | true | 5.18.0 |
|
|
87
|
-
| rtl | 是否开启 RTL 模式 | boolean | false | |
|
|
88
|
-
| stack | 堆叠模式,超过阈值时会将所有消息收起 | boolean | | { threshold: 3 } | 5.10.0 |
|
|
89
|
-
| top | 消息从顶部弹出时,距离顶部的位置,单位像素 | number | 24 | |
|
|
90
|
-
| maxCount | 最大显示数,超过限制时,最早的消息会被自动关闭 | number | - | 4.17.0 |
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
### 全局配置
|
|
94
|
-
|
|
95
|
-
还提供了一个全局配置方法,在调用前提前配置,全局一次生效。
|
|
96
|
-
|
|
97
|
-
`notification.config(options)`
|
|
98
|
-
|
|
99
|
-
当你使用 `ConfigProvider` 进行全局化配置时,系统会默认自动开启 RTL 模式。(4.3.0+)当你想单独使用,可通过如下设置开启 RTL 模式。
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
#### notification.config
|
|
106
|
-
|
|
107
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
108
|
-
|--------|--------|--------|--------|--------|
|
|
109
|
-
| bottom | 消息从底部弹出时,距离底部的位置,单位像素 | number | 24 | |
|
|
110
|
-
| closeIcon | 自定义关闭图标 | ReactNode | true | 5.7.0:设置为 null 或 false 时隐藏关闭按钮 |
|
|
111
|
-
| duration | 默认自动关闭延时,单位秒 | number | 4.5 | |
|
|
112
|
-
| showProgress | 显示自动关闭通知框的进度条 | boolean | | 5.18.0 |
|
|
113
|
-
| pauseOnHover | 悬停时是否暂停计时器 | boolean | true | 5.18.0 |
|
|
114
|
-
| getContainer | 配置渲染节点的输出位置,但依旧为全屏展示 | () => HTMLNode | () => document.body | |
|
|
115
|
-
| placement | 弹出位置,可选 | string | topRight | |
|
|
116
|
-
| rtl | 是否开启 RTL 模式 | boolean | false | |
|
|
117
|
-
| top | 消息从顶部弹出时,距离顶部的位置,单位像素 | number | 24 | |
|
|
118
|
-
| maxCount | 最大显示数,超过限制时,最早的消息会被自动关闭 | number | - | 4.17.0 |
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<DemoTitle title="Pagination" desc="分页器用于分隔长列表,每次只加载一个页面。"></DemoTitle>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
示例
|
|
10
|
-
|
|
11
|
-
<Install>Pagination</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
|
-
| hideSwitchButton | <div><span class="lang-en">Whether to show previous/next page switch button</span><span class="lang-cn">是否展示上一页/下一页的切换按钮</span></div> | boolean | 'false' |
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
本组件完全兼容 antd 同名组件,详情可访问[antd pagination](https://ant.design/components/pagination-cn/)查看更多 API。
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
## antd API
|
|
34
|
-
|
|
35
|
-
通用属性参考:[通用属性](/docs/react/common-props)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
|
42
|
-
|--------|--------|--------|--------|--------|
|
|
43
|
-
| align | 对齐方式 | start | center | end | - | 5.19.0 |
|
|
44
|
-
| current | 当前页数 | number | - | |
|
|
45
|
-
| defaultCurrent | 默认的当前页数 | number | 1 | |
|
|
46
|
-
| defaultPageSize | 默认的每页条数 | number | 10 | |
|
|
47
|
-
| disabled | 禁用分页 | boolean | - | |
|
|
48
|
-
| hideOnSinglePage | 只有一页时是否隐藏分页器 | boolean | false | |
|
|
49
|
-
| itemRender | 用于自定义页码的结构,可用于优化 SEO | (page, type: 'page' | 'prev' | 'next', originalElement) => React.ReactNode | - | |
|
|
50
|
-
| pageSize | 每页条数 | number | - | |
|
|
51
|
-
| pageSizeOptions | 指定每页可以显示多少条 | number[] | [ | |
|
|
52
|
-
| responsive | 当 size 未指定时,根据屏幕宽度自动调整尺寸 | boolean | - | |
|
|
53
|
-
| showLessItems | 是否显示较少页面内容 | boolean | false | |
|
|
54
|
-
| showQuickJumper | 是否可以快速跳转至某页 | boolean | { goButton: ReactNode } | false | |
|
|
55
|
-
| showSizeChanger | 是否展示 | boolean | | - | SelectProps: 5.21.0 |
|
|
56
|
-
| showTitle | 是否显示原生 tooltip 页码提示 | boolean | true | |
|
|
57
|
-
| showTotal | 用于显示数据总量和当前数据顺序 | function(total, range) | - | |
|
|
58
|
-
| simple | 当添加该属性时,显示为简单分页 | boolean | { readOnly?: boolean } | - | |
|
|
59
|
-
| size | 当为 | default | default | |
|
|
60
|
-
| total | 数据总数 | number | 0 | |
|
|
61
|
-
| onChange | 页码或 | function(page, pageSize) | - | |
|
|
62
|
-
| onShowSizeChange | pageSize 变化的回调 | function(current, size) | - | |
|