fix(components): [el-input] keydown event validator warming (#6691)

This commit is contained in:
Hefty 2022-03-19 09:28:28 +08:00 committed by GitHub
parent 790311d035
commit acecd8e668
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,7 +96,9 @@ export const inputEmits = {
clear: () => true,
mouseleave: (evt: MouseEvent) => evt instanceof MouseEvent,
mouseenter: (evt: MouseEvent) => evt instanceof MouseEvent,
keydown: (evt: KeyboardEvent) => evt instanceof KeyboardEvent,
// NOTE: when autofill by browser, the keydown event is instanceof Event, not KeyboardEvent
// relative bug report https://github.com/element-plus/element-plus/issues/6665
keydown: (evt: KeyboardEvent | Event) => evt instanceof Event,
compositionstart: (evt: CompositionEvent) => evt instanceof CompositionEvent,
compositionupdate: (evt: CompositionEvent) => evt instanceof CompositionEvent,
compositionend: (evt: CompositionEvent) => evt instanceof CompositionEvent,