change page title

This commit is contained in:
非空 2019-04-15 10:29:29 +08:00 committed by GitHub
parent 42b42a5e1c
commit 48dc9c66d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -12,7 +12,9 @@ const whiteList = ['/login', '/auth-redirect'] // no redirect whitelist
router.beforeEach(async(to, from, next) => {
// start progress bar
NProgress.start()
if (to.meta.title) {
document.title = to.meta.title
}
// determine whether the user has logged in
const hasToken = getToken()