From 732b158bbe20cadad3d294502ad260739eb5b043 Mon Sep 17 00:00:00 2001 From: "Jimmy.Chai" Date: Mon, 11 Mar 2024 16:31:51 +0800 Subject: [PATCH] =?UTF-8?q?BI-143833=20fix:=20=E5=85=A8=E9=80=89=E6=97=B6?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=8F=98=E5=8C=96=EF=BC=8C=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E7=A1=AE=E5=AE=9A=E7=BB=84=E4=BB=B6=E4=B8=8D=E4=BC=9A=E5=88=B7?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../multiselect/multiselect.insert.combo.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/fineui/src/widget/multiselect/multiselect.insert.combo.js b/packages/fineui/src/widget/multiselect/multiselect.insert.combo.js index 9a047fbd0..528bba62e 100644 --- a/packages/fineui/src/widget/multiselect/multiselect.insert.combo.js +++ b/packages/fineui/src/widget/multiselect/multiselect.insert.combo.js @@ -31,7 +31,8 @@ import { pushDistinct, Selection, SIZE_CONSANTS, - BlankSplitChar + BlankSplitChar, + size, } from "@/core"; import { Single, Combo, Msg } from "@/base"; import { MultiSelectBar, TriggerIconButton } from "@/case"; @@ -215,7 +216,19 @@ export class MultiSelectInsertCombo extends Single { }, } ], - itemsCreator: o.itemsCreator, + itemsCreator: (op, callback) => { + o.itemsCreator(op, ob => { + callback(ob); + // 全选时数据变化,配置需要同步 + if (this.storeValue.type === Selection.All && size(ob.items) !== size(this.storeValue.assist)) { + this._dataChange = true; + this.storeValue.assist = map(ob.items, 'value'); + this._adjust(() => { + assertShowValue(); + }); + } + }); + }, valueFormatter: o.valueFormatter, itemFormatter: o.itemFormatter, itemHeight: o.itemHeight,