From f63de5bd1d3453e844c058a9f185c0a5e56bcf67 Mon Sep 17 00:00:00 2001 From: drylint <80906525+drylint@users.noreply.github.com> Date: Sun, 16 Mar 2025 21:49:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=20drop?= =?UTF-8?q?-menu-item=20=E6=9C=89=E9=80=89=E9=A1=B9=E5=80=BC=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E5=AD=97=E7=AC=A6=E4=B8=B2=E6=97=B6=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=96=B0=E5=80=BC=E9=94=99=E8=AF=AF=E5=B9=B6=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=86=85=E9=83=A8=E8=AD=A6=E5=91=8A=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/wd-drop-menu-item/wd-drop-menu-item.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/uni_modules/wot-design-uni/components/wd-drop-menu-item/wd-drop-menu-item.vue b/src/uni_modules/wot-design-uni/components/wd-drop-menu-item/wd-drop-menu-item.vue index cb103f68..9e5d3a07 100644 --- a/src/uni_modules/wot-design-uni/components/wd-drop-menu-item/wd-drop-menu-item.vue +++ b/src/uni_modules/wot-design-uni/components/wd-drop-menu-item/wd-drop-menu-item.vue @@ -128,9 +128,10 @@ function choose(index: number) { if (props.disabled) return const { valueKey } = props const item = props.options[index] - emit('update:modelValue', item[valueKey] !== '' && item[valueKey] !== undefined ? item[valueKey] : item) + const newValue = item[valueKey] !== undefined ? item[valueKey] : item + emit('update:modelValue', newValue) emit('change', { - value: item[valueKey] !== '' && item[valueKey] !== undefined ? item[valueKey] : item, + value: newValue, selectedItem: item }) close()