Correct barStyle computed property
This commit is contained in:
parent
adc203b929
commit
3e9a7f9786
1 changed files with 3 additions and 1 deletions
|
@ -170,11 +170,13 @@
|
||||||
return (val[1] - this.min) / (this.max - this.min) * 100;
|
return (val[1] - this.min) / (this.max - this.min) * 100;
|
||||||
},
|
},
|
||||||
barStyle () {
|
barStyle () {
|
||||||
|
|
||||||
const style = {
|
const style = {
|
||||||
left: (this.currentValue[0] - this.min) / (this.max - this.min) * 100 + '%'
|
width: (this.currentValue[0] - this.min) / (this.max - this.min) * 100 + '%'
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.range) {
|
if (this.range) {
|
||||||
|
style.left = (this.currentValue[0] - this.min) / (this.max - this.min) * 100 + '%';
|
||||||
style.width = (this.currentValue[1] - this.currentValue[0]) / (this.max - this.min) * 100 + '%';
|
style.width = (this.currentValue[1] - this.currentValue[0]) / (this.max - this.min) * 100 + '%';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue