uniapp 中使用 navigator 跳转页面失败的问题

uni.navigateTo 用于页面跳转

如:

<navigator url="/pages/index/index" hover-class="navigator-hover">
    <button type="default">跳转</button>
</navigator>

但是跳转页面失败,没有任何反应

问题原因:

  url指定的页面,在pages.json中配置的是TabBar里的页面

解决办法:

<navigator url="/pages/index/index" open-type="switchTab" hover-class="navigator-hover">
    <button type="default">跳转到首页</button>
</navigator>

 

posted @   慕尘  阅读(1598)  评论(0编辑  收藏  举报
(评论功能已被禁用)
相关博文:
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!
历史上的今天:
2019-06-19 jmap使用
2019-06-19 Spring boot后台搭建一使用MyBatis集成Mapper和PageHelper
点击右上角即可分享
微信分享提示