[new feature] Button: add color prop (#4124)
This commit is contained in:
@@ -99,6 +99,15 @@ Vue.use(Button);
|
||||
<van-button type="primary" to="index">路由跳转</van-button>
|
||||
```
|
||||
|
||||
### 自定义颜色
|
||||
|
||||
通过`color`属性可以自定义按钮的颜色
|
||||
|
||||
```html
|
||||
<van-button color="#7232dd">自定义颜色</van-button>
|
||||
<van-button color="#7232dd" plain>自定义颜色</van-button>
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### Props
|
||||
@@ -108,6 +117,7 @@ Vue.use(Button);
|
||||
| type | 类型,可选值为 `primary` `info` `warning` `danger` | `string` | `default` | 1.6.6 |
|
||||
| size | 尺寸,可选值为 `large` `small` `mini` | `string` | `normal` | - |
|
||||
| text | 按钮文字 | `string` | - | - |
|
||||
| color | 按钮颜色 | `string` | - | 2.1.3 |
|
||||
| icon | 左侧图标名称或图片链接,可选值见 Icon 组件 | `string` | - | 2.0.0 |
|
||||
| tag | HTML 标签 | `string` | `button` | - |
|
||||
| native-type | 原生 button 标签 type 属性 | `string` | - | - |
|
||||
|
||||
Reference in New Issue
Block a user