From 60f5a7a05c7cef306602fff892a600c6849fda43 Mon Sep 17 00:00:00 2001 From: "Oliver.Ke" Date: Thu, 21 Mar 2024 18:59:27 +0800 Subject: [PATCH 1/2] =?UTF-8?q?BI-145829=20fix:=20DownListCombo,getValue?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E5=9C=A8popupView=E6=9C=AA=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E6=97=B6,=E5=8F=96options.value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/widget/downlist/combo.downlist.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/fineui/src/widget/downlist/combo.downlist.js b/packages/fineui/src/widget/downlist/combo.downlist.js index 005c403ec..ac8e79fda 100644 --- a/packages/fineui/src/widget/downlist/combo.downlist.js +++ b/packages/fineui/src/widget/downlist/combo.downlist.js @@ -1,4 +1,4 @@ -import { cloneDeep, createWidget, each, extend, isArray, shortcut, some, Widget } from "@/core"; +import { cloneDeep, createWidget, each, extend, isArray, isNull, shortcut, some, Widget } from "@/core"; import { DownListPopup } from "./popup.downlist"; import { Combo } from "@/base"; import { IconTrigger } from "@/case"; @@ -134,7 +134,11 @@ export class DownListCombo extends Widget { } getValue() { - return this.popupView.getValue(); + if (isNull(this.popupView)) { + return this.options.value; + } else { + return this.popupView.getValue(); + } } adjustWidth() { From 635933d55effb231f6d9afab5fcfe776e8ab61b5 Mon Sep 17 00:00:00 2001 From: "Oliver.Ke" Date: Thu, 21 Mar 2024 21:02:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?Revert=20"BI-145126=20fix:=20DownListCombo?= =?UTF-8?q?=E7=9A=84isDefaultInit=E9=BB=98=E8=AE=A4=E5=80=BC=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=BAfalse"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit e0f81517 --- packages/fineui/src/widget/downlist/combo.downlist.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fineui/src/widget/downlist/combo.downlist.js b/packages/fineui/src/widget/downlist/combo.downlist.js index ac8e79fda..341372724 100644 --- a/packages/fineui/src/widget/downlist/combo.downlist.js +++ b/packages/fineui/src/widget/downlist/combo.downlist.js @@ -52,7 +52,7 @@ export class DownListCombo extends Widget { minWidth: 140, maxHeight: 1000, destroyWhenHide: false, - isDefaultInit: false, + isDefaultInit: true, }); }