From f7cfc194655c47b1166c4fbf49def22f628049f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=81=E6=96=87=E6=B6=9B?= Date: Tue, 21 Jul 2020 10:07:38 +0800 Subject: [PATCH] docs: optimize button docs (#25712) Co-authored-by: wynterding --- components/button/demo/basic.md | 4 ++-- components/button/index.en-US.md | 4 ++-- components/button/index.zh-CN.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/button/demo/basic.md b/components/button/demo/basic.md index 195f604f28..974fbb514b 100644 --- a/components/button/demo/basic.md +++ b/components/button/demo/basic.md @@ -7,11 +7,11 @@ title: ## zh-CN -按钮有四种类型:主按钮、次按钮、虚线按钮和链接按钮。主按钮在同一个操作区域最多出现一次。 +按钮有五种类型:主按钮、次按钮、虚线按钮、文本按钮和链接按钮。主按钮在同一个操作区域最多出现一次。 ## en-US -There are `primary` button, `default` button, `dashed` button and `link` button in antd. +There are `primary` button, `default` button, `dashed` button, `text` button and `link` button in antd. ```jsx import { Button } from 'antd'; diff --git a/components/button/index.en-US.md b/components/button/index.en-US.md index 228aede732..2d2262f78d 100644 --- a/components/button/index.en-US.md +++ b/components/button/index.en-US.md @@ -11,7 +11,7 @@ To trigger an operation. A button means an operation (or a series of operations). Clicking a button will trigger corresponding business logic. -In Ant Design we provide 4 types of button. +In Ant Design we provide 5 types of button. - Primary button: indicate the main action, one primary button at most in one section. - Default button: indicate a series of actions without priority. @@ -41,7 +41,7 @@ To get a customized button, just set `type`/`shape`/`size`/`loading`/`disabled`. | shape | Can be set to `circle`, `round` or omitted | string | - | | | size | Set the size of button | `large` \| `middle` \| `small` | - | | | target | Same as target attribute of a, works when href is specified | string | - | | -| type | Can be set to `primary` `ghost` `dashed` `danger` `link` `text` | string | - | | +| type | Can be set to `primary` `ghost` `dashed` `danger` `link` `text` `default` | string | `default` | | | onClick | Set the handler to handle `click` event | (event) => void | - | | | block | Option to fit button width to its parent width | boolean | false | | | danger | Set the danger status of button | boolean | false | | diff --git a/components/button/index.zh-CN.md b/components/button/index.zh-CN.md index 15dc6ef3be..434d48a14a 100644 --- a/components/button/index.zh-CN.md +++ b/components/button/index.zh-CN.md @@ -12,7 +12,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/fNUKzY1sk/Button.svg 标记了一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。 -在 Ant Design 中我们提供了四种按钮。 +在 Ant Design 中我们提供了五种按钮。 - 主按钮:用于主行动点,一个操作区域只能有一个主按钮。 - 默认按钮:用于没有主次之分的一组行动点。 @@ -44,7 +44,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/fNUKzY1sk/Button.svg | shape | 设置按钮形状,可选值为 `circle`、 `round` 或者不设 | string | - | | | size | 设置按钮大小 | `large` \| `middle` \| `small` | - | | | target | 相当于 a 链接的 target 属性,href 存在时生效 | string | - | | -| type | 设置按钮类型 | `primary` \| `ghost` \| `dashed` \| `danger` \| `link` \| `text` | - | | +| type | 设置按钮类型 | `primary` \| `ghost` \| `dashed` \| `danger` \| `link` \| `text` \| `default` | `default` | | | onClick | 点击按钮时的回调 | (event) => void | - | | | block | 将按钮宽度调整为其父宽度的选项 | boolean | false | | | danger | 设置危险按钮 | boolean | false | |