diff --git a/packages/uni-app-plus/dist/index.v3.js b/packages/uni-app-plus/dist/index.v3.js index 1f38fcc307345f248d6069cd25a35e9f3b543b40..9f7c273eea9a3aea497b1e494db9ec9d89d83744 100644 --- a/packages/uni-app-plus/dist/index.v3.js +++ b/packages/uni-app-plus/dist/index.v3.js @@ -1188,8 +1188,8 @@ var serviceContext = (function () { index++; } return compiled; - } - + } + const hasOwnProperty$1 = Object.prototype.hasOwnProperty; const hasOwn$1 = (val, key) => hasOwnProperty$1.call(val, key); const defaultFormatter = new BaseFormatter(); @@ -1199,7 +1199,6 @@ var serviceContext = (function () { function startsWith(str, parts) { return parts.find((part) => str.indexOf(part) === 0); } - console.log('normalizeLocale'); function normalizeLocale(locale, messages) { if (!locale) { return; @@ -1238,14 +1237,12 @@ var serviceContext = (function () { } this.formater = formater || defaultFormatter; this.messages = messages; - console.log(`--2--${locale}`); this.setLocale(locale); if (watcher) { this.watchLocale(watcher); } } setLocale(locale) { - console.log(`locale:${locale}`); const oldLocale = this.locale; this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale; this.message = this.messages[this.locale]; @@ -1277,19 +1274,17 @@ var serviceContext = (function () { } return this.formater.interpolate(message[key], values).join(''); } - } - + } + function initLocaleWatcher(appVm, i18n) { appVm.$i18n && appVm.$i18n.vm.$watch('locale', (newLocale) => { - console.log('--3--'); i18n.setLocale(newLocale); }, { immediate: true, }); } function getDefaultLocale() { - console.log('getDefaultLocale'); if (typeof navigator !== 'undefined') { return navigator.userLanguage || navigator.language; } @@ -1317,7 +1312,6 @@ var serviceContext = (function () { const appVm = getApp().$vm; if (!appVm.$t || !appVm.$i18n) { if (!locale) { - console.log('--4--'); i18n.setLocale(getDefaultLocale()); } /* eslint-disable no-func-assign */ @@ -1347,11 +1341,7 @@ var serviceContext = (function () { t(key, values) { return t(key, values); }, - getLocale() { - return i18n.getLocale(); - }, setLocale(newLocale) { - console.log(`--1--:${newLocale}`); return i18n.setLocale(newLocale); }, mixin: {