feat(Progress): add track-color prop (#4789)

This commit is contained in:
neverland
2019-10-20 13:02:30 +08:00
committed by GitHub
parent 4c2cf8e2cb
commit 95598e8842
4 changed files with 19 additions and 8 deletions
+5 -6
View File
@@ -8,6 +8,7 @@ export default createComponent({
inactive: Boolean,
pivotText: String,
pivotColor: String,
trackColor: String,
strokeWidth: [String, Number],
percentage: {
type: Number,
@@ -70,12 +71,10 @@ export default createComponent({
width: (this.progressWidth * percentage) / 100 + 'px'
};
let wrapperStyle;
if (this.strokeWidth) {
wrapperStyle = {
height: addUnit(this.strokeWidth)
};
}
const wrapperStyle = {
background: this.trackColor,
height: addUnit(this.strokeWidth)
};
return (
<div class={bem()} style={wrapperStyle}>