uniapp cli创建项目引入uni-simple-route
作者:
袁猿源 | 来源:发表于
2021-09-15 11:19 被阅读0次
最近公司新项目开始,因配置环境原因需要使用 uniapp cli的方式创建项目,但在引入uni-simple-router路由后无法拦截uni自带的tabbar跳转,(注:uni-simple-router需安装1.5.5版本不然会报错

微信图片_20210915111318.png
)
下面请看代码:
在router文件下index.js文件里声明白名单

20210915111526.png
在初始化路由表里加上路由拦截并重定向需要跳转的路由可加上404页面。

20210915111627.png
本文标题:uniapp cli创建项目引入uni-simple-route
本文链接:https://www.haomeiwen.com/subject/icukgltx.html
网友评论