From cd24a2138351e2b0a521c23c790890ddc2c586fa Mon Sep 17 00:00:00 2001 From: jian Date: Mon, 11 Dec 2023 23:59:40 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=97=A0jia=E4=BB=BB=E5=8A=A1=20ref?= =?UTF-8?q?=E9=94=80=E6=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/core/4.widget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fineui/src/core/4.widget.js b/packages/fineui/src/core/4.widget.js index c8fbe5d2f..c1fb3bdeb 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(); } From bfb93a13e04e7d750ffbe4c343e7408915aab81a Mon Sep 17 00:00:00 2001 From: jian Date: Tue, 12 Dec 2023 00:15:51 +0800 Subject: [PATCH 2/6] =?UTF-8?q?KERNEL-16950=20fix:=20options=E4=B8=AD?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E4=B8=8D=E4=BC=9A=E8=A2=AB=E9=87=8A=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/core/4.widget.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/fineui/src/core/4.widget.js b/packages/fineui/src/core/4.widget.js index c1fb3bdeb..8ea3ee457 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,6 +959,7 @@ export class Widget extends OB { this.fireEvent(Events.DESTROY); this._purgeRef(); this.purgeListeners(); + this.options = {}; } } From 042d7cc2ef73a7c62e761bcf1c87dff46a612c7d Mon Sep 17 00:00:00 2001 From: jian Date: Tue, 12 Dec 2023 00:17:03 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=97=A0jia=E4=BB=BB=E5=8A=A1=20=E8=BF=99?= =?UTF-8?q?=E4=B9=88=E6=94=B9=E7=9C=8B=E4=B8=8B=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/core/4.widget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fineui/src/core/4.widget.js b/packages/fineui/src/core/4.widget.js index 8ea3ee457..6f1d147c5 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(); } From ee79aea110637c5fed9b66cfdad7e49d5a6394be Mon Sep 17 00:00:00 2001 From: jian Date: Tue, 12 Dec 2023 20:03:32 +0800 Subject: [PATCH 4/6] =?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; From 8b20dbd53bc7106be40df8b9033f6fe2a0e42e94 Mon Sep 17 00:00:00 2001 From: jian Date: Tue, 12 Dec 2023 20:45:53 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=97=A0jia=E4=BB=BB=E5=8A=A1=20=E5=A4=9A?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/fix/fix.compact.js | 32 +++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/fineui/src/fix/fix.compact.js b/packages/fineui/src/fix/fix.compact.js index 62b1d3868..40b02fe8f 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; From fb4bb095449a8bf4e9fc562cdce1adabe8b5a0a3 Mon Sep 17 00:00:00 2001 From: jian Date: Thu, 14 Dec 2023 11:01:22 +0800 Subject: [PATCH 6/6] =?UTF-8?q?KERNEL-16950=20fix:=20=E5=BD=93listview?= =?UTF-8?q?=E5=9C=A8=E7=88=B6=E7=BB=84=E4=BB=B6tab=E9=87=8C=EF=BC=8C?= =?UTF-8?q?=E4=B8=94=E9=9A=90=E8=97=8F=E7=9A=84=E7=8A=B6=E6=80=81=EF=BC=8C?= =?UTF-8?q?=E7=88=B6=E7=BB=84=E4=BB=B6watch=E5=88=B7=E6=96=B0listview?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E6=89=A7=E8=A1=8C=EF=BC=9F=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E5=BA=94=E8=AF=A5=E8=A6=81=E6=89=A7=E8=A1=8C=EF=BC=8C=E8=BF=99?= =?UTF-8?q?=E9=87=8C=E5=BE=97=E5=8E=BB=E6=8E=89=EF=BC=8C=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E4=B8=8D=E8=A6=81=E6=89=A7=E8=A1=8C=EF=BC=8C=E7=88=B6=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=B8=AD=E5=86=99=E6=B3=95=E5=B0=B1=E5=BE=97=E6=89=8B?= =?UTF-8?q?=E5=8A=A8setselect=20listview=E7=9A=84tab=E5=90=8E=E4=B8=BB?= =?UTF-8?q?=E5=8A=A8=E5=86=8D=E5=88=B7=E6=96=B0=E4=B8=8B=EF=BC=9B=E8=BF=99?= =?UTF-8?q?=E9=87=8Clistview=E9=9A=90=E8=97=8F=E7=8A=B6=E6=80=81=E4=B8=8B?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/base/list/listview.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/fineui/src/base/list/listview.js b/packages/fineui/src/base/list/listview.js index ae1add7fb..29162ff54 100644 --- a/packages/fineui/src/base/list/listview.js +++ b/packages/fineui/src/base/list/listview.js @@ -111,11 +111,6 @@ export class ListView extends Widget { } } _calculateBlocksToRender() { - // BI-115750 不可见状态下依赖元素实际尺寸构造的线段树会分段错误,所以不进行后续计算和线段树的初始化。 - // 这样从不可见状态变为可见状态能够重新触发线段树初始化 - if (!this.element.is(":visible")) { - return; - } this._renderMoreIf(); }