uni-app学习笔记之页面销毁处理
页面或者函数完成后的善后工作
fe:
- setTimeout() clearTimeout()
- setInterval() clearInterval()
- uni.showLoading() uni.hideLoading()
- this. o n ( ′ f u n c ′ ) t h i s . on('func') this. on(′func′)this.off(‘func’)
//settimeoutvar id = setTimeout(() => {uni.showToast({title: "success"})}, 1000);clearTimeout(id) //如果异步操作没有触发,需要销毁id,提前销毁不会执行
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
