提交 625cb4a0 编写于 作者: VK1688's avatar VK1688

u-circle-progres 组件 在进度条到100%的时候发出一个finish事件

上级 54546608
......@@ -47,6 +47,7 @@
*/
export default {
name: 'u-circle-progress',
emits: ["end","finish"],
props: {
// 圆环进度百分比值
percent: {
......@@ -191,6 +192,12 @@ export default {
if (progress < this.newPercent) return;
}
setTimeout(() => {
if (progress >= this.percent) {
this.$emit("end", progress);
}
if (progress >= 100) {
this.$emit("finish", progress);
}
// 定时器,每次操作间隔为time值,为了让进度条有动画效果
this.drawCircleByProgress(progress);
}, time);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册