From 9384119477626309ce958cbacb065fe5f665574c Mon Sep 17 00:00:00 2001 From: chenzeyu Date: Mon, 22 Jan 2024 11:53:47 +0800 Subject: [PATCH] =?UTF-8?q?BI-142531=20fix:=20=E7=BC=93=E5=AD=98=E6=B8=85?= =?UTF-8?q?=E7=A9=BA=E4=B8=94hasNext=E4=B8=BAfalse=E6=97=B6=E4=BB=8D?= =?UTF-8?q?=E7=84=B6=E6=98=BE=E7=A4=BA=E5=8A=A0=E8=BD=BD=E6=9B=B4=E5=A4=9A?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fineui/src/widget/multiselect/loader.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/fineui/src/widget/multiselect/loader.js b/packages/fineui/src/widget/multiselect/loader.js index f39c35ef7..933c96e43 100644 --- a/packages/fineui/src/widget/multiselect/loader.js +++ b/packages/fineui/src/widget/multiselect/loader.js @@ -73,14 +73,14 @@ export class MultiSelectInnerLoader extends Widget { if (this.cachItems && this.cachItems.length > 0) { this.next.setLoaded(); const items = this._composeItems(this.cachItems.slice(0, 100)); - this.addItems(items); this.cachItems = this.cachItems.slice(100); + this.addItems(items); return; } o.itemsCreator.apply(this, [ { times: ++this.times }, - function() { + function () { self.next.setLoaded(); self.addItems(...arguments); } @@ -105,7 +105,7 @@ export class MultiSelectInnerLoader extends Widget { ], value: o.value, }); - this.button_group.on(Controller.EVENT_CHANGE, function(type, value, obj) { + this.button_group.on(Controller.EVENT_CHANGE, function (type, value, obj) { if (type === Events.CLICK) { const node = self.cachGroup.getNodeByValue(value); if (node) { @@ -158,12 +158,12 @@ export class MultiSelectInnerLoader extends Widget { }); o.isDefaultInit && - isEmpty(o.items) && - nextTick( - bind(function() { - o.isDefaultInit && isEmpty(o.items) && this._populate(); - }, this) - ); + isEmpty(o.items) && + nextTick( + bind(function () { + o.isDefaultInit && isEmpty(o.items) && this._populate(); + }, this) + ); } hasNext() { @@ -221,7 +221,7 @@ export class MultiSelectInnerLoader extends Widget { if (arguments.length === 0 && isFunction(o.itemsCreator)) { o.itemsCreator.apply(this, [ { times: 1 }, - function(items, keyword) { + function (items, keyword) { if (arguments.length === 0) { throw new Error("object already registered"); }