mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
feat: 完成主题切换,语言切换的本地存储
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import login from './login'
|
||||
|
||||
const global = {
|
||||
doc_addr: "Doc Address",
|
||||
form_account: "Please enter your account or email",
|
||||
form_password: "Please enter your password"
|
||||
}
|
||||
|
||||
export default {
|
||||
global: global,
|
||||
login: login
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export default {
|
||||
desc: "Log in to GoView",
|
||||
form_auto: "Sign in automatically",
|
||||
form_button: "Login",
|
||||
login_success: "Login success",
|
||||
login_message: "Please complete the letter",
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
//语言
|
||||
import { lang } from '@/settings/designSetting'
|
||||
import { createI18n } from 'vue-i18n' //引入vue-i18n组件
|
||||
import { getLocalStorage } from '@/utils/index'
|
||||
import { GO_LANG_SELECT } from '@/settings/storageConst'
|
||||
import zh from './zh/index'
|
||||
import en from './en/index'
|
||||
|
||||
const lang_storage = getLocalStorage(GO_LANG_SELECT)
|
||||
|
||||
const i18n = createI18n({
|
||||
locale: lang_storage || lang,
|
||||
globalInjection: true,
|
||||
messages: {
|
||||
zh: zh,
|
||||
en: en
|
||||
}
|
||||
})
|
||||
|
||||
export default i18n
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import login from './login'
|
||||
|
||||
const global = {
|
||||
doc_addr: "文档地址",
|
||||
form_account: "请输入账号或邮箱",
|
||||
form_password: "请输入密码",
|
||||
}
|
||||
|
||||
export default {
|
||||
global: global,
|
||||
login: login
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export default {
|
||||
desc: "登录 GoView",
|
||||
form_auto: "自动登录",
|
||||
form_button: "登录",
|
||||
login_success: "登录成功",
|
||||
login_message: "请填写完整信息",
|
||||
}
|
||||
Reference in New Issue
Block a user