diff --git a/packages/fes-plugin-layout/src/index.js b/packages/fes-plugin-layout/src/index.js
index 1e7eda2b..bc308c79 100644
--- a/packages/fes-plugin-layout/src/index.js
+++ b/packages/fes-plugin-layout/src/index.js
@@ -29,7 +29,8 @@ export default (api) => {
content: Mustache.render(
readFileSync(join(__dirname, 'template/runtime.tpl'), 'utf-8'),
{
- REPLACE_USER_CONFIG: JSON.stringify(userConfig)
+ REPLACE_USER_CONFIG: JSON.stringify(userConfig),
+ HAS_LOCALE: api.pkg.dependencies?.['@webank/fes-plugin-locale']
}
)
});
diff --git a/packages/fes-plugin-layout/src/template/runtime.tpl b/packages/fes-plugin-layout/src/template/runtime.tpl
index 34817e1c..eae7324c 100644
--- a/packages/fes-plugin-layout/src/template/runtime.tpl
+++ b/packages/fes-plugin-layout/src/template/runtime.tpl
@@ -1,9 +1,13 @@
-import { reactive, toRefs } from "vue";
+import { reactive, ref } from "vue";
import { getRoutes, plugin, ApplyPluginsType } from "@@/core/coreExports";
import BaseLayout from "./views/BaseLayout.vue";
import { fillMenuData } from "./helpers";
const userConfig = reactive({{{REPLACE_USER_CONFIG}}});
+const langConfig = {
+ localInited: ref(false),
+ component: null
+};
export function rootContainer(childComponent, args) {
const runtimeConfig = plugin.applyPlugins({
key: "layout",
@@ -19,7 +23,13 @@ export function rootContainer(childComponent, args) {
if(runtimeConfig.userCenter){
return