|
@@ -504,7 +504,11 @@ function normalizeLocale(locale, messages) {
|
|
|
}
|
|
}
|
|
|
return LOCALE_ZH_HANS;
|
|
return LOCALE_ZH_HANS;
|
|
|
}
|
|
}
|
|
|
- const lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
|
|
|
|
|
|
|
+ let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
|
|
|
|
|
+ if (messages && Object.keys(messages).length > 0) {
|
|
|
|
|
+ locales = Object.keys(messages);
|
|
|
|
|
+ }
|
|
|
|
|
+ const lang = startsWith(locale, locales);
|
|
|
if (lang) {
|
|
if (lang) {
|
|
|
return lang;
|
|
return lang;
|
|
|
}
|
|
}
|
|
@@ -1502,8 +1506,8 @@ function populateParameters(fromRes, toRes) {
|
|
|
appVersion: "1.0.0",
|
|
appVersion: "1.0.0",
|
|
|
appVersionCode: "100",
|
|
appVersionCode: "100",
|
|
|
appLanguage: getAppLanguage(hostLanguage),
|
|
appLanguage: getAppLanguage(hostLanguage),
|
|
|
- uniCompileVersion: "3.7.11",
|
|
|
|
|
- uniRuntimeVersion: "3.7.11",
|
|
|
|
|
|
|
+ uniCompileVersion: "3.8.4",
|
|
|
|
|
+ uniRuntimeVersion: "3.8.4",
|
|
|
uniPlatform: "mp-weixin",
|
|
uniPlatform: "mp-weixin",
|
|
|
deviceBrand,
|
|
deviceBrand,
|
|
|
deviceModel: model,
|
|
deviceModel: model,
|
|
@@ -1745,10 +1749,14 @@ function isWxKey(key) {
|
|
|
return objectKeys.indexOf(key) > -1 || typeof wx[key] === "function";
|
|
return objectKeys.indexOf(key) > -1 || typeof wx[key] === "function";
|
|
|
}
|
|
}
|
|
|
function initWx() {
|
|
function initWx() {
|
|
|
|
|
+ let global2 = wx;
|
|
|
|
|
+ if (typeof globalThis !== "undefined" && globalThis.wx && wx !== globalThis.wx) {
|
|
|
|
|
+ global2 = globalThis.wx;
|
|
|
|
|
+ }
|
|
|
const newWx = {};
|
|
const newWx = {};
|
|
|
- for (const key in wx) {
|
|
|
|
|
|
|
+ for (const key in global2) {
|
|
|
if (isWxKey(key)) {
|
|
if (isWxKey(key)) {
|
|
|
- newWx[key] = wx[key];
|
|
|
|
|
|
|
+ newWx[key] = global2[key];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (typeof globalThis !== "undefined") {
|
|
if (typeof globalThis !== "undefined") {
|
|
@@ -6124,7 +6132,7 @@ function createInvoker(initialValue, instance) {
|
|
|
const eventValue = invoker.value;
|
|
const eventValue = invoker.value;
|
|
|
const invoke = () => callWithAsyncErrorHandling(patchStopImmediatePropagation(e2, eventValue), instance, 5, args);
|
|
const invoke = () => callWithAsyncErrorHandling(patchStopImmediatePropagation(e2, eventValue), instance, 5, args);
|
|
|
const eventTarget = e2.target;
|
|
const eventTarget = e2.target;
|
|
|
- const eventSync = eventTarget ? eventTarget.dataset ? eventTarget.dataset.eventsync === "true" : false : false;
|
|
|
|
|
|
|
+ const eventSync = eventTarget ? eventTarget.dataset ? String(eventTarget.dataset.eventsync) === "true" : false : false;
|
|
|
if (bubbles.includes(e2.type) && !eventSync) {
|
|
if (bubbles.includes(e2.type) && !eventSync) {
|
|
|
setTimeout(invoke);
|
|
setTimeout(invoke);
|
|
|
} else {
|
|
} else {
|
|
@@ -6833,6 +6841,7 @@ function parseComponent(vueOptions, { parse: parse2, mocks: mocks2, isPage: isPa
|
|
|
vueOptions = vueOptions.default || vueOptions;
|
|
vueOptions = vueOptions.default || vueOptions;
|
|
|
const options = {
|
|
const options = {
|
|
|
multipleSlots: true,
|
|
multipleSlots: true,
|
|
|
|
|
+ // styleIsolation: 'apply-shared',
|
|
|
addGlobalClass: true,
|
|
addGlobalClass: true,
|
|
|
pureDataPattern: /^uP$/
|
|
pureDataPattern: /^uP$/
|
|
|
};
|
|
};
|