百度小程序web化,页面报错 TypeError: Cannot read property 'componentDidShow' of undefined
-
taro写好项目后,编译成百度小程序,app预览符合预期,web化预览报错 :TypeError: Cannot read property 'componentDidShow' of undefined 。
页面可以打开,taro-ui中的 AtSearchBar显示不正常。请问有人碰到过么?
-
没人回复吗?
-
taro 相关版本贴一下咯
-
taro:1.3.8
taro-ui:: ^2.2.1
百度开发工具2.4.3
很容易复现,随便写个控件,绑定个事件,比如 onFocus='this.onFocus.bind(this)',构建swan小程序后,web化预览。
-
@weian0310 taro 1.3.15 ,也会出现这个问题,现在是否有解决方案呢?
-
web化是指转换成 H5 体验吗
-
@Cjj 嗯嗯,是的
-
额,这个问题有解决方案么?
-
看下报错日志?
-
master_83650f1224da5660a0a3.js:1 TypeError: Cannot read property 'componentDidShow' of undefined
at te (app.js:1)
at Object.i.pageLifetimes.show (app.js:1)
at l (master_83650f1224da5660a0a3.js:1)
at Object.<anonymous> (master_83650f1224da5660a0a3.js:1)
at Object._onShow (master_83650f1224da5660a0a3.js:1)
at e.value (master_83650f1224da5660a0a3.js:1)
at e.<anonymous> (master_83650f1224da5660a0a3.js:1)
at e.value (master_83650f1224da5660a0a3.js:1)
at master_83650f1224da5660a0a3.js:1
at Array.forEach (<anonymous>)
-
@xiaoli048 进入每个页面都会报这个错
-
得看看转换后的源码了 单看日志还没法定位