Taro-navigation-bar icon indicating copy to clipboard operation
Taro-navigation-bar copied to clipboard

自定义导航条只能使用Navigator来进行页面跳转吗?我使用Taro.navigateTo会页面报错

Open yjj891896039 opened this issue 5 years ago • 3 comments

错误: index.js:272 Uncaught (in promise) TypeError: Cannot convert undefined or null to object at t.assign () at WithLogin.Connect (index.js:272) at new WithLogin (mixin.js:30) at Object.taro$$1.(:53757/appservice/anonymous function) [as navigateTo] (http://127.0.0.1:53757/appservice/npm/@tarojs/taro-weapp/dist/index.js:3404:29) at index.js:98

yjj891896039 avatar Nov 19 '19 02:11 yjj891896039

重启开具 或者重新打包代码试试

lingxiaoyi avatar Nov 19 '19 02:11 lingxiaoyi

重启了也会报错,我要navigateTo的目标页面也是有自定义导航条的,如果目标页面没有自定义导航条就不会报错

yjj891896039 avatar Nov 19 '19 02:11 yjj891896039

已解决,我的页面代码有两个注解@connect和@withComponent,我把@connect放到@withComponent上面就不会报错了

yjj891896039 avatar Nov 19 '19 02:11 yjj891896039