From b778e4ff4ff98d5a8c4c3edbd67f2757c022012f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=81=8F?= Date: Mon, 4 Mar 2019 17:46:36 +0800 Subject: [PATCH] fixed #4334 --- src/components/progress/progress.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/progress/progress.vue b/src/components/progress/progress.vue index a693c168..06cbd4bc 100644 --- a/src/components/progress/progress.vue +++ b/src/components/progress/progress.vue @@ -52,6 +52,9 @@ vertical: { type: Boolean, default: false + }, + strokeColor: { + type: String } }, data () { @@ -77,13 +80,19 @@ return type; }, bgStyle () { - return this.vertical ? { + const style = this.vertical ? { height: `${this.percent}%`, - width: `${this.strokeWidth}px` + width: `${this.strokeWidth}px`, } : { width: `${this.percent}%`, height: `${this.strokeWidth}px` }; + + if (this.strokeColor) { + style['background-color'] = this.strokeColor; + } + + return style; }, successBgStyle () { return this.vertical ? {