Commit b778e4ff4ff98d5a8c4c3edbd67f2757c022012f

Authored by 梁灏
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,6 +52,9 @@
52 vertical: { 52 vertical: {
53 type: Boolean, 53 type: Boolean,
54 default: false 54 default: false
  55 + },
  56 + strokeColor: {
  57 + type: String
55 } 58 }
56 }, 59 },
57 data () { 60 data () {
@@ -77,13 +80,19 @@ @@ -77,13 +80,19 @@
77 return type; 80 return type;
78 }, 81 },
79 bgStyle () { 82 bgStyle () {
80 - return this.vertical ? { 83 + const style = this.vertical ? {
81 height: `${this.percent}%`, 84 height: `${this.percent}%`,
82 - width: `${this.strokeWidth}px` 85 + width: `${this.strokeWidth}px`,
83 } : { 86 } : {
84 width: `${this.percent}%`, 87 width: `${this.percent}%`,
85 height: `${this.strokeWidth}px` 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 successBgStyle () { 97 successBgStyle () {
89 return this.vertical ? { 98 return this.vertical ? {