浏览器标题栏完善

This commit is contained in:
aozhiwei 2020-12-16 14:44:19 +08:00
parent 61a4082299
commit 33d70c8e82
3 changed files with 8 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -73,7 +73,7 @@ export default {
size: '布局大小'
},
login: {
title: '系统登录',
title: '金蚕后台',
logIn: '登录',
username: '账号',
password: '密码',
@ -168,5 +168,8 @@ export default {
tagsView: '开启 Tags-View',
fixedHeader: '固定 Header',
sidebarLogo: '侧边栏 Logo'
},
document: {
title: '金蚕后台'
}
}

View File

@ -4,6 +4,7 @@ import { Message } from 'element-ui'
import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style
import { getToken } from '@/utils/auth' // get token from cookie
import i18n from './lang' // Internationalization
NProgress.configure({ showSpinner: false }) // NProgress Configuration
@ -13,6 +14,9 @@ router.beforeEach(async(to, from, next) => {
// start progress bar
NProgress.start()
// set page title
document.title = i18n.t('document.title')
// determine whether the user has logged in
const hasToken = getToken()