0
%
export default {
props: {
progress:{
type:Number,
default:0
}
},
data() {
return {
}
},
watch: {
progress(val){
if(val<=100){
this.updateDonut(val)
}
}
},
beforeDestroy() {
// 清除旧组件的样式标签
},
methods: {
updateDonut (percent) {
// 圆形进度
let offset = 0
let $el = this.$refs.section3
let $elItem = this.$refs.section3Item
let $txt = this.$refs.percent
if (percent < 50) {
offset = (360 / 100) * percent
$el.sty