feat: acs国际化
This commit is contained in:
@@ -5,6 +5,7 @@ import 'nprogress/nprogress.css' // progress bar style
|
||||
import { getToken } from '@/utils/auth' // getToken from cookie
|
||||
import { buildMenus } from '@/api/system/menu'
|
||||
import { filterAsyncRouter } from '@/store/modules/permission'
|
||||
import i18n from '@/i18n'
|
||||
|
||||
NProgress.configure({ showSpinner: false })// NProgress Configuration
|
||||
|
||||
@@ -13,7 +14,7 @@ const whiteList = ['/login', '/expand']// no redirect whitelist
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (to.meta.title) {
|
||||
// document.title = to.meta.title + ' - ' + Config.title
|
||||
document.title = to.meta.title
|
||||
document.title = i18n.t(to.meta.title)
|
||||
}
|
||||
NProgress.start()
|
||||
if (getToken()) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
import Router from 'vue-router'
|
||||
import Layout from '../layout/index'
|
||||
import i18n from '@/i18n'
|
||||
|
||||
Vue.use(Router)
|
||||
|
||||
@@ -46,7 +47,7 @@ export const constantRouterMap = [
|
||||
path: 'dashboard',
|
||||
component: (resolve) => require(['@/views/monitor/server/index'], resolve),
|
||||
name: 'Dashboard',
|
||||
meta: { title: '首页', icon: 'index', affix: true, noCache: true }
|
||||
meta: { title: i18n.t('common.home'), icon: 'index', affix: true, noCache: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -65,8 +66,8 @@ export const constantRouterMap = [
|
||||
{
|
||||
path: 'center',
|
||||
component: (resolve) => require(['@/views/system/user/center'], resolve),
|
||||
name: '个人中心',
|
||||
meta: { title: '个人中心' }
|
||||
name: i18n.t('common.Personal_center'),
|
||||
meta: { title: i18n.t('common.Personal_center') }
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user