创建回调函数时,不可带上括号,否则会在调用此语句时,立即执行一次回调函数

This commit is contained in:
wangjunyi 2023-04-27 16:26:29 +08:00
parent 8a68bae0bb
commit c561dda269

View File

@ -161,7 +161,7 @@ export default {
}
setTimeout( ()=>{
if (!this.showDialog) return;
this.getProgressForFile(this.getProgressForFileTimer())
this.getProgressForFile(this.getProgressForFileTimer)
}, 1000)
},
getProgressForFile: function (callback){