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'); }