-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
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
使用相机扫码完成或失败后,调用message组件显示提示信息,连续两次调用时,提示信息会直接消失 #3067
Comments
👋 @DouDouLi-YouTang,感谢给 TDesign 提出了 issue。 |
@DouDouLi-YouTang 可能是组件内部单独设置一个动画持续时间,所以在快速连续调用下,会存在时机错误。message问题我们验证一下。 但是你这个场景用 Toast 比较合适吧 🤔 |
Toast 样式感觉不是很好看😂 |
@DouDouLi-YouTang 刚刚看了一下,问题的原因可能是wx.scanCode()结束关闭扫码页面时,会触发页面重新渲染,而此时message实例并未移除,你可以试试调用wx.scanCode()之前调用一下message hide,手动移除实例。另外wx.scanCode()调用成功/失败都有相应的回调函数、 testScan() {
Message.hide({
context: this,
});
wx.scanCode({
onlyFromCamera: true,
scanType: ['qrCode'],
success: () => {
Message.success({
...
});
},
fail: () => {
Message.error({
...
});
},
});
} |
好的好的,感谢 |
tdesign-miniprogram 版本
1.5.1
重现链接
No response
重现步骤
期望结果
扫码结束后,提示信息能正常显示
实际结果
提示消息会突然消失,或者消失的很快,并未等到时间结束
基础库版本
3.5.3
补充说明
复现步骤,快速两次取消扫码即可触发
The text was updated successfully, but these errors were encountered: