修复title不跟随参数变更的bug

This commit is contained in:
piexlmax
2022-06-18 23:24:57 +08:00
parent 759fb6622d
commit b6e2cf645b
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -1,7 +1,9 @@
import { fmtTitle } from '@/utils/fmtRouterTitle'
import config from '@/core/config'
export default function getPageTitle(pageTitle) {
export default function getPageTitle(pageTitle, route) {
if (pageTitle) {
return `${pageTitle} - ${config.appName}`
const title = fmtTitle(pageTitle, route)
return `${title} - ${config.appName}`
}
return `${config.appName}`
}