From ee79aea110637c5fed9b66cfdad7e49d5a6394be Mon Sep 17 00:00:00 2001 From: jian Date: Tue, 12 Dec 2023 20:03:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0jia=E4=BB=BB=E5=8A=A1=20=E5=9B=9E?= =?UTF-8?q?=E9=80=80=EF=BC=8C=E6=9A=82=E6=97=B6=E5=8E=BB=E4=B8=8D=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/core/4.widget.js | 3 +-- packages/fineui/src/fix/fix.compact.js | 32 +++++++++++++------------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/packages/fineui/src/core/4.widget.js b/packages/fineui/src/core/4.widget.js index 6f1d147c5..c8fbe5d2f 100644 --- a/packages/fineui/src/core/4.widget.js +++ b/packages/fineui/src/core/4.widget.js @@ -874,7 +874,7 @@ export class Widget extends OB { this._assetMounted(); this.__destroy(); this.fireEvent(Events.UNMOUNT); - this._purgeRef(); // 子组件unmount ref置为null了,父组件拿不到ref,导致报错 + // this._purgeRef(); // 子组件unmount ref置为null了,父组件拿不到ref,导致报错 this.purgeListeners(); } @@ -959,7 +959,6 @@ export class Widget extends OB { this.fireEvent(Events.DESTROY); this._purgeRef(); this.purgeListeners(); - this.options = {}; } } diff --git a/packages/fineui/src/fix/fix.compact.js b/packages/fineui/src/fix/fix.compact.js index 40b02fe8f..62b1d3868 100644 --- a/packages/fineui/src/fix/fix.compact.js +++ b/packages/fineui/src/fix/fix.compact.js @@ -92,11 +92,11 @@ Fix.watch = function(model, expOrFn, cb, options) { function() { options && options.store && pushTarget(options.store); let res; - try { + // try { res = cb.apply(this, arguments); - } catch (e) { - console.error(e); - } + // } catch (e) { + // console.error(e); + // } options && options.store && popTarget(); return res; @@ -169,11 +169,11 @@ export function createStore() { const _init = Widget.prototype._init; Widget.prototype._init = function() { const needPop = createStore.call(this); - try { + // try { _init.apply(this, arguments); - } catch (e) { - console.error(e); - } + // } catch (e) { + // console.error(e); + // } needPop && popTarget(); }; @@ -192,11 +192,11 @@ Widget.prototype.__initWatch = function() { const unMount = Widget.prototype.__destroy; Widget.prototype.__destroy = function() { - try { + // try { unMount.apply(this, arguments); - } catch (e) { - console.error(e); - } + // } catch (e) { + // console.error(e); + // } this.store && isFunction(this.store.destroy) && this.store.destroy(); each(this._watchers, (i, unwatches) => { unwatches = isArray(unwatches) ? unwatches : [unwatches]; @@ -238,11 +238,11 @@ _.each(["_render", "__afterRender", "_mount", "__afterMount"], (name) => { (Widget.prototype[name] = function() { this.store && pushTarget(this.store); let res; - try { + // try { res = old.apply(this, arguments); - } catch (e) { - console.error(e); - } + // } catch (e) { + // console.error(e); + // } this.store && popTarget(); return res;