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

@@ -1,5 +1,5 @@
<template>
<ConfigProvider v-bind="lockEvent" :locale="antConfigLocale">
<ConfigProvider v-bind="lockEvent" :locale="getAntdLocale">
<AppProvider>
<RouterView />
</AppProvider>
@@ -21,9 +21,7 @@
components: { ConfigProvider, AppProvider },
setup() {
// support Multi-language
const { antConfigLocale, setLocale } = useLocale();
setLocale();
const { getAntdLocale } = useLocale();
// Initialize vuex internal system configuration
initAppConfigStore();
@@ -31,10 +29,7 @@
// Create a lock screen monitor
const lockEvent = useLockPage();
return {
antConfigLocale,
lockEvent,
};
return { getAntdLocale, lockEvent };
},
});
</script>