diff --git a/src/platforms/mp-toutiao/runtime/wrapper/component-parser.js b/src/platforms/mp-toutiao/runtime/wrapper/component-parser.js index 8585edfdb082f66f8261709abb52262414e9d4aa..be28d0313c4a1bd90f0080bc117656caad8a4bd8 100644 --- a/src/platforms/mp-toutiao/runtime/wrapper/component-parser.js +++ b/src/platforms/mp-toutiao/runtime/wrapper/component-parser.js @@ -69,7 +69,11 @@ export default function parseComponent (vueOptions) { }) } + const oldDetached = lifetimes.detached lifetimes.detached = function detached () { + if (typeof oldDetached === 'function') { + oldDetached.call(this) + } currentComponents(this, components => { const index = components.indexOf(this) if (index >= 0) { diff --git a/src/platforms/mp-toutiao/runtime/wrapper/page-parser.js b/src/platforms/mp-toutiao/runtime/wrapper/page-parser.js index fb2a37b615736ecc126f2dd9daacc254787b235e..4776891a4cb033286997ed247d77e4f96069e7d0 100644 --- a/src/platforms/mp-toutiao/runtime/wrapper/page-parser.js +++ b/src/platforms/mp-toutiao/runtime/wrapper/page-parser.js @@ -38,7 +38,6 @@ export default function parsePage (vuePageOptions) { if (typeof oldDetached === 'function') { oldDetached.call(this) } - this.$vm && this.$vm.$destroy() // 清理 const webviewId = this.__webviewId__ webviewId && Object.keys(instances).forEach(key => {