perf: 同步代码

This commit is contained in:
xiaoxian521
2021-10-19 20:37:36 +08:00
parent 997e31e7be
commit 80e51e0f7a
9 changed files with 75 additions and 50 deletions

View File

@@ -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";
@@ -215,7 +215,10 @@ router.beforeEach((to, _from, next) => {
}
});
});
storageLocal.setItem("responsive-routesInStorage", newLocalRoutes);
storageLocal.setItem(
"responsive-routesInStorage",
uniqBy(newLocalRoutes, "path")
);
});
next();
}