mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-09 13:53:38 +08:00
fix(tag): 删除非当前激活tag时不切换tag (#60)
* fix(tag): 删除非当前激活tag时不切换tag * fix(tag): 修复在激活菜单时选择关闭左侧标签后当前激活的菜单非选择菜单 * perf: 自定义去重函数更改为lodash-es的uniqBy
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
createWebHashHistory,
|
||||
RouteRecordNormalized
|
||||
} from "vue-router";
|
||||
import { split } from "lodash-es";
|
||||
import { split, uniqBy } from "lodash-es";
|
||||
import { i18n } from "/@/plugins/i18n";
|
||||
import { openLink } from "/@/utils/link";
|
||||
import NProgress from "/@/utils/progress";
|
||||
@@ -228,7 +228,10 @@ router.beforeEach((to, _from, next) => {
|
||||
}
|
||||
});
|
||||
});
|
||||
storageLocal.setItem("responsive-routesInStorage", newLocalRoutes);
|
||||
storageLocal.setItem(
|
||||
"responsive-routesInStorage",
|
||||
uniqBy(newLocalRoutes, "path")
|
||||
);
|
||||
});
|
||||
next();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user