修复退出登录路由清空问题

This commit is contained in:
YeMingfei666 2025-02-08 16:40:01 +08:00
parent 3372db8e55
commit 7c907fa768
1 changed files with 2 additions and 1 deletions

View File

@ -55,7 +55,8 @@ export const usePermissionStore = defineStore("permission", () => {
*/
const resetRouter = () => {
// 清空本地存储的路由和菜单数据
routes.value = [];
// routes.value = [];
routes.value = constantRoutes;
mixedLayoutLeftRoutes.value = [];
// 从 Vue Router 中移除所有动态注册的路由
router.getRoutes().forEach((route) => {