@ -46,10 +46,14 @@ export const ResizeDetector = {
addResizeListener(widget.element[0], fn);
return function () {
// 如果fn是debounce需要cancel掉
fn?.cancel?.();
removeResizeListener(widget.element[0], fn);
};
},
removeResizeListener(widget, fn) {
@ -1386,7 +1386,7 @@ class Model {
this.$$computed = null;
this.$$state = null;
this.$$context = null;
this.model = null;
this.model = {}; // 一些异步请求里访问model里的属性,这里先变成空对象,保证部分场景下不报错,其他报错会try catch
this._destroyHandler && this._destroyHandler();
}