Rate: make icon classes responsive (#10003)

pull/10034/head
杨奕 2018-03-06 11:04:57 +08:00 committed by GitHub
parent cacb0aeaec
commit ed5892b933
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 8 deletions

View File

@ -48,7 +48,6 @@
data() {
return {
classMap: {},
pointerAtLeftHalf: true,
currentValue: this.value,
hoverIndex: -1
@ -205,6 +204,16 @@
return result;
},
classMap() {
return {
lowClass: this.iconClasses[0],
mediumClass: this.iconClasses[1],
highClass: this.iconClasses[2],
voidClass: this.voidIconClass,
disabledVoidClass: this.disabledVoidIconClass
};
},
rateDisabled() {
return this.disabled || (this.elForm || {}).disabled;
}
@ -332,13 +341,6 @@
if (!this.value) {
this.$emit('input', 0);
}
this.classMap = {
lowClass: this.iconClasses[0],
mediumClass: this.iconClasses[1],
highClass: this.iconClasses[2],
voidClass: this.voidIconClass,
disabledVoidClass: this.disabledVoidIconClass
};
}
};
</script>