1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2025-12-28 12:10:20 +08:00

refactor: 全局规范化调整文件夹和文件命名(代码无改动)

This commit is contained in:
张传龙
2022-04-01 17:41:07 +08:00
parent 8648f16ed8
commit 5993e8d7d0
10 changed files with 6 additions and 6 deletions

View File

@@ -0,0 +1,12 @@
const baseTitle = import.meta.env.VITE_APP_TITLE
export function createPageTitleGuard(router) {
router.afterEach((to) => {
const pageTitle = to.meta?.title
if (pageTitle) {
document.title = `${pageTitle} | ${baseTitle}`
} else {
document.title = baseTitle
}
})
}