mirror of https://github.com/ElemeFE/element
Rate: make icon classes responsive (#10003)
parent
cacb0aeaec
commit
ed5892b933
|
@ -48,7 +48,6 @@
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
classMap: {},
|
|
||||||
pointerAtLeftHalf: true,
|
pointerAtLeftHalf: true,
|
||||||
currentValue: this.value,
|
currentValue: this.value,
|
||||||
hoverIndex: -1
|
hoverIndex: -1
|
||||||
|
@ -205,6 +204,16 @@
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
classMap() {
|
||||||
|
return {
|
||||||
|
lowClass: this.iconClasses[0],
|
||||||
|
mediumClass: this.iconClasses[1],
|
||||||
|
highClass: this.iconClasses[2],
|
||||||
|
voidClass: this.voidIconClass,
|
||||||
|
disabledVoidClass: this.disabledVoidIconClass
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
rateDisabled() {
|
rateDisabled() {
|
||||||
return this.disabled || (this.elForm || {}).disabled;
|
return this.disabled || (this.elForm || {}).disabled;
|
||||||
}
|
}
|
||||||
|
@ -332,13 +341,6 @@
|
||||||
if (!this.value) {
|
if (!this.value) {
|
||||||
this.$emit('input', 0);
|
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>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue