微信小程序~tabBar和navigator一起使用无效

1.当注册了tabBar的时候,使用navigator时会发现不能跳转,这个时候需要在navigator上加上open-type=’switchTab’ 属性

<navigator open-type="switchTab" url="/pages/index/index">跳到index</navigator>

2.当未注册tabBar的时候,navigator可正常使用,默认即可。

3.wx.redirectTo(OBJECT) 需要跳转的应用内非 tabBar 的页面的路径,路径后可以带参数

 

 

 

 

 

.

posted @ 2019-07-03 09:59  剑仙6  阅读(607)  评论(0编辑  收藏  举报
欢迎访问个人网站www.qingchun.在线