Skip to content

Commit b85587e

Browse files
committed
feat: Small addition to previous commit
1 parent 570e803 commit b85587e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/components/range/range-utils.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,17 @@ export let mixin = {
6060
},
6161
computed: {
6262
classes () {
63-
return {
63+
const cls = {
6464
disabled: this.disable,
6565
'label-always': this.labelAlways,
66-
'has-error': this.error,
67-
[`text-${this.color}`]: !this.error && this.color
66+
'has-error': this.error
6867
}
68+
69+
if (!this.error && this.color) {
70+
cls[`text-${this.color}`] = true
71+
}
72+
73+
return cls
6974
},
7075
labelColor () {
7176
return this.error

0 commit comments

Comments
 (0)