From e95b31da747d5ccf5890e9ac80049cb56b343798 Mon Sep 17 00:00:00 2001 From: baiqi Date: Tue, 19 Nov 2024 15:01:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=BB=84=E4=BB=B6):=20=20ms-select?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E4=B8=8D=E5=AD=98=E5=9C=A8=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E6=97=B6=E5=B7=B2=E9=80=89=E9=80=89=E9=A1=B9=E4=BB=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=AD=A3=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/business/ms-select/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/business/ms-select/index.tsx b/frontend/src/components/business/ms-select/index.tsx index ec6aeb6de6..5a563da592 100644 --- a/frontend/src/components/business/ms-select/index.tsx +++ b/frontend/src/components/business/ms-select/index.tsx @@ -446,12 +446,12 @@ export default defineComponent( return props.allowClear; }); - function checkOptionExit(label?: string) { + function checkOptionExit(value?: string) { if (typeof props.optionLabelRender === 'function') { - return label; + return value; } const option = remoteOriginOptions.value.find( - (e) => e[props.labelKey || 'label'].toLowerCase() === label?.toLowerCase() + (e) => e[props.valueKey || 'value'].toLowerCase() === value?.toLowerCase() ); return option ? option[props.labelKey || 'label'] : props.optionNotExitsText || t('ms.select.optionsNotExits'); }