[new feature] Button: add color prop (#4124)

This commit is contained in:
neverland
2019-08-15 20:18:13 +08:00
committed by GitHub
parent 3f39166cbc
commit f130580501
5 changed files with 63 additions and 6 deletions
+8
View File
@@ -81,6 +81,13 @@ Vue.use(Button);
<van-button type="primary" to="index">Vue Router</van-button>
```
### Custom Color
```html
<van-button color="#7232dd">Custom Color</van-button>
<van-button color="#7232dd" plain>Custom Color</van-button>
```
## API
### Props
@@ -90,6 +97,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` | - |
| color | Color | `string` | - |
| icon | Left Icon | `string` | - |
| tag | HTML Tag | `string` | `button` |
| native-type | Native Type Attribute | `string` | `''` |