@dcloudio/uni-quickapp-webview 2.0.2-4040420241231001 → 2.0.2-4050320250303001

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +33 -6
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -326,7 +326,7 @@ const promiseInterceptor = {
326
326
  };
327
327
 
328
328
  const SYNC_API_RE =
329
- /^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback|getWindowInfo|getDeviceInfo|getAppBaseInfo|getSystemSetting|getAppAuthorizeSetting|initUTS|requireUTS|registerUTS/;
329
+ /^\$|__f__|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|rpx2px|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback|getWindowInfo|getDeviceInfo|getAppBaseInfo|getSystemSetting|getAppAuthorizeSetting|initUTS|requireUTS|registerUTS/;
330
330
 
331
331
  const CONTEXT_API_RE = /^create|Manager$/;
332
332
 
@@ -443,10 +443,19 @@ const LOCALE_ES = 'es';
443
443
 
444
444
  const messages = {};
445
445
 
446
+ function getLocaleLanguage () {
447
+ let localeLanguage = '';
448
+ {
449
+ localeLanguage =
450
+ normalizeLocale(qa.getSystemInfoSync().language) || LOCALE_EN;
451
+ }
452
+ return localeLanguage
453
+ }
454
+
446
455
  let locale;
447
456
 
448
457
  {
449
- locale = normalizeLocale( qa.getSystemInfoSync().language) || LOCALE_EN;
458
+ locale = getLocaleLanguage();
450
459
  }
451
460
 
452
461
  function initI18nMessages () {
@@ -572,7 +581,7 @@ function getLocale$1 () {
572
581
  return app.$vm.$locale
573
582
  }
574
583
  }
575
- return normalizeLocale( qa.getSystemInfoSync().language) || LOCALE_EN
584
+ return getLocaleLanguage()
576
585
  }
577
586
 
578
587
  function setLocale$1 (locale) {
@@ -609,6 +618,7 @@ const interceptors = {
609
618
  var baseApi = /*#__PURE__*/Object.freeze({
610
619
  __proto__: null,
611
620
  upx2px: upx2px,
621
+ rpx2px: upx2px,
612
622
  getLocale: getLocale$1,
613
623
  setLocale: setLocale$1,
614
624
  onLocaleChange: onLocaleChange,
@@ -850,7 +860,7 @@ function populateParameters (result) {
850
860
  let _SDKVersion = SDKVersion;
851
861
 
852
862
  // hostLanguage
853
- const hostLanguage = language.replace(/_/g, '-');
863
+ const hostLanguage = (language || '').replace(/_/g, '-');
854
864
 
855
865
  // wx.getAccountInfoSync
856
866
 
@@ -1289,12 +1299,20 @@ const offPushMessage = (fn) => {
1289
1299
  }
1290
1300
  };
1291
1301
 
1302
+ function __f__ (
1303
+ type,
1304
+ ...args
1305
+ ) {
1306
+ console[type].apply(console, args);
1307
+ }
1308
+
1292
1309
  var api = /*#__PURE__*/Object.freeze({
1293
1310
  __proto__: null,
1294
1311
  getPushClientId: getPushClientId,
1295
1312
  onPushMessage: onPushMessage,
1296
1313
  offPushMessage: offPushMessage,
1297
- invokePushCallback: invokePushCallback
1314
+ invokePushCallback: invokePushCallback,
1315
+ __f__: __f__
1298
1316
  });
1299
1317
 
1300
1318
  function findVmByVueId (vm, vuePid) {
@@ -2132,7 +2150,7 @@ function parseBaseApp (vm, {
2132
2150
  });
2133
2151
  }
2134
2152
 
2135
- initAppLocale(Vue, vm, normalizeLocale(qa.getSystemInfoSync().language) || LOCALE_EN);
2153
+ initAppLocale(Vue, vm, getLocaleLanguage$1());
2136
2154
 
2137
2155
  initHooks(appOptions, hooks);
2138
2156
  initUnknownHooks(appOptions, vm.$options);
@@ -2140,6 +2158,15 @@ function parseBaseApp (vm, {
2140
2158
  return appOptions
2141
2159
  }
2142
2160
 
2161
+ function getLocaleLanguage$1 () {
2162
+ let localeLanguage = '';
2163
+ {
2164
+ localeLanguage =
2165
+ normalizeLocale(qa.getSystemInfoSync().language) || LOCALE_EN;
2166
+ }
2167
+ return localeLanguage
2168
+ }
2169
+
2143
2170
  const mocks = ['nodeId', 'componentName', '_componentId', 'uniquePrefix'];
2144
2171
 
2145
2172
  function isPage () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-quickapp-webview",
3
- "version": "2.0.2-4040420241231001",
3
+ "version": "2.0.2-4050320250303001",
4
4
  "description": "uni-app quickapp-webview",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -17,5 +17,5 @@
17
17
  "name": "quickapp-webview",
18
18
  "title": "快应用(Webview)版"
19
19
  },
20
- "gitHead": "f5a282a67f3eda3204e8fa48882b129f47c17cd3"
20
+ "gitHead": "a2b65079c08db2a886090289a98e78eb4680e3e7"
21
21
  }