国际化支持
This commit is contained in:
@@ -4,6 +4,7 @@ import { getRouters } from '@/api/menu'
|
||||
import Layout from '@/layout/index'
|
||||
import ParentView from '@/components/ParentView'
|
||||
import InnerLink from '@/layout/components/InnerLink'
|
||||
import i18n from "../../lang";
|
||||
|
||||
const permission = {
|
||||
state: {
|
||||
@@ -70,6 +71,10 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
|
||||
route.component = loadView(route.component)
|
||||
}
|
||||
}
|
||||
// 在 route.component 处理后添加
|
||||
if (route.meta && route.meta.title) {
|
||||
route.meta.title = i18n.t(route.meta.title)
|
||||
}
|
||||
if (route.children != null && route.children && route.children.length) {
|
||||
route.children = filterAsyncRouter(route.children, route, type)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user