提交 d3ec7e52 编写于 作者: Q qiang

fix(mp-toutiao): Component detached

上级 23621774
......@@ -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) {
......
......@@ -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 => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册