diff --git a/components/vc-select/Selector/index.tsx b/components/vc-select/Selector/index.tsx index e06a010b49..8aae477adf 100644 --- a/components/vc-select/Selector/index.tsx +++ b/components/vc-select/Selector/index.tsx @@ -180,10 +180,13 @@ const Selector = defineComponent({ } }; - const onInputChange = (event: { target: { value: any } }) => { - let { - target: { value }, - } = event; + const onInputChange = (e: Event | string) => { + let value; + if (typeof e === 'string') { + value = e; + } else { + value = (e.target as HTMLInputElement).value; + } // Pasted text should replace back to origin content if (props.tokenWithEnter && pastedText && /[\r\n]/.test(pastedText)) {