[new feature] Rate: add icon、void-icon prop (#2148)

This commit is contained in:
neverland
2018-11-26 17:12:03 +08:00
committed by GitHub
parent 1a53683353
commit d337bd2e20
5 changed files with 73 additions and 11 deletions
+14 -2
View File
@@ -25,7 +25,17 @@ export default {
}
```
#### Custom Color
#### Custom Icon
```html
<van-rate
v-model="value"
icon="like"
void-icon="like-o"
/>
```
#### Custom Style
```html
<van-rate
@@ -50,8 +60,10 @@ export default {
| v-model | Current rate | `Number` | - |
| count | Count | `Number` | `5` |
| size | Icon size (px) | `Number` | `20` |
| color | Selected color | `String` | `#ffd21e` |
| color | Selected color | `String` | `#ffd21e` |
| void-color | Void color | `String` | `#c7c7c7` |
| icon | Selected icon | `String` | `star` |
| void-icon | Void icon | `String` | `star-o` |
| readonly | Whether to be readonly | `Boolean` | `false` |
| disabled | Whether to disable rate | `Boolean` | `false` |
| disabled-color | Disabled color | `String` | `#bdbdbd` |