feat(Rate): add @rate-icon-disabled-color less var

This commit is contained in:
陈嘉涵
2020-01-27 15:05:50 +08:00
parent ea74194990
commit 8b8471945c
5 changed files with 20 additions and 21 deletions
+3 -6
View File
@@ -26,6 +26,7 @@ export default createComponent({
readonly: Boolean,
disabled: Boolean,
allowHalf: Boolean,
disabledColor: String,
value: {
type: Number,
default: 0,
@@ -46,10 +47,6 @@ export default createComponent({
type: String,
default: '#c7c7c7',
},
disabledColor: {
type: String,
default: '#bdbdbd',
},
count: {
type: Number,
default: 5,
@@ -175,7 +172,7 @@ export default createComponent({
<Icon
size={this.sizeWithUnit}
name={isFull ? icon : voidIcon}
class={bem('icon')}
class={bem('icon', { disabled })}
data-score={score}
color={disabled ? disabledColor : isFull ? color : voidColor}
onClick={() => {
@@ -186,7 +183,7 @@ export default createComponent({
<Icon
size={this.sizeWithUnit}
name={isVoid ? voidIcon : icon}
class={bem('icon', 'half')}
class={bem('icon', ['half', { disabled }])}
data-score={score - 0.5}
color={disabled ? disabledColor : isVoid ? voidColor : color}
onClick={() => {