umicro / uView2.0

uView UI,是全面兼容nvue的uni-app生态框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水
MIT License
1.51k stars 454 forks source link

Toast 消息提示 报错 #251

Open drc5521 opened 2 years ago

drc5521 commented 2 years ago

版本

2.0.19

转载链接

http://localhost:8080/#/

重现步骤

在HbuilderX中使用this.$refs.uToast.show({ type: 'success', message: '123' });,h5平台可以正常使用,编译到微信小程序会出现如下的错误vWAServiceMainContext.js:2 TypeError: Cannot read property 'show' of undefined at VueComponent.shti (index.js? [sm]:216) at vendor.js?t=wechat&s=1641104653854&v=7c3dc8e739103ffc327151c34dccd1cc:1368 at Array.forEach (<anonymous>) at vendor.js?t=wechat&s=1641104653854&v=7c3dc8e739103ffc327151c34dccd1cc:1325 at Array.forEach (<anonymous>) at vt.handleEvent [as __e] (vendor.js?t=wechat&s=1641104653854&v=7c3dc8e739103ffc327151c34dccd1cc:1315) at vt.<anonymous> (WASubContext.js?t=wechat&s=1641104653854&v=2.17.0:2) at o.safeCallback (WASubContext.js?t=wechat&s=1641104653854&v=2.17.0:2) at o.call (WASubContext.js?t=wechat&s=1641104653854&v=2.17.0:2) at n (WASubContext.js?t=wechat&s=1641104653854&v=2.17.0:2)(env: Windows,mp,1.05.2111300; lib: 2.17.0)

期望的结果是什么?

可以正常的使用

实际的结果是什么?

WAServiceMainContext.js:2 TypeError: Cannot read property 'show' of undefined at VueComponent.shti (index.js? [sm]:216) at vendor.js?t=wechat&s=1641104653854&v=7c3dc8e739103ffc327151c34dccd1cc:1368 at Array.forEach () at vendor.js?t=wechat&s=1641104653854&v=7c3dc8e739103ffc327151c34dccd1cc:1325 at Array.forEach () at vt.handleEvent [as __e] (vendor.js?t=wechat&s=1641104653854&v=7c3dc8e739103ffc327151c34dccd1cc:1315) at vt. (WASubContext.js?t=wechat&s=1641104653854&v=2.17.0:2) at o.safeCallback (WASubContext.js?t=wechat&s=1641104653854&v=2.17.0:2) at o.call (WASubContext.js?t=wechat&s=1641104653854&v=2.17.0:2) at n (WASubContext.js?t=wechat&s=1641104653854&v=2.17.0:2)(env: Windows,mp,1.05.2111300; lib: 2.17.0)

bao-io commented 2 years ago

大哥,你解决了吗

drc5521 commented 2 years ago

大哥,你解决了吗

没有,换了别的提示

bao-io commented 2 years ago

你是mac系统还是window系统,前段时间我用window系统写的时候还是好好的,代码到mac系统就报错了

bao-io commented 2 years ago

你是mac系统还是window系统,前段时间我用window系统写的时候还是好好的,代码到mac系统就报错了

drc5521 commented 2 years ago

你是mac系统还是window系统,前段时间我用window系统写的时候还是好好的,代码到mac系统就报错了

我用的是win10系统。

bao-io commented 2 years ago

好吧

orangepro11 commented 2 years ago

把微信基础版本库升级到2.19.2试试?

orangepro11 commented 2 years ago

参考https://www.kancloud.cn/uview/uview-ui_v2/2579076