Commit b778e4ff4ff98d5a8c4c3edbd67f2757c022012f
1 parent
847c0d43
fixed #4334
Showing
1 changed file
with
11 additions
and
2 deletions
Show diff stats
src/components/progress/progress.vue
... | ... | @@ -52,6 +52,9 @@ |
52 | 52 | vertical: { |
53 | 53 | type: Boolean, |
54 | 54 | default: false |
55 | + }, | |
56 | + strokeColor: { | |
57 | + type: String | |
55 | 58 | } |
56 | 59 | }, |
57 | 60 | data () { |
... | ... | @@ -77,13 +80,19 @@ |
77 | 80 | return type; |
78 | 81 | }, |
79 | 82 | bgStyle () { |
80 | - return this.vertical ? { | |
83 | + const style = this.vertical ? { | |
81 | 84 | height: `${this.percent}%`, |
82 | - width: `${this.strokeWidth}px` | |
85 | + width: `${this.strokeWidth}px`, | |
83 | 86 | } : { |
84 | 87 | width: `${this.percent}%`, |
85 | 88 | height: `${this.strokeWidth}px` |
86 | 89 | }; |
90 | + | |
91 | + if (this.strokeColor) { | |
92 | + style['background-color'] = this.strokeColor; | |
93 | + } | |
94 | + | |
95 | + return style; | |
87 | 96 | }, |
88 | 97 | successBgStyle () { |
89 | 98 | return this.vertical ? { | ... | ... |