parent
4f8e8fcb65
commit
1092347375
11 changed files with 140 additions and 36 deletions
@ -0,0 +1,21 @@ |
||||
import { createI18n } from 'vue-i18n' |
||||
import localZhCn from './language/zh-cn.js' |
||||
import localEn from './language/en.js' |
||||
import zhCn from "element-plus/es/locale/lang/zh-cn"; |
||||
import en from "element-plus/es/locale/lang/en" |
||||
|
||||
const i18n = createI18n({ |
||||
legacy: false, |
||||
locale: 'zh-cn', |
||||
fallbackLocale: 'zhn-cn', |
||||
messages: { |
||||
'zh-cn': localZhCn, |
||||
'en': localEn, |
||||
} |
||||
}) |
||||
export default i18n |
||||
|
||||
export const elementLocales = { |
||||
'zh-cn': zhCn, |
||||
en |
||||
} |
@ -0,0 +1,6 @@ |
||||
export default { |
||||
sitename: "PM System", |
||||
personnalCenter: "Personal Center", |
||||
login: "Login", |
||||
logout: "Exit", |
||||
} |
@ -0,0 +1,6 @@ |
||||
export default { |
||||
sitename: "权限管理系统", |
||||
personnalCenter: "个人中心", |
||||
login: "登录", |
||||
logout: "退出", |
||||
} |
@ -1,11 +0,0 @@ |
||||
<script setup> |
||||
|
||||
</script> |
||||
|
||||
<template> |
||||
<h1>这是个人中心消息页面</h1> |
||||
</template> |
||||
|
||||
<style scoped> |
||||
|
||||
</style> |
@ -0,0 +1,15 @@ |
||||
<template> |
||||
<h1>这是个人中心消息页面-{{t('sitename')}}</h1> |
||||
<el-pagination :page-size="100" layout="total, prev, pager, next" :total="1000"></el-pagination> |
||||
</template> |
||||
|
||||
<script setup> |
||||
import {useI18n} from "vue-i18n"; |
||||
|
||||
const {locale ,t} = useI18n(); |
||||
|
||||
</script> |
||||
|
||||
<style scoped> |
||||
|
||||
</style> |
Loading…
Reference in new issue