功能变化: 修复部分bug

This commit is contained in:
猿小天
2024-01-01 14:47:53 +08:00
parent 577b88332f
commit 8961733025
10 changed files with 123 additions and 131 deletions

View File

@@ -117,11 +117,9 @@ router.beforeEach(async (to, from, next) => {
if (isRequestRoutes) {
// 后端控制路由:路由数据初始化,防止刷新时丢失
await initBackEndControlRoutes();
// await setRouters()
// 解决刷新时,一直跳 404 页面问题,关联问题 No match found for location with path 'xxx'
// to.query 防止页面刷新时普通路由带参数时参数丢失。动态路由xxx/:id/:name"isDynamic 无需处理
// console.log("所有路由",router.getRoutes())
// console.log(to.path)
next({ path: to.path, query: to.query });
} else {
// https://gitee.com/lyt-top/vue-next-admin/issues/I5F1HP