refactor: refactored multi-language modules to support lazy loading and remote loading

This commit is contained in:
Vben
2021-02-27 23:08:12 +08:00
parent f57eb944ed
commit f6cef1088d
47 changed files with 353 additions and 284 deletions

View File

@@ -53,9 +53,10 @@
import MobileForm from './MobileForm.vue';
import QrCodeForm from './QrCodeForm.vue';
import { useGlobSetting, useProjectSetting } from '/@/hooks/setting';
import { useGlobSetting } from '/@/hooks/setting';
import { useI18n } from '/@/hooks/web/useI18n';
import { useDesign } from '/@/hooks/web/useDesign';
import { localeStore } from '/@/store/modules/locale';
export default defineComponent({
name: 'Login',
@@ -71,14 +72,13 @@
setup() {
const globSetting = useGlobSetting();
const { prefixCls } = useDesign('login');
const { locale } = useProjectSetting();
const { t } = useI18n();
return {
t,
prefixCls,
title: computed(() => globSetting?.title ?? ''),
showLocale: computed(() => locale.show),
showLocale: localeStore.getShowPicker,
};
},
});