We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
小程序在SwitchBar的时候,页面组件不会被销毁,这会导致页面切换Tab时,上一个页面的Toast提示在存在。
目前我的一种方案是重写 Page的onHide事件
let onHide = context.onHide; // eslint-disable-next-line no-unused-vars context.onHide = function (...arg) { // console.log('onHide#######'); onHide.apply(this, arg); // 手动关闭 Toast toast.clear(); context.onHide = onHide; };
The text was updated successfully, but these errors were encountered:
👋 @de1ck,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。
Sorry, something went wrong.
♥️ 有劳 @LeeJim 尽快确认问题。 确认有效后将下一步计划和可能需要的时间回复给 @de1ck 。
这个 toast 是 wx.showToast 吧?应该不是 t-toast?
wx.showToast切换页面还会在,级别比较高,类似root节点下的t-toast ,t-toast在切换页面是不会显示的,但是切换回来可能还会存在。
这个就属于业务自己的逻辑了,组件库底层不适合做这样的处理。
LeeJim
Successfully merging a pull request may close this issue.
这个功能解决了什么问题
小程序在SwitchBar的时候,页面组件不会被销毁,这会导致页面切换Tab时,上一个页面的Toast提示在存在。
你建议的方案是什么
目前我的一种方案是重写 Page的onHide事件
The text was updated successfully, but these errors were encountered: