this.loading = true;
this.loadingText = "转换中 0%";
let seconds = 5;
let timerTi = 0;
timerTi = setInterval(() => {
seconds--;
if (seconds == 0) {
this.loadingText = "转换中 95%";
} else
this.loadingText =
"转换中 " + Math.floor(100 / (seconds + 1)) + "%";
if (seconds <= 0) {
clearInterval(timerTi);
}
}, 1000);
vue自定义进度条-防实时请求
于 2022-01-24 15:56:39 首次发布