Moonofweisheng/uni-mini-router

开发环境所有环境 router.push报错

byzhyt opened this issue · 2 comments

uni-mini-router 版本号

0.1.6

平台

h5

重现链接

https://github.com/byzhyt/pine-applte.git

重现步骤

通过这个uni-read-pages-vite ,组合api useRouter;

期望的结果是什么?

能正常跳转页面

实际的结果是什么?

报错vue.runtime.esm.js:1443 SyntaxError: "undefined" is not valid JSON
at JSON.parse ()
at P (uni-mini-router.js?v=9e5d4921:134:15)
at d. [as switchTab] (uni-mini-router.js?v=9e5d4921:146:18)
at m (uni-mini-router.js?v=9e5d4921:83:9)
at Object.pushTab (uni-mini-router.js?v=9e5d4921:230:12)
at onTapChange (index.vue:1:1)
at callWithErrorHandling (vue.runtime.esm.js:1376:22)
at callWithAsyncErrorHandling (vue.runtime.esm.js:1385:21)
at HTMLElement.invoker (vue.runtime.esm.js:9751:9)

环境信息

"pinia": "2.0.36",
"pinia-plugin-persist-uni": "^1.3.1",
"sass": "^1.74.1",
"uni-mini-router": "^0.1.6",
"uni-read-pages-vite": "^0.0.6",
"unocss": "^0.58.9",
"unocss-preset-weapp": "^0.58.8",
"unplugin-auto-import": "^0.12.2",
"unplugin-vue-components": "^0.25.2",
"vue": "3.4.21",
"vue-i18n": "9.2.2"

其他补充信息

qq
微信截图_20240424191901

是都不行

参考起手项目,先自己排查下https://github.com/Moonofweisheng/wot-starter