mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
docs: Version Robin (#32830)
This commit is contained in:
parent
3f495bb56d
commit
ce006bd44e
@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 5.1
|
||||
version: 4.17.0
|
||||
title:
|
||||
zh-CN: 多选
|
||||
en-US: Multiple
|
||||
|
@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 5
|
||||
version: 4.17.0
|
||||
title:
|
||||
zh-CN: 全局样式
|
||||
en-US: Global Theme
|
||||
|
@ -64,18 +64,18 @@ The following APIs are shared by DatePicker, RangePicker.
|
||||
| inputReadOnly | Set the `readonly` attribute of the input tag (avoids virtual keyboard on touch devices) | boolean | false | |
|
||||
| locale | Localization configuration | object | [default](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json) | |
|
||||
| mode | The picker panel mode( [Cannot select year or month anymore?](/docs/react/faq#When-set-mode-to-DatePicker/RangePicker,-cannot-select-year-or-month-anymore?) ) | `time` \| `date` \| `month` \| `year` \| `decade` | - | |
|
||||
| nextIcon | The custom next icon | ReactNode | - | |
|
||||
| nextIcon | The custom next icon | ReactNode | - | 4.17.0 |
|
||||
| open | The open state of picker | boolean | - | |
|
||||
| panelRender | Customize panel render | (panelNode) => ReactNode | - | 4.5.0 |
|
||||
| picker | Set picker type | `date` \| `week` \| `month` \| `quarter` \| `year` | `date` | `quarter`: 4.1.0 |
|
||||
| placeholder | The placeholder of date input | string \| \[string,string] | - | |
|
||||
| popupStyle | To customize the style of the popup calendar | CSSProperties | {} | |
|
||||
| prevIcon | The custom prev icon | ReactNode | - | |
|
||||
| prevIcon | The custom prev icon | ReactNode | - | 4.17.0 |
|
||||
| size | To determine the size of the input box, the height of `large` and `small`, are 40px and 24px respectively, while default size is 32px | `large` \| `middle` \| `small` | - | |
|
||||
| style | To customize the style of the input box | CSSProperties | {} | |
|
||||
| suffixIcon | The custom suffix icon | ReactNode | - | |
|
||||
| superNextIcon | The custom super next icon | ReactNode | - | |
|
||||
| superPrevIcon | The custom super prev icon | ReactNode | - | |
|
||||
| superNextIcon | The custom super next icon | ReactNode | - | 4.17.0 |
|
||||
| superPrevIcon | The custom super prev icon | ReactNode | - | 4.17.0 |
|
||||
| onOpenChange | Callback function, can be executed whether the popup calendar is popped up or closed | function(open) | - | |
|
||||
| onPanelChange | Callback when picker panel mode is changed | function(value, mode) | - | |
|
||||
|
||||
|
@ -65,18 +65,18 @@ import locale from 'antd/lib/locale/zh_CN';
|
||||
| inputReadOnly | 设置输入框为只读(避免在移动设备上打开虚拟键盘) | boolean | false | |
|
||||
| locale | 国际化配置 | object | [默认配置](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json) | |
|
||||
| mode | 日期面板的状态([设置后无法选择年份/月份?](/docs/react/faq#当我指定了-DatePicker/RangePicker-的-mode-属性后,点击后无法选择年份/月份?)) | `time` \| `date` \| `month` \| `year` \| `decade` | - | |
|
||||
| nextIcon | 自定义下一个图标 | ReactNode | - | |
|
||||
| nextIcon | 自定义下一个图标 | ReactNode | - | 4.17.0 |
|
||||
| open | 控制弹层是否展开 | boolean | - | |
|
||||
| panelRender | 自定义渲染面板 | (panelNode) => ReactNode | - | 4.5.0 |
|
||||
| picker | 设置选择器类型 | `date` \| `week` \| `month` \| `quarter` \| `year` | `date` | `quarter`: 4.1.0 |
|
||||
| placeholder | 输入框提示文字 | string \| \[string, string] | - | |
|
||||
| popupStyle | 额外的弹出日历样式 | CSSProperties | {} | |
|
||||
| prevIcon | 自定义上一个图标 | ReactNode | - | |
|
||||
| prevIcon | 自定义上一个图标 | ReactNode | - | 4.17.0 |
|
||||
| size | 输入框大小,`large` 高度为 40px,`small` 为 24px,默认是 32px | `large` \| `middle` \| `small` | - | |
|
||||
| style | 自定义输入框样式 | CSSProperties | {} | |
|
||||
| suffixIcon | 自定义的选择框后缀图标 | ReactNode | - | |
|
||||
| superNextIcon | 自定义 `<<` 切换图标 | ReactNode | - | |
|
||||
| superPrevIcon | 自定义 `>>` 切换图标 | ReactNode | - | |
|
||||
| superNextIcon | 自定义 `<<` 切换图标 | ReactNode | - | 4.17.0 |
|
||||
| superPrevIcon | 自定义 `>>` 切换图标 | ReactNode | - | 4.17.0 |
|
||||
| onOpenChange | 弹出日历和关闭日历的回调 | function(open) | - | |
|
||||
| onPanelChange | 日历面板切换的回调 | function(value, mode) | - | |
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 3.2
|
||||
version: 4.17.0
|
||||
title:
|
||||
zh-CN: 非阻塞校验
|
||||
en-US: No block rule
|
||||
|
@ -64,16 +64,16 @@ notification.config({
|
||||
});
|
||||
```
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
| Property | Description | Type | Default | Version |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| bottom | Distance from the bottom of the viewport, when `placement` is `bottomRight` or `bottomLeft` (unit: pixels) | number | 24 |
|
||||
| closeIcon | Custom close icon | ReactNode | - |
|
||||
| duration | Time in seconds before Notification is closed. When set to 0 or null, it will never be closed automatically | number | 4.5 |
|
||||
| getContainer | Return the mount node for Notification | () => HTMLNode | () => document.body |
|
||||
| placement | Position of Notification, can be one of `topLeft` `topRight` `bottomLeft` `bottomRight` | string | `topRight` |
|
||||
| rtl | Whether to enable RTL mode | boolean | false |
|
||||
| top | Distance from the top of the viewport, when `placement` is `topRight` or `topLeft` (unit: pixels) | number | 24 |
|
||||
| maxCount | Max Notification show, drop oldest if exceed limit | number | - | |
|
||||
| bottom | Distance from the bottom of the viewport, when `placement` is `bottomRight` or `bottomLeft` (unit: pixels) | number | 24 | |
|
||||
| closeIcon | Custom close icon | ReactNode | - | |
|
||||
| duration | Time in seconds before Notification is closed. When set to 0 or null, it will never be closed automatically | number | 4.5 | |
|
||||
| getContainer | Return the mount node for Notification | () => HTMLNode | () => document.body | |
|
||||
| placement | Position of Notification, can be one of `topLeft` `topRight` `bottomLeft` `bottomRight` | string | `topRight` | |
|
||||
| rtl | Whether to enable RTL mode | boolean | false | |
|
||||
| top | Distance from the top of the viewport, when `placement` is `topRight` or `topLeft` (unit: pixels) | number | 24 | |
|
||||
| maxCount | Max Notification show, drop oldest if exceed limit | number | - | 4.17.0 |
|
||||
|
||||
## FAQ
|
||||
|
||||
|
@ -65,16 +65,16 @@ notification.config({
|
||||
});
|
||||
```
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| bottom | 消息从底部弹出时,距离底部的位置,单位像素 | number | 24 |
|
||||
| closeIcon | 自定义关闭图标 | ReactNode | - |
|
||||
| duration | 默认自动关闭延时,单位秒 | number | 4.5 |
|
||||
| getContainer | 配置渲染节点的输出位置 | () => HTMLNode | () => document.body |
|
||||
| placement | 弹出位置,可选 `topLeft` `topRight` `bottomLeft` `bottomRight` | string | `topRight` |
|
||||
| rtl | 是否开启 RTL 模式 | boolean | false |
|
||||
| top | 消息从顶部弹出时,距离顶部的位置,单位像素 | number | 24 |
|
||||
| maxCount | 最大显示数, 超过限制时,最早的消息会被自动关闭 | number | - | |
|
||||
| bottom | 消息从底部弹出时,距离底部的位置,单位像素 | number | 24 | |
|
||||
| closeIcon | 自定义关闭图标 | ReactNode | - | |
|
||||
| duration | 默认自动关闭延时,单位秒 | number | 4.5 | |
|
||||
| getContainer | 配置渲染节点的输出位置 | () => HTMLNode | () => document.body | |
|
||||
| placement | 弹出位置,可选 `topLeft` `topRight` `bottomLeft` `bottomRight` | string | `topRight` | |
|
||||
| rtl | 是否开启 RTL 模式 | boolean | false | |
|
||||
| top | 消息从顶部弹出时,距离顶部的位置,单位像素 | number | 24 | |
|
||||
| maxCount | 最大显示数, 超过限制时,最早的消息会被自动关闭 | number | - | 4.17.0 |
|
||||
|
||||
## FAQ
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 7
|
||||
version: 4.17.0
|
||||
title:
|
||||
zh-CN: 基于 Promise 的异步关闭
|
||||
en-US: Asynchronously close on Promise
|
||||
|
@ -51,12 +51,12 @@ Provide a placeholder while you wait for content to load, or to visualise conten
|
||||
|
||||
### SkeletonButtonProps
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
| --- | --- | --- | --- |
|
||||
| active | Show animation effect | boolean | false |
|
||||
| block | Option to fit button width to its parent width | boolean | false |
|
||||
| shape | Set the shape of button | `circle` \| `round` \| `default` | - |
|
||||
| size | Set the size of button | `large` \| `small` \| `default` | - |
|
||||
| Property | Description | Type | Default | Version |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| active | Show animation effect | boolean | false | |
|
||||
| block | Option to fit button width to its parent width | boolean | false | 4.17.0 |
|
||||
| shape | Set the shape of button | `circle` \| `round` \| `default` | - | |
|
||||
| size | Set the size of button | `large` \| `small` \| `default` | - | |
|
||||
|
||||
### SkeletonInputProps
|
||||
|
||||
|
@ -52,12 +52,12 @@ cover: https://gw.alipayobjects.com/zos/alicdn/KpcciCJgv/Skeleton.svg
|
||||
|
||||
### SkeletonButtonProps
|
||||
|
||||
| 属性 | 说明 | 类型 | 默认值 |
|
||||
| ------ | ------------------------------ | -------------------------------- | ------ |
|
||||
| active | 是否展示动画效果 | boolean | false |
|
||||
| block | 将按钮宽度调整为其父宽度的选项 | boolean | false |
|
||||
| shape | 指定按钮的形状 | `circle` \| `round` \| `default` | - |
|
||||
| size | 设置按钮的大小 | `large` \| `small` \| `default` | - |
|
||||
| 属性 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| ------ | ------------------------------ | -------------------------------- | ------ | ------ |
|
||||
| active | 是否展示动画效果 | boolean | false | |
|
||||
| block | 将按钮宽度调整为其父宽度的选项 | boolean | false | 4.17.0 |
|
||||
| shape | 指定按钮的形状 | `circle` \| `round` \| `default` | - | |
|
||||
| size | 设置按钮的大小 | `large` \| `small` \| `default` | - | |
|
||||
|
||||
### SkeletonInputProps
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 6.1
|
||||
version: 4.17.0
|
||||
title:
|
||||
en-US: Filter in Tree
|
||||
zh-CN: 树型筛选菜单
|
||||
|
@ -5,7 +5,7 @@ import { FormattedMessage, injectIntl } from 'react-intl';
|
||||
import CopyToClipboard from 'react-copy-to-clipboard';
|
||||
import classNames from 'classnames';
|
||||
import LZString from 'lz-string';
|
||||
import { Tooltip, Alert } from 'antd';
|
||||
import { Tooltip, Alert, Badge } from 'antd';
|
||||
import { SnippetsOutlined, CheckOutlined, ThunderboltOutlined } from '@ant-design/icons';
|
||||
import stackblitzSdk from '@stackblitz/sdk';
|
||||
import CodePreview from './CodePreview';
|
||||
@ -316,7 +316,8 @@ ${parsedSourceCode.replace('mountNode', "document.getElementById('container')")}
|
||||
'index.html': html,
|
||||
},
|
||||
};
|
||||
return (
|
||||
|
||||
let codeBox = (
|
||||
<section className={codeBoxClass} id={meta.id}>
|
||||
<section className="code-box-demo">
|
||||
<ErrorBoundary>{this.liveDemo}</ErrorBoundary>
|
||||
@ -458,6 +459,12 @@ ${parsedSourceCode.replace('mountNode', "document.getElementById('container')")}
|
||||
</section>
|
||||
</section>
|
||||
);
|
||||
|
||||
if (meta.version) {
|
||||
codeBox = <Badge.Ribbon text={meta.version}>{codeBox}</Badge.Ribbon>;
|
||||
}
|
||||
|
||||
return codeBox;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user