Skip to content

Commit

Permalink
doc: 更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
easonchiu committed May 14, 2021
1 parent ef5e9d9 commit 58ff791
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples_src/src/auto-ui/components/button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const Button: React.FC<ButtonProps> = props => {
'x-button--mini': mini,
'x-button--capsule': capsule,
'x-button--hollow': hollow,
'x-button--lighter': lighter || type === 'lighter',
'x-button--lighter': type !== 'default' && lighter,
'x-button--shrink': shrink !== void 0 ? shrink : !!mini,
'x-button--shadow':
(type === 'primary' || type === 'danger' || type === 'secondary') && !hollow && shadow,
Expand Down
26 changes: 14 additions & 12 deletions examples_src/src/auto-ui/components/button/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@ code=[disabled](button_disabled)

## 支持属性

| 属性 | 说明 | 类型 | 默认值 |
| -------- | ----------------------------------------------------------- | -------- | ---------------------------------------- |
| type | 按钮的种类,primary / secondary / lighter/ danger / default | String | primary |
| shadow | 按钮投影,只有类型为 primary / secondary / danger 时才有 | Boolean | false |
| onClick | 点击事件(按钮类型为 button) | Function | - |
| to | 跳转路由(按钮类型为 Link) | String | - |
| href | 跳转 url(按钮类型为 a 标签) | String | - |
| mini | 是否使用小按钮 | Boolean | false |
| capsule | 是否使用胶囊按钮,即两头圆角的样式 | Boolean | true |
| loading | 是否为加载中状态 | Boolean | false |
| disabled | 是否不可用 | Boolean | false |
| shrink | 是否收缩到文字显示范围 | Boolean | mini 为 true 时该值为 true,否则为 false |
| 属性 | 说明 | 类型 | 默认值 |
| -------- | -------------------------------------------------------- | -------- | ---------------------------------------- |
| type | 按钮的种类,primary / secondary / danger / default | String | primary |
| shadow | 按钮投影,只有类型为 primary / secondary / danger 时才有 | Boolean | false |
| lighter | 轻按钮,只有类型为 primary / secondary / danger 时才有 | Boolean | false |
| hollow | 空心按钮,只有类型为 primary / secondary / danger 时才有 | Boolean | false |
| onClick | 点击事件(按钮类型为 button) | Function | - |
| to | 跳转路由(按钮类型为 Link) | String | - |
| href | 跳转 url(按钮类型为 a 标签) | String | - |
| mini | 是否使用小按钮 | Boolean | false |
| capsule | 是否使用胶囊按钮,即两头圆角的样式 | Boolean | true |
| loading | 是否为加载中状态 | Boolean | false |
| disabled | 是否不可用 | Boolean | false |
| shrink | 是否收缩到文字显示范围 | Boolean | mini 为 true 时该值为 true,否则为 false |

0 comments on commit 58ff791

Please sign in to comment.