修复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

View File

@@ -42,7 +42,7 @@ router.beforeEach(async(to, from, next) => {
handleKeepAlive(to)
const token = userStore.token
// 在白名单中的判断情况
document.title = getPageTitle(to.meta.title)
document.title = getPageTitle(to.meta.title, to)
if (whiteList.indexOf(to.name) > -1) {
if (token) {
if (!asyncRouterFlag && whiteList.indexOf(from.name) < 0) {