[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
+9 -1
View File
@@ -9,7 +9,7 @@
:class="b('item')"
:size="size + 'px'"
:data-index="index"
:name="full ? 'star' : 'star-o'"
:name="full ? icon : voidIcon"
:color="disabled ? disabledColor : full ? color : voidColor"
@click="onSelect(index)"
/>
@@ -29,6 +29,14 @@ export default create({
type: Number,
default: 20
},
icon: {
type: String,
default: 'star'
},
voidIcon: {
type: String,
default: 'star-o'
},
color: {
type: String,
default: '#ffd21e'