From d0ccfbdad9a430b1f5b1fd9be959dd967762cde9 Mon Sep 17 00:00:00 2001 From: "Oliver.Ke" Date: Wed, 6 Dec 2023 15:49:23 +0800 Subject: [PATCH] =?UTF-8?q?BI-139985=20fix:=20bi.down=5Flist=5Fpopup?= =?UTF-8?q?=E7=9A=84bi.down=5Flist=5Fgroup=E9=87=8C=E5=8F=AA=E6=9C=89?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=85=83=E7=B4=A0=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E9=80=89=E4=B8=AD=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/widget/downlist/popup.downlist.js | 50 ++++++++----------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/packages/fineui/src/widget/downlist/popup.downlist.js b/packages/fineui/src/widget/downlist/popup.downlist.js index c4171246c..ebb1e48ce 100644 --- a/packages/fineui/src/widget/downlist/popup.downlist.js +++ b/packages/fineui/src/widget/downlist/popup.downlist.js @@ -1,23 +1,23 @@ import { ButtonTree, Pane } from "@/base"; import { - Selection, - VerticalLayout, - Layout, - shortcut, - extend, - createWidget, - createItems, - isNotNull, + BlankSplitChar, contains, + createItems, + createWidget, + deepClone, each, + extend, isEmpty, - map, - isNotEmptyString, isNotEmptyArray, - some, - deepClone, + isNotEmptyString, + isNotNull, + Layout, + map, + Selection, + shortcut, SIZE_CONSANTS, - BlankSplitChar + some, + VerticalLayout, } from "@/core"; import { DownListGroup } from "./group.downlist"; @@ -63,14 +63,14 @@ export class DownListPopup extends Pane { {}, { adjustLength: -2, - } + }, ), layouts: [ { type: VerticalLayout.xtype, hgap: this.constants.hgap, vgap: this.constants.vgap, - } + }, ], value: this._digest(o.value), chooseType: o.chooseType, @@ -142,7 +142,7 @@ export class DownListPopup extends Pane { layouts: [ { type: VerticalLayout.xtype, - } + }, ], }, innerVgap: 5, @@ -163,11 +163,9 @@ export class DownListPopup extends Pane { item_done.items.push(el_done); storeItem.push(item); }); - if (this._isGroup(item_done.items)) { - each(item_done.items, (i, item) => { - this.singleValues.push(item.el.value); - }); - } + each(item_done.items, (i, item) => { + this.singleValues.push(item.el.value); + }); result.push(item_done); this.items.push(storeItem); @@ -181,7 +179,7 @@ export class DownListPopup extends Pane { cls: "bi-down-list-spliter bi-split-top cursor-pointer", height: 0, }, - } + }, ], cls: "bi-down-list-spliter-container cursor-pointer", vgap: 5, @@ -220,10 +218,6 @@ export class DownListPopup extends Pane { }); } - _isGroup(i) { - return i.length > 1; - } - _needSpliter(i, itemLength) { return i < itemLength - 1; } @@ -276,7 +270,7 @@ export class DownListPopup extends Pane { return true; } - }) + }), ); return value; @@ -295,7 +289,7 @@ export class DownListPopup extends Pane { {}, { adjustLength: -2, - } + }, ); this.popup.populate(popupItem); }