fix(components): [time-picker] can not hide panel when click frequently (#7779)

This commit is contained in:
bqy_fe 2022-05-20 08:26:12 +08:00 committed by GitHub
parent f245986996
commit 488eaf5211
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -385,13 +385,11 @@ export default defineComponent({
const onHide = () => {
pickerActualVisible.value = false
ignoreFocusEvent = false
ctx.emit('visible-change', false)
}
const focus = async (
focusStartInput = true,
isIgnoreFocusEvent = false
) => {
const focus = (focusStartInput = true, isIgnoreFocusEvent = false) => {
ignoreFocusEvent = isIgnoreFocusEvent
let input = refStartInput.value
if (!focusStartInput && isRangeInput.value) {
@ -400,8 +398,6 @@ export default defineComponent({
if (input) {
input.focus()
}
await nextTick()
ignoreFocusEvent = false
}
const handleFocusInput = (e) => {