fix(components): [select-v2] reset hoverindex when close dropdown list (#12090)

This commit is contained in:
btea 2023-03-20 09:51:16 +08:00 committed by GitHub
parent e3386d303b
commit 285f7c2195
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -746,6 +746,15 @@ const useSelect = (props: ExtractPropTypes<typeof SelectProps>, emit) => {
return nextTick(menuRef.value.resetScrollTop)
})
watch(
() => dropdownMenuVisible.value,
(val) => {
if (!val) {
resetHoveringIndex()
}
}
)
onMounted(() => {
initStates()
})