fix(组件): ms-select过滤修复
This commit is contained in:
parent
367e62e3da
commit
6e9d34dfef
|
@ -451,7 +451,9 @@ export default defineComponent(
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
const option = remoteOriginOptions.value.find(
|
const option = remoteOriginOptions.value.find(
|
||||||
(e) => e[props.valueKey || 'value'].toLowerCase() === value?.toLowerCase()
|
(e) =>
|
||||||
|
e[props.valueKey || 'value'].toLowerCase() === value?.toLowerCase() ||
|
||||||
|
e[props.labelKey || 'label'].toLowerCase() === value?.toLowerCase()
|
||||||
);
|
);
|
||||||
return option ? option[props.labelKey || 'label'] : props.optionNotExitsText || t('ms.select.optionsNotExits');
|
return option ? option[props.labelKey || 'label'] : props.optionNotExitsText || t('ms.select.optionsNotExits');
|
||||||
}
|
}
|
||||||
|
@ -519,6 +521,10 @@ export default defineComponent(
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onInputValueChange={handleInputValueChange}
|
onInputValueChange={handleInputValueChange}
|
||||||
|
onClear={() => {
|
||||||
|
innerValue.value = props.multiple ? [] : '';
|
||||||
|
emit('update:modelValue', innerValue.value);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{{
|
{{
|
||||||
prefix: props.prefix ? () => t(props.prefix || '') : null,
|
prefix: props.prefix ? () => t(props.prefix || '') : null,
|
||||||
|
|
Loading…
Reference in New Issue