fix(components): [select] use blur in the tooltip slot has no effect (#18335)

* fix(components): [select] use `blur` in the tooltip slot has no effect

* fix(components): [select-v2] use `blur` in the slot has no effect

* feat: delete useless code
This commit is contained in:
sea 2024-10-09 22:48:28 +08:00 committed by GitHub
parent bd245cabdc
commit 16bb0b7df1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View File

@ -562,6 +562,11 @@ const useSelect = (props: ISelectV2Props, emit: SelectEmitFn) => {
}
const blur = () => {
if (expanded.value) {
expanded.value = false
nextTick(() => inputRef.value?.blur())
return
}
inputRef.value?.blur()
}

View File

@ -657,6 +657,11 @@ export const useSelect = (props: ISelectProps, emit) => {
}
const blur = () => {
if (expanded.value) {
expanded.value = false
nextTick(() => inputRef.value?.blur())
return
}
inputRef.value?.blur()
}