@tarojs/runtime 3.6.10-alpha.5 → 3.6.11-alpha.0
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/runtime.esm.js +12 -1
- package/dist/runtime.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/runtime.esm.js
CHANGED
|
@@ -4053,8 +4053,19 @@ function createPageConfig(component, pageName, data, pageConfig) {
|
|
|
4053
4053
|
}
|
|
4054
4054
|
};
|
|
4055
4055
|
LIFECYCLES.forEach((lifecycle) => {
|
|
4056
|
+
let isDefer = false;
|
|
4057
|
+
lifecycle = lifecycle.replace(/^defer:/, () => {
|
|
4058
|
+
isDefer = true;
|
|
4059
|
+
return '';
|
|
4060
|
+
});
|
|
4056
4061
|
config[lifecycle] = function () {
|
|
4057
|
-
|
|
4062
|
+
const exec = () => safeExecute(this.$taroPath, lifecycle, ...arguments);
|
|
4063
|
+
if (isDefer) {
|
|
4064
|
+
hasLoaded.then(exec);
|
|
4065
|
+
}
|
|
4066
|
+
else {
|
|
4067
|
+
return exec();
|
|
4068
|
+
}
|
|
4058
4069
|
};
|
|
4059
4070
|
});
|
|
4060
4071
|
// onShareAppMessage 和 onShareTimeline 一样,会影响小程序右上方按钮的选项,因此不能默认注册。
|