From 6965efb993aae6fd2330a948bc268fe9ac787e53 Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 9 Oct 2023 16:24:24 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20custom=5F?= =?UTF-8?q?tree=20+=20bi.loader=EF=BC=8Cpopulate=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E4=BC=9A=E5=AF=BC=E8=87=B4=E2=80=9C=E6=97=A0=E6=9B=B4?= =?UTF-8?q?=E5=A4=9A=E6=95=B0=E6=8D=AE=E2=80=9D=E6=B6=88=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/base/combination/loader.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/fineui/src/base/combination/loader.js b/packages/fineui/src/base/combination/loader.js index 1d0711158..b362a5922 100644 --- a/packages/fineui/src/base/combination/loader.js +++ b/packages/fineui/src/base/combination/loader.js @@ -248,7 +248,7 @@ export class Loader extends Widget { this.button_group.addItems(...arguments); } - _populate(items) { + _populate(items, _key, options={}) { const o = this.options; if (arguments.length === 0 && isFunction(o.itemsCreator)) { o.itemsCreator.apply(this, [ @@ -265,6 +265,9 @@ export class Loader extends Widget { return false; } this.options.items = items; + if (options.reserveAttributes) { + return true; + } this.times = 1; this.count = 0; this.count += items.length; From 214732c310001a82625cc43c4d478ef81e32cf4f Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 9 Oct 2023 18:03:57 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20custom=5F?= =?UTF-8?q?tree=20+=20bi.loader=EF=BC=8Cpopulate=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E4=BC=9A=E5=AF=BC=E8=87=B4=E2=80=9C=E6=97=A0=E6=9B=B4?= =?UTF-8?q?=E5=A4=9A=E6=95=B0=E6=8D=AE=E2=80=9D=E6=B6=88=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/base/tree/customtree.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/fineui/src/base/tree/customtree.js b/packages/fineui/src/base/tree/customtree.js index df3a87671..349ae0912 100644 --- a/packages/fineui/src/base/tree/customtree.js +++ b/packages/fineui/src/base/tree/customtree.js @@ -123,9 +123,8 @@ export class CustomTree extends Widget { itemsCreator: (op, callback) => { itemsCreator.apply(this, [ op, - items => { - const args = Array.prototype.slice.call(arguments, 0); - args[0] = this._formatItems(items); + (...args) => { + args[0] = this._formatItems(args[0]); callback(...args); } ]); From 262308f619e75bc52eec07fb6be693cc4a6cbf7c Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 11 Oct 2023 10:08:08 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20custom=5F?= =?UTF-8?q?tree=E6=94=AF=E6=8C=81hasNext?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/base/combination/loader.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/fineui/src/base/combination/loader.js b/packages/fineui/src/base/combination/loader.js index b362a5922..1d0711158 100644 --- a/packages/fineui/src/base/combination/loader.js +++ b/packages/fineui/src/base/combination/loader.js @@ -248,7 +248,7 @@ export class Loader extends Widget { this.button_group.addItems(...arguments); } - _populate(items, _key, options={}) { + _populate(items) { const o = this.options; if (arguments.length === 0 && isFunction(o.itemsCreator)) { o.itemsCreator.apply(this, [ @@ -265,9 +265,6 @@ export class Loader extends Widget { return false; } this.options.items = items; - if (options.reserveAttributes) { - return true; - } this.times = 1; this.count = 0; this.count += items.length;