This commit is contained in:
梁灏 2019-03-04 17:46:36 +08:00
parent 847c0d4302
commit b778e4ff4f

View file

@ -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 ? {