微信小程序离开页面后,该页面的动画回收失败 请问大佬应该怎么回收? 谢谢。我在onUnload里写了

小程序 文章 2020-09-02 15:01 577 0 全屏看文

AI助手支持GPT4.0

微信小程序离开页面后,该页面的动画回收失败 请问大佬应该怎么回收? 谢谢。我在onUnload里写了After the WeChat applet left the page, the animation recovery of the page failed. How should the boss recover? Thank you. I wrote in onUnload

微信小程序离开页面后,该页面的动画回收失败 请问大佬应该怎么回收? 谢谢。我在onUnload里写了



回答:

独揽月下萤火~:

定时器的创建有返回值的 返回值就是这个定时器的id 所以你创建定时器的时候可以用 this.timerId=setInterval(xxx) 最后在需要的地方清理掉 注意this的指向问题 最好用箭头函数来写

谋谋谋:

哈哈哈嗝

Mr.嘿:

你这个定时器,清理了个空气。。。

酱酱银:额。。。。大佬 应该咋写啊(哭)
酱酱银:我去把动画给个data,然后去清楚吗
酱酱银:我去吧动画给个data然后回收吗
酱酱银:

-EOF-

AI助手支持GPT4.0