Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions packages/mpvue/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2179,7 +2179,7 @@ function mountComponent (
vm.$el = el;
if (!vm.$options.render) {
vm.$options.render = createEmptyVNode;

}
callHook(vm, 'beforeMount');

Expand Down Expand Up @@ -2274,7 +2274,7 @@ function updateChildComponent (
vm.$forceUpdate();
}


}

function isInInactiveTree (vm) {
Expand Down Expand Up @@ -2885,7 +2885,7 @@ function initMethods (vm, methods) {
var props = vm.$options.props;
for (var key in methods) {
vm[key] = methods[key] == null ? noop : bind(methods[key], vm);

}
}

Expand Down Expand Up @@ -5669,6 +5669,11 @@ function updateDataToMP () {
return
}

// 对于被销毁的节点,不更新data
if (this._isDestroyed) {
return
}

var data = formatVmData(this);
diffData(this, data);
throttleSetData(page.setData.bind(page), data);
Expand Down
5 changes: 5 additions & 0 deletions src/platforms/mp/runtime/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ export function updateDataToMP () {
return
}

// 对于被销毁的节点,不更新data
if (this._isDestroyed) {
return
}

const data = formatVmData(this)
diffData(this, data)
throttleSetData(page.setData.bind(page), data)
Expand Down