Progress prop strokeColor support Array type, and support the linear-gradient color
This commit is contained in:
parent
d87a8854b1
commit
25cba38b45
2 changed files with 17 additions and 3 deletions
|
@ -54,7 +54,7 @@
|
|||
default: false
|
||||
},
|
||||
strokeColor: {
|
||||
type: String
|
||||
type: [String, Array]
|
||||
},
|
||||
textInside: {
|
||||
type: Boolean,
|
||||
|
@ -93,7 +93,11 @@
|
|||
};
|
||||
|
||||
if (this.strokeColor) {
|
||||
style['background-color'] = this.strokeColor;
|
||||
if (typeof this.strokeColor === 'string') {
|
||||
style['background-color'] = this.strokeColor;
|
||||
} else {
|
||||
style['background-image'] = `linear-gradient(to right, ${this.strokeColor[0]} 0%, ${this.strokeColor[1]} 100%)`;
|
||||
}
|
||||
}
|
||||
|
||||
return style;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue