Commit 3e9a7f9786717a2559efb62ddbaade3d55553406

Authored by Sergio Crisostomo
1 parent adc203b9

Correct barStyle computed property

Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
src/components/slider/slider.vue
... ... @@ -170,11 +170,13 @@
170 170 return (val[1] - this.min) / (this.max - this.min) * 100;
171 171 },
172 172 barStyle () {
  173 +
173 174 const style = {
174   - left: (this.currentValue[0] - this.min) / (this.max - this.min) * 100 + '%'
  175 + width: (this.currentValue[0] - this.min) / (this.max - this.min) * 100 + '%'
175 176 };
176 177  
177 178 if (this.range) {
  179 + style.left = (this.currentValue[0] - this.min) / (this.max - this.min) * 100 + '%';
178 180 style.width = (this.currentValue[1] - this.currentValue[0]) / (this.max - this.min) * 100 + '%';
179 181 }
180 182  
... ...