[new feature] Button: add hairline prop (#3031)

This commit is contained in:
neverland
2019-03-21 20:13:34 +08:00
committed by GitHub
parent 08466eabb9
commit 01ef298abc
7 changed files with 86 additions and 25 deletions

View File

@@ -23,11 +23,22 @@ Vue.use(Button);
#### 朴素按钮
通过`plain`属性将按钮设置为朴素按钮,朴素按钮的文字为按钮颜色,背景为白色。
```html
<van-button plain type="primary">朴素按钮</van-button>
<van-button plain type="danger">朴素按钮</van-button>
```
#### 细边框
设置`hairline`属性可以开启 0.5px 边框,基于伪类实现
```html
<van-button plain hairline type="primary">细边框按钮</van-button>
<van-button plain hairline type="danger">细边框按钮</van-button>
```
#### 禁用状态
通过`disabled`属性来禁用按钮,此时按钮不可点击
@@ -76,6 +87,7 @@ Vue.use(Button);
| square | 是否为方形按钮 | `Boolean` | `false` | 1.2.0 |
| round | 是否为圆形按钮 | `Boolean` | `false` | 1.3.4 |
| disabled | 是否禁用按钮 | `Boolean` | `false` | - |
| hairline | 是否使用 0.5px 边框 | `Boolean` | `false` | 1.6.11 |
| loading | 是否显示为加载状态 | `Boolean` | `false` | - |
| loading-text | 加载状态提示文字 | `String` | - | 1.6.3 |
| loading-size | 加载图标大小 | `String` | `20px` | 1.6.7 |