feat: 动态更新页面标题

This commit is contained in:
2024-08-29 14:46:06 +08:00
parent 94e94956bb
commit 702d65ef47
2 changed files with 17 additions and 0 deletions

View File

@@ -3,6 +3,10 @@ import {
createWebHashHistory,
} from 'vue-router';
import {
updateAppTitle,
} from '@/assets/js/utils';
import {
ENABLE_SEARCH_MODULE,
ENABLE_NAV_MODULE,
@@ -67,3 +71,7 @@ export const router = createRouter({
},
],
});
router.afterEach((to) => {
updateAppTitle(to.meta.title);
});