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

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()
})