fix: 修复关闭左侧、右侧、其他、全部标签页操作时缓存页面并没有销毁问题

This commit is contained in:
xiaoxian521
2023-04-30 22:20:18 +08:00
parent d305e6fb1f
commit 89a20c6e46
6 changed files with 4700 additions and 1973 deletions

View File

@@ -98,11 +98,10 @@ const whiteList = ["/login"];
router.beforeEach((to: toRouteType, _from, next) => {
if (to.meta?.keepAlive) {
const newMatched = to.matched;
handleAliveRoute(newMatched, "add");
handleAliveRoute(to, "add");
// 页面整体刷新和点击标签页刷新
if (_from.name === undefined || _from.name === "Redirect") {
handleAliveRoute(newMatched);
handleAliveRoute(to);
}
}
const userInfo = storageSession().getItem<DataInfo<number>>(sessionKey);