@tarojs/runtime 3.6.38-alpha.0 → 3.6.39
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.
- package/dist/dsl/common.js +4 -0
- package/dist/dsl/common.js.map +1 -1
- package/dist/index.cjs.js +4 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/runtime.esm.js +4 -0
- package/dist/runtime.esm.js.map +1 -1
- package/package.json +3 -3
package/dist/runtime.esm.js
CHANGED
|
@@ -4144,6 +4144,7 @@ function createPageConfig(component, pageName, data, pageConfig) {
|
|
|
4144
4144
|
return EventChannel.pageChannel;
|
|
4145
4145
|
};
|
|
4146
4146
|
}
|
|
4147
|
+
const isSWAN = process.env.TARO_ENV === 'swan'; // 百度小程序
|
|
4147
4148
|
LIFECYCLES.forEach((lifecycle) => {
|
|
4148
4149
|
let isDefer = false;
|
|
4149
4150
|
lifecycle = lifecycle.replace(/^defer:/, () => {
|
|
@@ -4152,6 +4153,9 @@ function createPageConfig(component, pageName, data, pageConfig) {
|
|
|
4152
4153
|
});
|
|
4153
4154
|
config[lifecycle] = function () {
|
|
4154
4155
|
const exec = () => safeExecute(this.$taroPath, lifecycle, ...arguments);
|
|
4156
|
+
if (isSWAN) {
|
|
4157
|
+
return exec();
|
|
4158
|
+
}
|
|
4155
4159
|
if (isDefer) {
|
|
4156
4160
|
hasLoaded.then(exec);
|
|
4157
4161
|
}
|