From 3e9a7f9786717a2559efb62ddbaade3d55553406 Mon Sep 17 00:00:00 2001 From: Sergio Crisostomo Date: Tue, 9 Jan 2018 06:07:23 +0100 Subject: [PATCH] Correct barStyle computed property --- src/components/slider/slider.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/slider/slider.vue b/src/components/slider/slider.vue index cb8399f..0cfe445 100644 --- a/src/components/slider/slider.vue +++ b/src/components/slider/slider.vue @@ -170,11 +170,13 @@ return (val[1] - this.min) / (this.max - this.min) * 100; }, barStyle () { + 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) { + 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 + '%'; } -- libgit2 0.21.4