diff --git a/packages/taro-alipay/src/create-component.js b/packages/taro-alipay/src/create-component.js index aca9e8e7e834..b90b259dff59 100644 --- a/packages/taro-alipay/src/create-component.js +++ b/packages/taro-alipay/src/create-component.js @@ -247,6 +247,7 @@ function createComponent (ComponentClass, isPage) { hasPageInited = false if (cacheDataHas(preloadInitedComponent)) { this.$component = cacheDataGet(preloadInitedComponent, true) + this.$component.$componentType = 'PAGE' } else { this.$component = new ComponentClass({}, isPage) } diff --git a/packages/taro-qq/src/create-component.js b/packages/taro-qq/src/create-component.js index 9c96bc7a920f..3ca9eacc9219 100644 --- a/packages/taro-qq/src/create-component.js +++ b/packages/taro-qq/src/create-component.js @@ -295,6 +295,7 @@ function createComponent (ComponentClass, isPage) { created (options = {}) { if (isPage && cacheDataHas(preloadInitedComponent)) { this.$component = cacheDataGet(preloadInitedComponent, true) + this.$component.$componentType = 'PAGE' } else { this.$component = new ComponentClass({}, isPage) } diff --git a/packages/taro-tt/src/create-component.js b/packages/taro-tt/src/create-component.js index b5722939545c..6305a743809b 100644 --- a/packages/taro-tt/src/create-component.js +++ b/packages/taro-tt/src/create-component.js @@ -292,6 +292,7 @@ function createComponent (ComponentClass, isPage) { isPage && (hasPageInited = false) if (isPage && cacheDataHas(preloadInitedComponent)) { this.$component = cacheDataGet(preloadInitedComponent, true) + this.$component.$componentType = 'PAGE' } else { this.$component = new ComponentClass({}, isPage) } diff --git a/packages/taro-weapp/src/create-component.js b/packages/taro-weapp/src/create-component.js index 1f993414fe70..c6e762e8d4cf 100644 --- a/packages/taro-weapp/src/create-component.js +++ b/packages/taro-weapp/src/create-component.js @@ -318,6 +318,7 @@ function createComponent (ComponentClass, isPage) { created (options = {}) { if (isPage && cacheDataHas(preloadInitedComponent)) { this.$component = cacheDataGet(preloadInitedComponent, true) + this.$component.$componentType = 'PAGE' } else { this.$component = new ComponentClass({}, isPage) }