fix: 🐛 修复图标选择器栈溢出的问题

修复图标选择器栈溢出的问题
This commit is contained in:
theo
2025-12-16 10:16:08 +08:00
parent e6b8f60ea7
commit 0aff320a18
2 changed files with 2 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ export const usePermissionStore = defineStore("permission", () => {
/** 设置混合布局左侧菜单 */
const setMixLayoutSideMenus = (parentPath: string) => {
const parentMenu = routes.value.find((item) => item.path === parentPath);
const parentMenu = routes.value.find((item: RouteRecordRaw) => item.path === parentPath);
mixLayoutSideMenus.value = parentMenu?.children || [];
};
@@ -42,7 +42,7 @@ export const usePermissionStore = defineStore("permission", () => {
const resetRouter = () => {
// 移除动态添加的路由
const constantRouteNames = new Set(constantRoutes.map((route) => route.name).filter(Boolean));
routes.value.forEach((route) => {
routes.value.forEach((route: RouteRecordRaw) => {
if (route.name && !constantRouteNames.has(route.name)) {
router.removeRoute(route.name);
}