chore: add trailingComma

This commit is contained in:
陈嘉涵
2020-01-19 11:57:09 +08:00
parent e841175fe8
commit 389d68884d
269 changed files with 2706 additions and 2702 deletions
+10 -10
View File
@@ -14,18 +14,18 @@ export default createComponent({
percentage: {
type: Number,
required: true,
validator: value => value >= 0 && value <= 100
validator: value => value >= 0 && value <= 100,
},
showPivot: {
type: Boolean,
default: true
}
default: true,
},
},
data() {
return {
pivotWidth: 0,
progressWidth: 0
progressWidth: 0,
};
},
@@ -35,7 +35,7 @@ export default createComponent({
watch: {
showPivot: 'setWidth',
pivotText: 'setWidth'
pivotText: 'setWidth',
},
methods: {
@@ -44,7 +44,7 @@ export default createComponent({
this.progressWidth = this.$el.offsetWidth;
this.pivotWidth = this.$refs.pivot ? this.$refs.pivot.offsetWidth : 0;
});
}
},
},
render() {
@@ -56,17 +56,17 @@ export default createComponent({
const pivotStyle = {
color: this.textColor,
left: `${((this.progressWidth - this.pivotWidth) * percentage) / 100}px`,
background: this.pivotColor || background
background: this.pivotColor || background,
};
const portionStyle = {
background,
width: (this.progressWidth * percentage) / 100 + 'px'
width: (this.progressWidth * percentage) / 100 + 'px',
};
const wrapperStyle = {
background: this.trackColor,
height: addUnit(this.strokeWidth)
height: addUnit(this.strokeWidth),
};
return (
@@ -80,5 +80,5 @@ export default createComponent({
</span>
</div>
);
}
},
});