@agentscope-ai/design 1.0.24-beta.1767669321337 → 1.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/lib/antd/styles/button.style.js +1 -3
  2. package/lib/components/commonComponents/Button/demo/demo1.js +0 -4
  3. package/lib/components/commonComponents/CodeBlock/index.d.ts +2 -2
  4. package/lib/components/commonComponents/CodeBlock/index.js +1 -1
  5. package/package.json +1 -1
  6. package/llms/all.llms.txt +0 -54
  7. package/llms/components/commonComponents/Alert/index.zh-CN.llms.txt +0 -32
  8. package/llms/components/commonComponents/AlertDialog/index.zh-CN.llms.txt +0 -171
  9. package/llms/components/commonComponents/Anchor/index.zh-CN.llms.txt +0 -51
  10. package/llms/components/commonComponents/Audio/index.zh-CN.llms.txt +0 -7
  11. package/llms/components/commonComponents/Avatar/index.zh-CN.llms.txt +0 -37
  12. package/llms/components/commonComponents/Breadcrumb/index.zh-CN.llms.txt +0 -117
  13. package/llms/components/commonComponents/Button/index.zh-CN.llms.txt +0 -54
  14. package/llms/components/commonComponents/Card/index.zh-CN.llms.txt +0 -61
  15. package/llms/components/commonComponents/Checkbox/index.zh-CN.llms.txt +0 -69
  16. package/llms/components/commonComponents/CodeBlock/index.zh-CN.llms.txt +0 -13
  17. package/llms/components/commonComponents/Collapse/index.zh-CN.llms.txt +0 -56
  18. package/llms/components/commonComponents/CollapsePanel/index.zh-CN.llms.txt +0 -69
  19. package/llms/components/commonComponents/DatePicker/index.zh-CN.llms.txt +0 -221
  20. package/llms/components/commonComponents/Descriptions/index.zh-CN.llms.txt +0 -37
  21. package/llms/components/commonComponents/Drawer/index.zh-CN.llms.txt +0 -62
  22. package/llms/components/commonComponents/Dropdown/index.zh-CN.llms.txt +0 -149
  23. package/llms/components/commonComponents/Empty/index.zh-CN.llms.txt +0 -41
  24. package/llms/components/commonComponents/FloatButton/index.zh-CN.llms.txt +0 -51
  25. package/llms/components/commonComponents/Form/index.zh-CN.llms.txt +0 -558
  26. package/llms/components/commonComponents/IconButton/index.zh-CN.llms.txt +0 -45
  27. package/llms/components/commonComponents/Image/index.zh-CN.llms.txt +0 -165
  28. package/llms/components/commonComponents/Input/index.zh-CN.llms.txt +0 -133
  29. package/llms/components/commonComponents/InputNumber/index.zh-CN.llms.txt +0 -51
  30. package/llms/components/commonComponents/Message/index.zh-CN.llms.txt +0 -98
  31. package/llms/components/commonComponents/Modal/index.zh-CN.llms.txt +0 -168
  32. package/llms/components/commonComponents/Notification/index.zh-CN.llms.txt +0 -94
  33. package/llms/components/commonComponents/Pagination/index.zh-CN.llms.txt +0 -45
  34. package/llms/components/commonComponents/Popconfirm/index.zh-CN.llms.txt +0 -55
  35. package/llms/components/commonComponents/Popover/index.zh-CN.llms.txt +0 -43
  36. package/llms/components/commonComponents/Progress/index.zh-CN.llms.txt +0 -50
  37. package/llms/components/commonComponents/PromptsEditor/index.zh-CN.llms.txt +0 -15
  38. package/llms/components/commonComponents/Radio/index.zh-CN.llms.txt +0 -66
  39. package/llms/components/commonComponents/RadioButton/index.zh-CN.llms.txt +0 -73
  40. package/llms/components/commonComponents/Result/index.zh-CN.llms.txt +0 -10
  41. package/llms/components/commonComponents/Select/index.zh-CN.llms.txt +0 -96
  42. package/llms/components/commonComponents/Skeleton/index.zh-CN.llms.txt +0 -59
  43. package/llms/components/commonComponents/Slider/index.zh-CN.llms.txt +0 -62
  44. package/llms/components/commonComponents/Spinner/index.zh-CN.llms.txt +0 -15
  45. package/llms/components/commonComponents/Statistic/index.zh-CN.llms.txt +0 -58
  46. package/llms/components/commonComponents/Steps/index.zh-CN.llms.txt +0 -57
  47. package/llms/components/commonComponents/Switch/index.zh-CN.llms.txt +0 -39
  48. package/llms/components/commonComponents/Table/index.zh-CN.llms.txt +0 -254
  49. package/llms/components/commonComponents/Tabs/index.zh-CN.llms.txt +0 -68
  50. package/llms/components/commonComponents/Tag/index.zh-CN.llms.txt +0 -33
  51. package/llms/components/commonComponents/TimePicker/index.zh-CN.llms.txt +0 -111
  52. package/llms/components/commonComponents/Tooltip/index.zh-CN.llms.txt +0 -45
  53. package/llms/components/commonComponents/Upload/index.zh-CN.llms.txt +0 -95
  54. package/llms/components/commonComponents/Video/index.zh-CN.llms.txt +0 -11
  55. package/llms/docs/changelog/index.zh-CN.llms.txt +0 -18
  56. package/llms/docs/guide/fromAntd.zh-CN.llms.txt +0 -156
  57. package/llms/docs/guide/fromScratch.zh-CN.llms.txt +0 -83
  58. package/llms/docs/guide/iconfont.zh-CN.llms.txt +0 -69
  59. package/llms/docs/guide/musicLofiGenerator.zh-CN.llms.txt +0 -12
  60. package/llms/docs/guide/overview.zh-CN.llms.txt +0 -51
  61. package/llms/docs/guide/sparkIcons.zh-CN.llms.txt +0 -25
  62. package/llms/docs/guide/theme.zh-CN.llms.txt +0 -61
  63. package/llms/docs/guide/tokens&variables.zh-CN.llms.txt +0 -434
  64. package/llms/docs/guide/vibe-coding.zh-CN.llms.txt +0 -29
  65. package/llms/index.llms.txt +0 -3
@@ -1,69 +0,0 @@
1
-
2
-
3
- <DemoTitle title="Checkbox" desc="收集用户的多项选择。">
4
- #### API
5
-
6
- | 属性名 | 描述 | 类型 | 默认值 |
7
- |--------|--------|--------|--------|
8
- | description | 描述文本 | string | |
9
- | descriptionClassName | 描述文本的样式类名 | string | |
10
- | descriptionStyle | 描述文本的内联样式 | React.CSSProperties | |
11
-
12
-
13
- <AntdApiRef url="https://ant.design/components/checkbox-cn/#api"></AntdApiRef>
14
-
15
-
16
- ## antd API
17
-
18
- 通用属性参考:[通用属性](/docs/react/common-props)
19
-
20
- #### Checkbox
21
-
22
- | 参数 | 说明 | 类型 | 默认值 | 版本 |
23
- |--------|--------|--------|--------|--------|
24
- | autoFocus | 自动获取焦点 | boolean | false | |
25
- | checked | 指定当前是否选中 | boolean | false | |
26
- | defaultChecked | 初始是否选中 | boolean | false | |
27
- | disabled | 失效状态 | boolean | false | |
28
- | indeterminate | 设置 indeterminate 状态,只负责样式控制 | boolean | false | |
29
- | onChange | 变化时的回调函数 | (e: CheckboxChangeEvent) => void | - | |
30
- | onBlur | 失去焦点时的回调 | function() | - | |
31
- | onFocus | 获得焦点时的回调 | function() | - | |
32
-
33
-
34
- #### Checkbox.Group
35
-
36
- | 参数 | 说明 | 类型 | 默认值 | 版本 |
37
- |--------|--------|--------|--------|--------|
38
- | defaultValue | 默认选中的选项 | (string \| number)[] | [] | |
39
- | disabled | 整组失效 | boolean | false | |
40
- | name | CheckboxGroup 下所有 | string | - | |
41
- | options | 指定可选项 | string[] \| number[] \| Option[] | [] | |
42
- | value | 指定选中的选项 | (string \| number \| boolean)[] | [] | |
43
- | title | 选项的 title | string | - | |
44
- | className | 选项的类名 | string | - | 5.25.0 |
45
- | style | 选项的样式 | React.CSSProperties | - | |
46
- | onChange | 变化时的回调函数 | (checkedValue: T[]) => void | - | |
47
-
48
-
49
- ##### Option
50
-
51
-
52
- ```typescript
53
- interface Option {
54
- label: string;
55
- value: string;
56
- disabled?: boolean;
57
- }
58
- ```
59
-
60
-
61
- ### 方法
62
-
63
- #### Checkbox
64
-
65
- | 名称 | 描述 | 版本 |
66
- |--------|--------|--------|
67
- | blur() | 移除焦点 | |
68
- | focus() | 获取焦点 | |
69
- | nativeElement | 返回 Checkbox 的 DOM 节点 | 5.17.3 |
@@ -1,13 +0,0 @@
1
-
2
-
3
- <DemoTitle title="CodeBlock" desc="代码块">
4
- #### API
5
-
6
- | 属性名 | 描述 | 类型 | 默认值 |
7
- |--------|--------|--------|--------|
8
- | language | 语言 | string \| string[] | (必填) |
9
- | value | 值 | string | (必填) |
10
- | className | 类名 | string | |
11
- | theme | 主题 | 'dark' \| 'light' | |
12
- | readOnly | 只读 | boolean | |
13
- | onChange | | (value: string) => void | |
@@ -1,56 +0,0 @@
1
-
2
-
3
- <DemoTitle title="Collapse" desc="可以折叠/展开的内容区域">
4
- #### API
5
-
6
- <AntdApiRef url="https://ant.design/components/collapse-cn/#api"></AntdApiRef>
7
-
8
-
9
- ## antd API
10
-
11
- 通用属性参考:[通用属性](/docs/react/common-props)
12
-
13
- ### Collapse
14
-
15
- | 参数 | 说明 | 类型 | 默认值 | 版本 |
16
- |--------|--------|--------|--------|--------|
17
- | accordion | 手风琴模式 | boolean | false | |
18
- | activeKey | 当前激活 tab 面板的 key | string[] \| string | | |
19
- | bordered | 带边框风格的折叠面板 | boolean | true | |
20
- | collapsible | 所有子面板是否可折叠或指定可折叠触发区域 | header | - | 4.9.0 |
21
- | defaultActiveKey | 初始化选中面板的 key | string[] \| string | - | |
22
- | destroyOnHidden | 销毁折叠隐藏的面板 | boolean | false | 5.25.0 |
23
- | expandIcon | 自定义切换图标 | (panelProps) => ReactNode | - | |
24
- | expandIconPosition | 设置图标位置 | start | - | 4.21.0 |
25
- | ghost | 使折叠面板透明且无边框 | boolean | false | 4.4.0 |
26
- | size | 设置折叠面板大小 | large | middle | 5.2.0 |
27
- | onChange | 切换面板的回调 | function | - | |
28
- | items | 折叠项目内容 | | - | 5.6.0 |
29
-
30
-
31
- ### ItemType
32
-
33
- | 参数 | 说明 | 类型 | 默认值 | 版本 |
34
- |--------|--------|--------|--------|--------|
35
- | classNames | 语义化结构 className | | - | 5.21.0 |
36
- | collapsible | 是否可折叠或指定可折叠触发区域 | header | - | |
37
- | forceRender | 被隐藏时是否渲染 body 区域 DOM 结构 | boolean | false | |
38
- | key | 对应 activeKey | string \| number | - | |
39
- | label | 面板标题 | ReactNode | - | - |
40
- | showArrow | 是否展示当前面板上的箭头(为 false 时,collapsible 不能设为 icon) | boolean | true | |
41
- | styles | 语义化结构 style | | - | 5.21.0 |
42
-
43
-
44
- ### Collapse.Panel
45
-
46
- <!-- prettier-ignore -->
47
- <Container type="warning" title="已废弃">
48
- 版本 >= 5.6.0 时请使用 items 方式配置面板。
49
- </Container>
50
- | 参数 | 说明 | 类型 | 默认值 | 版本 |
51
- |--------|--------|--------|--------|--------|
52
- | collapsible | 是否可折叠或指定可折叠触发区域 | header | - | 4.9.0 (icon: 4.24.0) |
53
- | forceRender | 被隐藏时是否渲染 body 区域 DOM 结构 | boolean | false | |
54
- | header | 面板标题 | ReactNode | - | |
55
- | key | 对应 activeKey | string \| number | - | |
56
- | showArrow | 是否展示当前面板上的箭头(为 false 时,collapsible 不能设为 icon) | boolean | true | |
@@ -1,69 +0,0 @@
1
-
2
-
3
- <DemoTitle title="CollapsePanel" desc="折叠面板">
4
- #### API
5
-
6
- | 属性名 | 描述 | 类型 | 默认值 |
7
- |--------|--------|--------|--------|
8
- | collapsedHeight | 收起状态下显示的内容高度 | number | 0 |
9
- | expandedHeight | 展开状态下的内容高度,设置后内容超出时可滚动,不设置则自适应内容高度 | number | 300 |
10
- | title | 面板标题 | string \| React.ReactNode | "" |
11
- | expandOnPanelClick | 是否允许点击整个面板进行展开 | boolean | false |
12
- | extra | 面板右侧内容 | React.ReactNode | |
13
- | children | 面板内容 | React.ReactNode | |
14
- | defaultExpanded | 是否默认展开 | boolean | false |
15
- | classNames | 语义化的classNames | Partial> | |
16
- | styles | 语义化的styles | Partial<
17
- Record
18
- > | |
19
-
20
-
21
-
22
- ## antd API
23
-
24
- 通用属性参考:[通用属性](/docs/react/common-props)
25
-
26
- ### Collapse
27
-
28
- | 参数 | 说明 | 类型 | 默认值 | 版本 |
29
- |--------|--------|--------|--------|--------|
30
- | accordion | 手风琴模式 | boolean | false | |
31
- | activeKey | 当前激活 tab 面板的 key | string[] \| string | | |
32
- | bordered | 带边框风格的折叠面板 | boolean | true | |
33
- | collapsible | 所有子面板是否可折叠或指定可折叠触发区域 | header | - | 4.9.0 |
34
- | defaultActiveKey | 初始化选中面板的 key | string[] \| string | - | |
35
- | destroyOnHidden | 销毁折叠隐藏的面板 | boolean | false | 5.25.0 |
36
- | expandIcon | 自定义切换图标 | (panelProps) => ReactNode | - | |
37
- | expandIconPosition | 设置图标位置 | start | - | 4.21.0 |
38
- | ghost | 使折叠面板透明且无边框 | boolean | false | 4.4.0 |
39
- | size | 设置折叠面板大小 | large | middle | 5.2.0 |
40
- | onChange | 切换面板的回调 | function | - | |
41
- | items | 折叠项目内容 | | - | 5.6.0 |
42
-
43
-
44
- ### ItemType
45
-
46
- | 参数 | 说明 | 类型 | 默认值 | 版本 |
47
- |--------|--------|--------|--------|--------|
48
- | classNames | 语义化结构 className | | - | 5.21.0 |
49
- | collapsible | 是否可折叠或指定可折叠触发区域 | header | - | |
50
- | forceRender | 被隐藏时是否渲染 body 区域 DOM 结构 | boolean | false | |
51
- | key | 对应 activeKey | string \| number | - | |
52
- | label | 面板标题 | ReactNode | - | - |
53
- | showArrow | 是否展示当前面板上的箭头(为 false 时,collapsible 不能设为 icon) | boolean | true | |
54
- | styles | 语义化结构 style | | - | 5.21.0 |
55
-
56
-
57
- ### Collapse.Panel
58
-
59
- <!-- prettier-ignore -->
60
- <Container type="warning" title="已废弃">
61
- 版本 >= 5.6.0 时请使用 items 方式配置面板。
62
- </Container>
63
- | 参数 | 说明 | 类型 | 默认值 | 版本 |
64
- |--------|--------|--------|--------|--------|
65
- | collapsible | 是否可折叠或指定可折叠触发区域 | header | - | 4.9.0 (icon: 4.24.0) |
66
- | forceRender | 被隐藏时是否渲染 body 区域 DOM 结构 | boolean | false | |
67
- | header | 面板标题 | ReactNode | - | |
68
- | key | 对应 activeKey | string \| number | - | |
69
- | showArrow | 是否展示当前面板上的箭头(为 false 时,collapsible 不能设为 icon) | boolean | true | |
@@ -1,221 +0,0 @@
1
-
2
-
3
- <DemoTitle title="DatePicker" desc="输入或选择时间的控件。">
4
- #### API
5
-
6
- <AntdApiRef url="https://ant.design/components/date-picker-cn/#api"></AntdApiRef>
7
-
8
-
9
- ## antd API
10
-
11
- 通用属性参考:[通用属性](/docs/react/common-props)
12
-
13
- 日期类组件包括以下五种形式。
14
-
15
-
16
- - DatePicker
17
- - DatePicker[picker="month"]
18
- - DatePicker[picker="week"]
19
- - DatePicker[picker="year"]
20
- - DatePicker[picker="quarter"] (4.1.0 新增)
21
- - RangePicker
22
-
23
- ### 国际化配置
24
-
25
- 默认配置为 en-US,如果你需要设置其他语言,推荐在入口处使用我们提供的国际化组件,详见:[ConfigProvider 国际化](https://ant.design/components/config-provider-cn/)。
26
-
27
- 如有特殊需求(仅修改单一组件的语言),请使用 locale 参数,参考:[默认配置](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json)。
28
-
29
-
30
- ```jsx
31
- // 默认语言为 en-US,如果你需要设置其他语言,推荐在入口文件全局设置 locale
32
- // 确保还导入相关的 dayjs 文件,否则所有文本的区域设置都不会更改(例如范围选择器月份)
33
- import locale from 'antd/locale/zh_CN';
34
- import dayjs from 'dayjs';
35
-
36
- import 'dayjs/locale/zh-cn';
37
-
38
- dayjs.locale('zh-cn');
39
-
40
- <ConfigProvider locale={locale}>
41
- <DatePicker defaultValue={dayjs('2015-01-01', 'YYYY-MM-DD')} />
42
- </ConfigProvider>;
43
- ```
44
-
45
-
46
- <!-- prettier-ignore -->
47
- <Container type="warning">
48
- 在搭配 Next.js 的 App Router 使用时,注意在引入 dayjs 的 locale 文件时加上 `'use client'`。这是由于 Ant Design 的组件都是客户端组件,在 RSC 中引入 dayjs 的 locale 文件将不会在客户端生效。
49
- </Container>
50
- ### 共同的 API
51
-
52
- 以下 API 为 DatePicker、 RangePicker 共享的 API。
53
-
54
- | 参数 | 说明 | 类型 | 默认值 | 版本 |
55
- |--------|--------|--------|--------|--------|
56
- | allowClear | 自定义清除按钮 | boolean \| { clearIcon?: ReactNode } | true | 5.8.0: 支持对象类型 |
57
- | autoFocus | 自动获取焦点 | boolean | false | |
58
- | className | 选择器 className | string | - | |
59
- | dateRender | 自定义日期单元格的内容,5.4.0 起用 | function(currentDate: dayjs, today: dayjs) => React.ReactNode | - | < 5.4.0 |
60
- | cellRender | 自定义单元格的内容 | (current: dayjs, info: { originNode: React.ReactElement,today: DateType, range?: 'start' \| 'end', type: PanelMode, locale?: Locale, subType?: 'hour' \| 'minute' \| 'second' \| 'meridiem' }) => React.ReactNode | - | 5.4.0 |
61
- | components | 自定义面板 | Record | - | 5.14.0 |
62
- | defaultOpen | 是否默认展开控制弹层 | boolean | - | |
63
- | disabled | 禁用 | boolean | false | |
64
- | disabledDate | 不可选择的日期 | (currentDate: dayjs, info: { from?: dayjs, type: Picker }) => boolean | - | info |
65
- | format | 设置日期格式,为数组时支持多格式匹配,展示以第一个为准。配置参考 | | | |
66
- | order | 多选、范围时是否自动排序 | boolean | true | 5.14.0 |
67
- | preserveInvalidOnBlur | 失去焦点是否要清空输入框内无效内容 | boolean | false | 5.14.0 |
68
- | getPopupContainer | 定义浮层的容器,默认为 body 上新建 div | function(trigger) | - | |
69
- | inputReadOnly | 设置输入框为只读(避免在移动设备上打开虚拟键盘) | boolean | false | |
70
- | locale | 国际化配置 | object | | |
71
- | minDate | 最小日期,同样会限制面板的切换范围 | dayjs | - | 5.14.0 |
72
- | maxDate | 最大日期,同样会限制面板的切换范围 | dayjs | - | 5.14.0 |
73
- | mode | 日期面板的状态( | time | - | |
74
- | needConfirm | 是否需要确认按钮,为 | boolean | - | 5.14.0 |
75
- | nextIcon | 自定义下一个图标 | ReactNode | - | 4.17.0 |
76
- | open | 控制弹层是否展开 | boolean | - | |
77
- | panelRender | 自定义渲染面板 | (panelNode) => ReactNode | - | 4.5.0 |
78
- | picker | 设置选择器类型 | date | date | quarter |
79
- | placeholder | 输入框提示文字 | string \| [string, string] | - | |
80
- | placement | 选择框弹出的位置 | bottomLeft | bottomLeft | |
81
- | prefix | 自定义前缀 | ReactNode | - | 5.22.0 |
82
- | prevIcon | 自定义上一个图标 | ReactNode | - | 4.17.0 |
83
- | presets | 预设时间范围快捷选择, 自 | { label: React.ReactNode, value: Dayjs \| (() => Dayjs) }[] | - | |
84
- | size | 输入框大小, | large | - | |
85
- | status | 设置校验状态 | 'error' \| 'warning' | - | 4.19.0 |
86
- | style | 自定义输入框样式 | CSSProperties | {} | |
87
- | suffixIcon | 自定义的选择框后缀图标 | ReactNode | - | |
88
- | superNextIcon | 自定义 | ReactNode | - | 4.17.0 |
89
- | superPrevIcon | 自定义 | ReactNode | - | 4.17.0 |
90
- | variant | 形态变体 | outlined | outlined | 5.13.0 \| |
91
- | onOpenChange | 弹出日历和关闭日历的回调 | function(open) | - | |
92
- | onPanelChange | 日历面板切换的回调 | function(value, mode) | - | |
93
-
94
-
95
- ### 共同的方法
96
-
97
- | 名称 | 描述 | 版本 |
98
- |--------|--------|--------|
99
- | blur() | 移除焦点 | |
100
- | focus() | 获取焦点 | |
101
-
102
-
103
- ### DatePicker
104
-
105
- | 参数 | 说明 | 类型 | 默认值 | 版本 |
106
- |--------|--------|--------|--------|--------|
107
- | defaultPickerValue | 默认面板日期,每次面板打开时会被重置到该日期 | | - | 5.14.0 |
108
- | defaultValue | 默认日期,如果开始时间或结束时间为 | | - | |
109
- | disabledTime | 不可选择的时间 | function(date) | - | |
110
- | format | 展示的日期格式,配置参考 | | YYYY-MM-DD | |
111
- | multiple | 是否为多选,不支持 | boolean | false | 5.14.0 |
112
- | pickerValue | 面板日期,可以用于受控切换面板所在日期。配合 | | - | 5.14.0 |
113
- | renderExtraFooter | 在面板中添加额外的页脚 | (mode) => React.ReactNode | - | |
114
- | showNow | 显示当前日期时间的快捷选择 | boolean | - | |
115
- | showTime | 增加时间选择功能 | Object \| boolean | | |
116
- | showTime.defaultValue | 设置用户选择日期时默认的时分秒, | | dayjs() | |
117
- | showWeek | DatePicker 下展示当前周 | boolean | false | 5.14.0 |
118
- | value | 日期 | | - | |
119
- | onChange | 时间发生变化的回调 | function(date: dayjs, dateString: string) | - | |
120
- | onOk | 点击确定按钮的回调 | function() | - | |
121
- | onPanelChange | 日期面板变化时的回调 | function(value, mode) | - | |
122
-
123
-
124
- ### DatePicker[picker=year]
125
-
126
- | 参数 | 说明 | 类型 | 默认值 | 版本 |
127
- |--------|--------|--------|--------|--------|
128
- | defaultValue | 默认日期 | | - | |
129
- | format | 展示的日期格式,配置参考 | | YYYY | |
130
- | multiple | 是否为多选 | boolean | false | 5.14.0 |
131
- | renderExtraFooter | 在面板中添加额外的页脚 | () => React.ReactNode | - | |
132
- | value | 日期 | | - | |
133
- | onChange | 时间发生变化的回调,发生在用户选择时间时 | function(date: dayjs, dateString: string) | - | |
134
-
135
-
136
- ### DatePicker[picker=quarter]
137
-
138
- `4.1.0` 新增。
139
-
140
- | 参数 | 说明 | 类型 | 默认值 | 版本 |
141
- |--------|--------|--------|--------|--------|
142
- | defaultValue | 默认日期 | | - | |
143
- | format | 展示的日期格式,配置参考 | | YYYY-\QQ | |
144
- | multiple | 是否为多选 | boolean | false | 5.14.0 |
145
- | renderExtraFooter | 在面板中添加额外的页脚 | () => React.ReactNode | - | |
146
- | value | 日期 | | - | |
147
- | onChange | 时间发生变化的回调,发生在用户选择时间时 | function(date: dayjs, dateString: string) | - | |
148
-
149
-
150
- ### DatePicker[picker=month]
151
-
152
- | 参数 | 说明 | 类型 | 默认值 | 版本 |
153
- |--------|--------|--------|--------|--------|
154
- | defaultValue | 默认日期 | | - | |
155
- | format | 展示的日期格式,配置参考 | | YYYY-MM | |
156
- | multiple | 是否为多选 | boolean | false | 5.14.0 |
157
- | renderExtraFooter | 在面板中添加额外的页脚 | () => React.ReactNode | - | |
158
- | value | 日期 | | - | |
159
- | onChange | 时间发生变化的回调,发生在用户选择时间时 | function(date: dayjs, dateString: string) | - | |
160
-
161
-
162
- ### DatePicker[picker=week]
163
-
164
- | 参数 | 说明 | 类型 | 默认值 | 版本 |
165
- |--------|--------|--------|--------|--------|
166
- | defaultValue | 默认日期 | | - | |
167
- | format | 展示的日期格式,配置参考 | | YYYY-wo | |
168
- | multiple | 是否为多选 | boolean | false | 5.14.0 |
169
- | renderExtraFooter | 在面板中添加额外的页脚 | (mode) => React.ReactNode | - | |
170
- | value | 日期 | | - | |
171
- | onChange | 时间发生变化的回调,发生在用户选择时间时 | function(date: dayjs, dateString: string) | - | |
172
- | showWeek | DatePicker 下展示当前周 | boolean | true | 5.14.0 |
173
-
174
-
175
- ### RangePicker
176
-
177
- | 参数 | 说明 | 类型 | 默认值 | 版本 |
178
- |--------|--------|--------|--------|--------|
179
- | allowEmpty | 允许起始项部分为空 | [boolean, boolean] | [false, false] | |
180
- | cellRender | 自定义单元格的内容。 | (current: dayjs, info: { originNode: React.ReactElement,today: DateType, range?: 'start' \| 'end', type: PanelMode, locale?: Locale, subType?: 'hour' \| 'minute' \| 'second' \| 'meridiem' }) => React.ReactNode | - | 5.4.0 |
181
- | dateRender | 自定义日期单元格的内容,5.4.0 起用 | function(currentDate: dayjs, today: dayjs) => React.ReactNode | - | < 5.4.0 |
182
- | defaultPickerValue | 默认面板日期,每次面板打开时会被重置到该日期 | | - | 5.14.0 |
183
- | defaultValue | 默认日期 | | - | |
184
- | disabled | 禁用起始项 | [boolean, boolean] | - | |
185
- | disabledTime | 不可选择的时间 | function(date: dayjs, partial: | - | info.from |
186
- | format | 展示的日期格式,配置参考 | | YYYY-MM-DD HH:mm:ss | |
187
- | id | 设置输入框 | { start?: string, end?: string } | - | 5.14.0 |
188
- | pickerValue | 面板日期,可以用于受控切换面板所在日期。配合 | | - | 5.14.0 |
189
- | presets | 预设时间范围快捷选择,自 | { label: React.ReactNode, value: (Dayjs \| (() => Dayjs))[] }[] | - | |
190
- | renderExtraFooter | 在面板中添加额外的页脚 | () => React.ReactNode | - | |
191
- | separator | 设置分隔符 | React.ReactNode | | |
192
- | showTime | 增加时间选择功能 | Object\|boolean | | |
193
- | showTime.defaultValue | 设置用户选择日期时默认的时分秒, | | [dayjs(), dayjs()] | |
194
- | value | 日期 | | - | |
195
- | onCalendarChange | 待选日期发生变化的回调。 | function(dates: [dayjs, dayjs], dateStrings: [string, string], info: { range: | - | |
196
- | onChange | 日期范围发生变化的回调 | function(dates: [dayjs, dayjs], dateStrings: [string, string]) | - | |
197
- | onFocus | 聚焦时回调 | function(event, { range: 'start' \| 'end' }) | - | range |
198
- | onBlur | 失焦时回调 | function(event, { range: 'start' \| 'end' }) | - | range |
199
-
200
-
201
- #### formatType
202
-
203
-
204
- ```typescript
205
- import type { Dayjs } from 'dayjs';
206
-
207
- type Generic = string;
208
- type GenericFn = (value: Dayjs) => string;
209
-
210
- export type FormatType =
211
- | Generic
212
- | GenericFn
213
- | Array
214
- | {
215
- format: string;
216
- type?: 'mask';
217
- };
218
- ```
219
-
220
-
221
- 注意:`type` 定义为 `5.14.0` 新增。
@@ -1,37 +0,0 @@
1
-
2
-
3
- <DemoTitle title="Descriptions" desc="展示多个只读字段的组合">
4
- #### API
5
-
6
- <AntdApiRef url="https://ant.design/components/descriptions-cn/#api"></AntdApiRef>
7
-
8
-
9
- ## antd API
10
-
11
- 通用属性参考:[通用属性](/docs/react/common-props)
12
-
13
- ### Descriptions
14
-
15
- | 参数 | 说明 | 类型 | 默认值 | 版本 |
16
- |--------|--------|--------|--------|--------|
17
- | bordered | 是否展示边框 | boolean | false | |
18
- | colon | 配置 | boolean | true | |
19
- | column | 一行的 | number \| | 3 | |
20
- | extra | 描述列表的操作区域,显示在右上方 | ReactNode | - | 4.5.0 |
21
- | items | 描述列表项内容 | | - | 5.8.0 |
22
- | layout | 描述布局 | horizontal | horizontal | |
23
- | size | 设置列表的大小。可以设置为 | default | - | |
24
- | title | 描述列表的标题,显示在最顶部 | ReactNode | - | |
25
- | classNames | 语义化结构 class | | - | 5.23.0 |
26
- | styles | 语义化结构 style | | - | 5.23.0 |
27
-
28
-
29
- ### DescriptionItem
30
-
31
- | 参数 | 说明 | 类型 | 默认值 | 版本 |
32
- |--------|--------|--------|--------|--------|
33
- | label | 内容的描述 | ReactNode | - | |
34
- | span | 包含列的数量( | number\| | 1 | screens: 5.9.0 |
35
-
36
-
37
- span 是 Description.Item 的数量。 span={2} 会占用两个 DescriptionItem 的宽度。当同时配置 `style` 和 `labelStyle`(或 `contentStyle`)时,两者会同时作用。样式冲突时,后者会覆盖前者。
@@ -1,62 +0,0 @@
1
-
2
-
3
- <DemoTitle title="Drawer" desc="从页面一侧滑入的操作面板,用于承载临时界面内容。">
4
- #### API
5
-
6
- | 属性名 | 描述 | 类型 | 默认值 |
7
- |--------|--------|--------|--------|
8
- | showDivider | 是否显示分割线 | boolean | true |
9
-
10
- ##### Drawer.Confirm - 带按钮的抽屉
11
-
12
- | 属性名 | 描述 | 类型 | 默认值 |
13
- |--------|--------|--------|--------|
14
- | footer | 自定义底部内容 | React.ReactNode | |
15
- | onOk | 点击确定回调 | () => void | |
16
- | okText | 确认按钮文字 | string | |
17
- | okButtonProps | 确认按钮属性 | ButtonProps | |
18
- | onCancel | 点击取消回调 | () => void | |
19
- | cancelText | 取消按钮文字 | string | |
20
- | cancelButtonProps | 取消按钮属性 | ButtonProps | |
21
- | info | 底部额外内容 | React.ReactNode | |
22
-
23
- <AntdApiRef url="https://ant.design/components/drawer-cn/#api"></AntdApiRef>
24
-
25
-
26
- ## antd API
27
-
28
- 通用属性参考:[通用属性](/docs/react/common-props)
29
-
30
- <!-- prettier-ignore -->
31
- <Container type="warning" title="注意">
32
- v5 使用 `rootClassName` 与 `rootStyle` 来配置最外层元素样式。原 v4 `className` 与 `style` 改至配置 Drawer 窗体样式以和 Modal 对齐。
33
- </Container>
34
- | 参数 | 说明 | 类型 | 默认值 | 版本 |
35
- |--------|--------|--------|--------|--------|
36
- | autoFocus | 抽屉展开后是否将焦点切换至其 DOM 节点 | boolean | true | 4.17.0 |
37
- | afterOpenChange | 切换抽屉时动画结束后的回调 | function(open) | - | |
38
- | className | Drawer 容器外层 className 设置,如果需要设置最外层,请使用 rootClassName | string | - | |
39
- | classNames | 语义化结构 className | | - | 5.10.0 |
40
- | closeIcon | 自定义关闭图标。5.7.0:设置为 | ReactNode | | |
41
- | destroyOnHidden | 关闭时销毁 Drawer 里的子元素 | boolean | false | 5.25.0 |
42
- | extra | 抽屉右上角的操作区域 | ReactNode | - | 4.17.0 |
43
- | footer | 抽屉的页脚 | ReactNode | - | |
44
- | forceRender | 预渲染 Drawer 内元素 | boolean | false | |
45
- | getContainer | 指定 Drawer 挂载的节点, | HTMLElement \| () => HTMLElement \| Selectors \| false | body | |
46
- | height | 高度,在 | string \| number | 378 | |
47
- | keyboard | 是否支持键盘 esc 关闭 | boolean | true | |
48
- | mask | 是否展示遮罩 | boolean | true | |
49
- | maskClosable | 点击蒙层是否允许关闭 | boolean | true | |
50
- | placement | 抽屉的方向 | top | right | |
51
- | push | 用于设置多层 Drawer 的推动行为 | boolean \| { distance: string \| number } | { distance: 180 } | 4.5.0+ |
52
- | rootStyle | 可用于设置 Drawer 最外层容器的样式,和 | CSSProperties | - | |
53
- | size | 预设抽屉宽度(或高度),default | 'default' \| 'large' | 'default' | 4.17.0 |
54
- | style | 设计 Drawer 容器样式,如果你只需要设置内容部分请使用 | CSSProperties | - | |
55
- | styles | 语义化结构 style | | - | 5.10.0 |
56
- | title | 标题 | ReactNode | - | |
57
- | loading | 显示骨架屏 | boolean | false | 5.17.0 |
58
- | open | Drawer 是否可见 | boolean | - |
59
- | width | 宽度 | string \| number | 378 | |
60
- | zIndex | 设置 Drawer 的 | number | 1000 | |
61
- | onClose | 点击遮罩层或左上角叉或取消按钮的回调 | function(e) | - | |
62
- | drawerRender | 自定义渲染抽屉 | (node: ReactNode) => ReactNode | - | 5.18.0 |