This commit is contained in:
sjl
2025-01-14 11:43:35 +08:00
parent 171533cef0
commit 26cda335c5
9 changed files with 46 additions and 35 deletions

View File

@@ -46,7 +46,7 @@ router.beforeEach(async (to, from, next) => {
const authStore = useAuthStore()
// 1.NProgress 开始
NProgress.start()
console.log('11111111111111');
// 2.动态设置标题
const title = import.meta.env.VITE_GLOB_APP_TITLE
document.title = to.meta.title ? `${to.meta.title} - ${title}` : title

View File

@@ -36,6 +36,7 @@ export const initDynamicRouter = async () => {
// 3.添加动态路由
authStore.flatMenuListGet.forEach(item => {
item.children && delete item.children;
if (item.component && typeof item.component == "string") {
item.component = modules["/src/views" + item.component + ".vue"];
}