From 15550dbed0e5390c964b96c01ece5f89ac2c48bd Mon Sep 17 00:00:00 2001 From: windy Date: Wed, 2 Nov 2022 10:50:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?BI-115750=20=E7=BB=84=E4=BB=B6=E5=B7=A6?= =?UTF-8?q?=E4=BE=A7=E7=BB=B4=E5=BA=A6=E6=A0=8F=EF=BC=8C=E4=B8=80=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=EF=BC=8C=E5=B0=B1=E4=BC=9A=E7=99=BD=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/list/listview.js | 5 +++++ src/base/list/virtualgrouplist.js | 5 +++++ src/base/list/virtuallist.js | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/src/base/list/listview.js b/src/base/list/listview.js index c998281b9..b4a4929f8 100644 --- a/src/base/list/listview.js +++ b/src/base/list/listview.js @@ -100,6 +100,11 @@ BI.ListView = BI.inherit(BI.Widget, { }, _calculateBlocksToRender: function () { + // BI-115750 不可见状态下依赖元素实际尺寸构造的线段树会分段错误,所以不进行后续计算和线段树的初始化。 + // 这样从不可见状态变为可见状态能够重新触发线段树初始化 + if (!this.element.is(":visible")) { + return; + } this._renderMoreIf(); }, diff --git a/src/base/list/virtualgrouplist.js b/src/base/list/virtualgrouplist.js index 2db1e0765..652a48c37 100644 --- a/src/base/list/virtualgrouplist.js +++ b/src/base/list/virtualgrouplist.js @@ -110,6 +110,11 @@ BI.VirtualGroupList = BI.inherit(BI.Widget, { }, _calculateBlocksToRender: function () { + // BI-115750 不可见状态下依赖元素实际尺寸构造的线段树会分段错误,所以不进行后续计算和线段树的初始化。 + // 这样从不可见状态变为可见状态能够重新触发线段树初始化 + if (!this.element.is(":visible")) { + return; + } var o = this.options; this._isAutoHeight() && this._renderMoreIf(); var height = this.element.height(); diff --git a/src/base/list/virtuallist.js b/src/base/list/virtuallist.js index 011d53344..3985727a4 100644 --- a/src/base/list/virtuallist.js +++ b/src/base/list/virtuallist.js @@ -93,6 +93,11 @@ BI.VirtualList = BI.inherit(BI.Widget, { _calculateBlocksToRender: function () { var o = this.options; + // BI-115750 不可见状态下依赖元素实际尺寸构造的线段树会分段错误,所以不进行后续计算和线段树的初始化。 + // 这样从不可见状态变为可见状态能够重新触发线段树初始化 + if (!this.element.is(":visible")) { + return; + } this._renderMoreIf(); var height = this.element.height(); var minContentHeightFrom = o.scrollTop - o.overscanHeight; From c2d87e089d5ff050069ee337f6de28889ade3c08 Mon Sep 17 00:00:00 2001 From: data Date: Wed, 2 Nov 2022 18:55:46 +0800 Subject: [PATCH 2/2] auto upgrade version to 2.0.20221102185525 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2caf34e3b..2b7e1f3a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221102175548", + "version": "2.0.20221102185525", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts",