|
@@ -58,7 +58,7 @@ export default {
|
|
|
// 圆大小半径
|
|
|
type: Number,
|
|
|
default: 60
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
svgStyle() {
|
|
@@ -82,11 +82,12 @@ export default {
|
|
|
return Math.PI * 2 * this.radius;
|
|
|
},
|
|
|
pathStyle() {
|
|
|
+ debugger;
|
|
|
return {
|
|
|
'stroke-dasharray': `${this.len}px ${this.len}px`,
|
|
|
// eslint-disable-next-line prettier/prettier
|
|
|
'stroke-dashoffset': `${((100 - this.percent) / 100) * this.len}px`, // 动画占圆周长百分比
|
|
|
- transition: 'stroke-dashoffset 1s ease' // 2s代表动画时间
|
|
|
+ transition: 'stroke-dashoffset 1s ease-in-out' // 2s代表动画时间
|
|
|
};
|
|
|
}
|
|
|
}
|