[new feature] Button: add icon prop

This commit is contained in:
陈嘉涵
2019-05-27 19:23:21 +08:00
parent 8e9ffadc28
commit b02773a455
9 changed files with 96 additions and 37 deletions
+8
View File
@@ -60,6 +60,13 @@ Vue.use(Button);
<van-button round type="danger">Round</van-button>
```
### Icon
```html
<van-button icon="star-o" type="primary" />
<van-button icon="star-o" type="danger">Button</van-button>
```
### Size
```html
@@ -78,6 +85,7 @@ Vue.use(Button);
| type | Can be set to `primary` `info` `warning` `danger` | `String` | `default` |
| size | Can be set to `large` `small` `mini` | `String` | `normal` |
| text | Text | `String` | - |
| icon | Left Icon | `String` | - |
| tag | HTML Tag | `String` | `button` |
| native-type | Native Type Attribute | `String` | `''` |
| plain | Whether to be plain button | `Boolean` | `false` |