fix(components): [autocomplete] fix can not fetch suggestions when after clear (#6820)

This commit is contained in:
bqy_fe 2022-03-25 15:30:24 +08:00 committed by GitHub
parent e5b1606b74
commit 6eead7cc2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,6 +194,7 @@ const handleInput = (value: string) => {
emit('input', value)
emit(UPDATE_MODEL_EVENT, value)
suggestionDisabled.value = false
activated.value = Boolean(value)
if (!props.triggerOnFocus && !value) {
suggestionDisabled.value = true
suggestions.value = []