1. 为菜单数据新增remark字段并设置默认值 2. 全量替换硬编码文本为国际化多语言支持 3. 新增生产配置模块首页组件与路由 4. 新增菜单重载action,支持语言切换后重载菜单 5. 补充简体中文、英文、日文、繁体中文语言包
22 lines
753 B
JavaScript
22 lines
753 B
JavaScript
export default {
|
|
methods: {
|
|
onChangeLocale (command) {
|
|
this.$i18n.locale = command
|
|
let message = this.$t('page.layout.locales.changed', { name: this.$t('_name'), locale: this.$i18n.locale })
|
|
if (process.env.VUE_APP_BUILD_MODE === 'PREVIEW') {
|
|
message = [
|
|
this.$t('page.layout.locales.changed', { name: this.$t('_name'), locale: this.$i18n.locale }),
|
|
this.$t('page.layout.locales.preview_warning'),
|
|
this.$t('page.layout.locales.preview_doc')
|
|
].join('<br/>')
|
|
}
|
|
this.$notify({
|
|
title: this.$t('page.layout.locales.notification_title'),
|
|
dangerouslyUseHTMLString: true,
|
|
message
|
|
})
|
|
this.$store.dispatch('d2admin/menu/menuReload')
|
|
}
|
|
}
|
|
}
|