diff --git a/packages/fes-plugin-locale/src/index.js b/packages/fes-plugin-locale/src/index.js index 2aea0411..0a80c79e 100644 --- a/packages/fes-plugin-locale/src/index.js +++ b/packages/fes-plugin-locale/src/index.js @@ -64,9 +64,6 @@ export default (api) => { const { baseNavigator, ...otherConfig } = userConfig; - const title = api.config.title || 'fes.js'; - const isLocaleTitle = title.startsWith('$'); - api.writeTmpFile({ path: join(namespace, 'locales.js'), content: Mustache.render(readFileSync(join(__dirname, 'runtime/locales.js.tpl'), 'utf-8'), { @@ -84,8 +81,6 @@ export default (api) => { REPLACE_DEFAULT_OPTIONS: JSON.stringify(otherConfig, null, 2), BASE_NAVIGATOR: baseNavigator, VUE_I18N_PATH: 'vue-i18n', - TITLE: title.slice(1), - IS_LOCALE_TITle: isLocaleTitle, }), }); diff --git a/packages/fes-template/src/app.jsx b/packages/fes-template/src/app.jsx index 5407043a..05e67a6d 100644 --- a/packages/fes-template/src/app.jsx +++ b/packages/fes-template/src/app.jsx @@ -3,9 +3,9 @@ import { ref, watch } from 'vue'; import PageLoading from '@/components/pageLoading.vue'; import UserCenter from '@/components/userCenter.vue'; -export function onLocaleChange({ locale }) { +export function onLocaleChange({ locale, t }) { // 切换语言 - console.log(locale); + console.log(locale, t); } export const beforeRender = {