[new feature] Tag: add text-color prop (#2277)

This commit is contained in:
neverland
2018-12-12 18:08:23 +08:00
committed by GitHub
parent 21e79239d6
commit b5e10cd95e
5 changed files with 28 additions and 4 deletions
+7 -1
View File
@@ -10,6 +10,7 @@ Vue.use(Tag);
### 代码演示
#### 基础用法
通过 type 属性控制 Tag 颜色,默认为灰色
```html
@@ -20,6 +21,7 @@ Vue.use(Tag);
```
#### 空心样式
设置`plain`属性设置为空心样式
```html
@@ -30,6 +32,7 @@ Vue.use(Tag);
```
#### 圆角样式
通过`round`设置为圆角样式
```html
@@ -40,6 +43,7 @@ Vue.use(Tag);
```
#### 标记样式
通过`mark`设置为标记样式(半圆角)
```html
@@ -56,6 +60,7 @@ Vue.use(Tag);
<van-tag color="#f2826a" plain>标签</van-tag>
<van-tag color="#7232dd">标签</van-tag>
<van-tag color="#7232dd" plain>标签</van-tag>
<van-tag color="#ffe1e1" text-color="#ad0000">标签</van-tag>
```
#### 标签大小
@@ -72,10 +77,11 @@ Vue.use(Tag);
|------|------|------|------|------|
| type | 类型,可选值为`primary` `success` `danger` | `String` | - | - |
| size | 大小, 可选值为`large` `medium` | `String` | - | 1.3.8 |
| color | 自定义标签颜色 | `String` | - | 1.3.8 |
| color | 标签颜色 | `String` | - | 1.3.8 |
| plain | 是否为空心样式 | `Boolean` | `false` | - |
| round | 是否为圆角样式 | `Boolean` | `false` | 1.3.8 |
| mark | 是否为标记样式 | `Boolean` | `false` | - |
| text-color | 文本颜色,优先级高于`color`属性 | `String` | `white` | 1.4.10 |
### Slot