fix(components): [select, select-v2] blur validate not executed (#20232)

This commit is contained in:
Haceral 2025-03-30 13:59:28 +08:00 committed by GitHub
parent 38cbfbb0b0
commit 642946e4fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -122,6 +122,9 @@ const useSelect = (props: ISelectV2Props, emit: SelectEmitFn) => {
afterBlur() {
expanded.value = false
states.menuVisibleOnFocus = false
if (props.validateEvent) {
elFormItem?.validate?.('blur').catch((err) => debugWarn(err))
}
},
})

View File

@ -116,6 +116,9 @@ export const useSelect = (props: ISelectProps, emit: SelectEmits) => {
afterBlur() {
expanded.value = false
states.menuVisibleOnFocus = false
if (props.validateEvent) {
formItem?.validate?.('blur').catch((err) => debugWarn(err))
}
},
})