Vue.mixin({
destroyed() {
// 混入释放资源,解决内存泄漏问题
this._watcher = null;
this._watchers = null;
this.$options = null;
this._computedWatchers = null;
this.$vnode = null;
this.$children = null;
this._vnode = null;
this._props = {};
this._data = {};
this.$parent = null;
}
});
简单粗暴的解决内存泄漏问题
最新推荐文章于 2024-04-17 16:35:32 发布