From 307d05f7f3da1f08b8817b258ccbc0e90095383b Mon Sep 17 00:00:00 2001 From: qiang Date: Fri, 27 May 2022 21:15:17 +0800 Subject: [PATCH] chore: build --- packages/uni-app-plus/dist/uni.runtime.esm.js | 6 +++--- packages/uni-h5/dist/uni-h5.cjs.js | 18 +++++++++++++----- packages/uni-h5/dist/uni-h5.es.js | 2 +- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/packages/uni-app-plus/dist/uni.runtime.esm.js b/packages/uni-app-plus/dist/uni.runtime.esm.js index 4c04846c7..503210586 100644 --- a/packages/uni-app-plus/dist/uni.runtime.esm.js +++ b/packages/uni-app-plus/dist/uni.runtime.esm.js @@ -13392,7 +13392,7 @@ const getDeviceInfo = defineSyncApi('getDeviceInfo', () => { }); const getAppBaseInfo = defineSyncApi('getAppBaseInfo', () => { weexGetSystemInfoSync(); - const { hostPackageName, hostName, hostVersion, hostLanguage, hostTheme, appId, appName, appVersion, appVersionCode, } = systemInfo; + const { hostPackageName, hostName, hostVersion, hostLanguage, osLanguage, hostTheme, appId, appName, appVersion, appVersionCode, } = systemInfo; return { SDKVersion: '', hostSDKVersion: '', @@ -13401,9 +13401,9 @@ const getAppBaseInfo = defineSyncApi('getAppBaseInfo', () => { appName, appVersion, appVersionCode, - appLanguage: uni.getLocale(), + appLanguage: getLocale ? getLocale() : osLanguage, version: plus.runtime.innerVersion, - language: hostLanguage, + language: osLanguage, theme: '', hostPackageName, hostName, diff --git a/packages/uni-h5/dist/uni-h5.cjs.js b/packages/uni-h5/dist/uni-h5.cjs.js index e26e7957e..56854f61f 100644 --- a/packages/uni-h5/dist/uni-h5.cjs.js +++ b/packages/uni-h5/dist/uni-h5.cjs.js @@ -1333,6 +1333,14 @@ validator.concat({ type: Object }); const API_ON_TAB_BAR_MID_BUTTON_TAP = "onTabBarMidButtonTap"; +const API_GET_LOCALE = "getLocale"; +const getLocale = /* @__PURE__ */ defineSyncApi(API_GET_LOCALE, () => { + const app = getApp({ allowDefault: true }); + if (app && app.$vm) { + return app.$vm.$locale; + } + return useI18n().getLocale(); +}); const API_GET_STORAGE = "getStorage"; const GetStorageProtocol = { key: { @@ -9622,10 +9630,10 @@ function usePickerMethods(props2, state, trigger, rootRef, pickerRef, selectRef, } function _l10nColumn(array, normalize) { const { - getLocale + getLocale: getLocale2 } = useI18n(); if (props2.mode === mode.DATE) { - const locale = getLocale(); + const locale = getLocale2(); if (!locale.startsWith("zh")) { switch (props2.fields) { case fields.YEAR: @@ -9647,10 +9655,10 @@ function usePickerMethods(props2, state, trigger, rootRef, pickerRef, selectRef, } function _l10nItem(item, index2) { const { - getLocale + getLocale: getLocale2 } = useI18n(); if (props2.mode === mode.DATE) { - const locale = getLocale(); + const locale = getLocale2(); if (locale.startsWith("zh")) { const array = ["\u5E74", "\u6708", "\u65E5"]; return item + array[index2]; @@ -10071,7 +10079,7 @@ const getAppBaseInfo = /* @__PURE__ */ defineSyncApi("getAppBaseInfo", () => { appName: __uniConfig.appName, appVersion: __uniConfig.appVersion, appVersionCode: __uniConfig.appVersionCode, - appLanguage: uni.getLocale(), + appLanguage: getLocale ? getLocale() : language, version: __uniConfig.appVersion }; }); diff --git a/packages/uni-h5/dist/uni-h5.es.js b/packages/uni-h5/dist/uni-h5.es.js index 5c9772f2d..c0d208336 100644 --- a/packages/uni-h5/dist/uni-h5.es.js +++ b/packages/uni-h5/dist/uni-h5.es.js @@ -16574,7 +16574,7 @@ const getAppBaseInfo = /* @__PURE__ */ defineSyncApi("getAppBaseInfo", () => { appName: __uniConfig.appName, appVersion: __uniConfig.appVersion, appVersionCode: __uniConfig.appVersionCode, - appLanguage: uni.getLocale(), + appLanguage: getLocale ? getLocale() : language, version: __uniConfig.appVersion }; }); -- GitLab