新增加多语言
This commit is contained in:
parent
24385f2b03
commit
9e57f0f18b
@ -1,14 +1,36 @@
|
||||
// 定义内容
|
||||
export default {
|
||||
menu: {
|
||||
home: 'home',
|
||||
system: 'system',
|
||||
systemMenu: 'systemMenu',
|
||||
systemRole: 'systemRole',
|
||||
systemUser: 'systemUser',
|
||||
systemDept: 'systemDept',
|
||||
systemDic: 'systemDic',
|
||||
limits: 'limits',
|
||||
home: 'Home',
|
||||
dashboard: 'Dashboard',
|
||||
system: 'System',
|
||||
monitoring: 'Monitoring',
|
||||
systemTools: 'Tools',
|
||||
externalOpen: 'ExternalOpen',
|
||||
icon: 'Icon',
|
||||
systemMenu: 'Menu',
|
||||
systemRole: 'Role',
|
||||
systemUser: 'User',
|
||||
systemDept: 'Dept',
|
||||
systemDic: 'Dict',
|
||||
systemPost: 'Post',
|
||||
systemParam: 'Param',
|
||||
systemLog: 'Log',
|
||||
operLog: 'Oper log',
|
||||
loginLog: 'Login log',
|
||||
systemNotice: 'Notice',
|
||||
systemLang: 'Language set',
|
||||
timedTask: 'TimedTask',
|
||||
serviceMonitor: 'serviceMonitor',
|
||||
codeGeneration: 'codeGeneration',
|
||||
systemInterface: 'systemInterface',
|
||||
sendEmail: 'Email',
|
||||
systemArticle: 'Article',
|
||||
articleList: 'Article list',
|
||||
formBuild: 'Form building',
|
||||
officialWebsite: 'Official website',
|
||||
fileStorage: 'File Storage',
|
||||
personalCenter: 'Personal'
|
||||
},
|
||||
tagsView: {
|
||||
refresh: 'refresh',
|
||||
@ -60,5 +82,17 @@ export default {
|
||||
edit: 'Edit',
|
||||
search: 'Search',
|
||||
reset: 'Reset',
|
||||
preview: 'preview',
|
||||
import: 'import',
|
||||
export: 'export',
|
||||
synchronize: 'synchronize',
|
||||
generateCode: 'generateCode',
|
||||
start: 'start',
|
||||
stop: 'stop',
|
||||
runOnce: 'runOnce',
|
||||
log: 'log',
|
||||
expand: 'expand',
|
||||
collapse: 'collapse',
|
||||
details: 'details'
|
||||
}
|
||||
};
|
||||
@ -2,13 +2,35 @@
|
||||
export default {
|
||||
menu: {
|
||||
home: '首页',
|
||||
system: '系统设置',
|
||||
dashboard: '控制台',
|
||||
system: '系统管理',
|
||||
monitoring: '系统监控',
|
||||
systemTools: '系统工具',
|
||||
externalOpen: '外部打开',
|
||||
icon: '图标icon',
|
||||
systemMenu: '菜单管理',
|
||||
systemRole: '角色管理',
|
||||
systemUser: '用户管理',
|
||||
systemDept: '部门管理',
|
||||
systemDic: '字典管理',
|
||||
limits: '权限管理',
|
||||
systemPost: '岗位管理',
|
||||
systemParam: '参数设置',
|
||||
systemLog: '日志管理',
|
||||
operLog: '操作日志',
|
||||
loginLog: '登录日志',
|
||||
systemNotice: '通知公告',
|
||||
systemLang: '多语言设置',
|
||||
timedTask: '定时任务',
|
||||
serviceMonitor: '服务监控',
|
||||
codeGeneration: '代码生成',
|
||||
systemInterface: '系统接口',
|
||||
sendEmail: '发送邮件',
|
||||
systemArticle: '文章管理',
|
||||
articleList: '文章列表',
|
||||
formBuild: '表单构建',
|
||||
officialWebsite: '官网地址',
|
||||
fileStorage: '文件存儲',
|
||||
personalCenter: '个人中心'
|
||||
},
|
||||
tagsView: {
|
||||
refresh: '刷新页面',
|
||||
@ -60,5 +82,17 @@ export default {
|
||||
edit: '编辑',
|
||||
search: '搜索',
|
||||
reset: '重置',
|
||||
preview: '预览',
|
||||
import: '导入',
|
||||
export: '导出',
|
||||
synchronize: '同步',
|
||||
generateCode: '生成代码',
|
||||
start: '启动',
|
||||
stop: '停止',
|
||||
runOnce: '运行一次',
|
||||
log: '日志',
|
||||
expand: '展开',
|
||||
collapse: '折叠',
|
||||
details: '详细'
|
||||
}
|
||||
};
|
||||
@ -2,13 +2,35 @@
|
||||
export default {
|
||||
menu: {
|
||||
home: '首頁',
|
||||
system: '系統設置',
|
||||
systemMenu: '選單管理',
|
||||
dashboard: '控制臺',
|
||||
system: '系統管理',
|
||||
monitoring: '系統監控',
|
||||
systemTools: '系統工具',
|
||||
externalOpen: '外部打開',
|
||||
icon: '圖標icon',
|
||||
systemMenu: '菜單管理',
|
||||
systemRole: '角色管理',
|
||||
systemUser: '用戶管理',
|
||||
systemDept: '部門管理',
|
||||
systemDic: '字典管理',
|
||||
limits: '許可權管理',
|
||||
systemPost: '崗位管理',
|
||||
systemParam: '參數设置',
|
||||
systemLog: '日誌管理',
|
||||
operLog: '操作日誌',
|
||||
loginLog: '登錄日誌',
|
||||
systemNotice: '系統公告',
|
||||
systemLang: '多語言设置',
|
||||
timedTask: '定时任務',
|
||||
serviceMonitor: '服務監控',
|
||||
codeGeneration: '代碼生成',
|
||||
systemInterface: '系統接口',
|
||||
sendEmail: '發送郵件',
|
||||
systemArticle: '文章管理',
|
||||
articleList: '文章列表',
|
||||
formBuild: '表單構建',
|
||||
officialWebsite: '官網地址',
|
||||
fileStorage: '文件存儲',
|
||||
personalCenter: '個人中心'
|
||||
},
|
||||
tagsView: {
|
||||
refresh: '重繪',
|
||||
@ -60,5 +82,17 @@ export default {
|
||||
edit: '編輯',
|
||||
search: '搜索',
|
||||
reset: '重置',
|
||||
preview: '預覽',
|
||||
import: '導入',
|
||||
export: '導出',
|
||||
synchronize: '同步',
|
||||
generateCode: '生成代碼',
|
||||
start: '啟動',
|
||||
stop: '停止',
|
||||
runOnce: '運行一次',
|
||||
log: '日誌',
|
||||
expand: '展開',
|
||||
collapse: '折疊',
|
||||
details: '詳細'
|
||||
}
|
||||
};
|
||||
@ -4,7 +4,10 @@
|
||||
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
|
||||
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{ 'submenu-title-noDropdown': !isNest }">
|
||||
<svg-icon :name="onlyOneChild.meta.icon || (item.meta && item.meta.icon)" />
|
||||
<template v-if="onlyOneChild.meta.title" #title>
|
||||
<template v-if="onlyOneChild.meta.titleKey" #title>
|
||||
<span>{{ $t(onlyOneChild.meta.titleKey) }}</span>
|
||||
</template>
|
||||
<template v-else-if="onlyOneChild.meta.title" #title>
|
||||
<span>{{ onlyOneChild.meta.title }}</span>
|
||||
</template>
|
||||
</el-menu-item>
|
||||
@ -14,7 +17,8 @@
|
||||
<el-sub-menu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
||||
<template v-slot:title>
|
||||
<svg-icon :name="item.meta && item.meta.icon" />
|
||||
<span v-if="item.meta && item.meta.title">{{ item.meta.title }}</span>
|
||||
<span v-if="item.meta && item.meta.titleKey">{{ $t(item.meta.titleKey) }}</span>
|
||||
<span v-else-if="item.meta && item.meta.title">{{ item.meta.title }}</span>
|
||||
</template>
|
||||
|
||||
<sidebar-item v-for="child in item.children" :key="child.path" :is-nest="true" :item="child" :base-path="resolvePath(child.path)" class="nest-menu" />
|
||||
|
||||
@ -12,19 +12,20 @@
|
||||
@click.middle="!isAffix(tag) ? closeSelectedTag(tag) : ''"
|
||||
@contextmenu.prevent="openMenu(tag, $event)"
|
||||
>
|
||||
{{ tag.title }}
|
||||
<span v-if="tag.meta && tag.meta.titleKey">{{ $t(tag.meta.titleKey) }}</span>
|
||||
<span v-else>{{ tag.title }}</span>
|
||||
<span v-if="!isAffix(tag)" @click.prevent.stop="closeSelectedTag(tag)">
|
||||
<close class="el-icon-close" style="width: 1em; height: 1em; vertical-align: middle" />
|
||||
</span>
|
||||
</router-link>
|
||||
</scroll-pane>
|
||||
<ul v-show="visible" :style="{ left: left + 'px', top: top + 'px' }" class="contextmenu">
|
||||
<li @click="refreshSelectedTag(selectedTag)"><refresh-right style="width: 1em; height: 1em" /> {{$t('tagsView.refresh')}}</li>
|
||||
<li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)"><close style="width: 1em; height: 1em" /> {{$t('tagsView.close')}}</li>
|
||||
<li @click="closeOthersTags"><circle-close style="width: 1em; height: 1em" /> {{$t('tagsView.closeOther')}}</li>
|
||||
<li v-if="!isFirstView()" @click="closeLeftTags"><back style="width: 1em; height: 1em" /> {{$t('tagsView.closeLeft')}}</li>
|
||||
<li v-if="!isLastView()" @click="closeRightTags"><right style="width: 1em; height: 1em" /> {{$t('tagsView.closeRight')}}</li>
|
||||
<li @click="closeAllTags(selectedTag)"><circle-close style="width: 1em; height: 1em" /> {{$t('tagsView.closeAll')}}</li>
|
||||
<li @click="refreshSelectedTag(selectedTag)"><refresh-right style="width: 1em; height: 1em" /> {{ $t('tagsView.refresh') }}</li>
|
||||
<li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)"><close style="width: 1em; height: 1em" /> {{ $t('tagsView.close') }}</li>
|
||||
<li @click="closeOthersTags"><circle-close style="width: 1em; height: 1em" /> {{ $t('tagsView.closeOther') }}</li>
|
||||
<li v-if="!isFirstView()" @click="closeLeftTags"><back style="width: 1em; height: 1em" /> {{ $t('tagsView.closeLeft') }}</li>
|
||||
<li v-if="!isLastView()" @click="closeRightTags"><right style="width: 1em; height: 1em" /> {{ $t('tagsView.closeRight') }}</li>
|
||||
<li @click="closeAllTags(selectedTag)"><circle-close style="width: 1em; height: 1em" /> {{ $t('tagsView.closeAll') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -62,7 +62,7 @@ export const constantRoutes = [
|
||||
path: '/index',
|
||||
component: () => import('@/views/index'),
|
||||
name: 'Index',
|
||||
meta: { title: '首页', icon: 'dashboard', affix: true }
|
||||
meta: { title: '首页', icon: 'dashboard', affix: true, titleKey: 'menu.home' }
|
||||
}]
|
||||
},
|
||||
{
|
||||
@ -75,7 +75,7 @@ export const constantRoutes = [
|
||||
path: 'profile',
|
||||
component: () => import('@/views/system/user/profile/index'),
|
||||
name: 'Profile',
|
||||
meta: { title: '个人中心', icon: 'user' }
|
||||
meta: { title: '个人中心', icon: 'user', titleKey: 'menu.personalCenter' }
|
||||
}]
|
||||
},
|
||||
// 不用可删掉
|
||||
@ -89,7 +89,7 @@ export const constantRoutes = [
|
||||
path: 'icon',
|
||||
component: () => import('@/views/components/icons/index'),
|
||||
name: 'icon',
|
||||
meta: { title: '图标icon', icon: 'icon1', noCache: 'fasle' }
|
||||
meta: { title: '图标icon', icon: 'icon1', noCache: 'fasle', titleKey: 'menu.icon' }
|
||||
}]
|
||||
},
|
||||
];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user