From 414e7a1c56455017dbc3780ce7b1b4abd0f1c4d7 Mon Sep 17 00:00:00 2001 From: bqy_fe <1743369777@qq.com> Date: Sun, 20 Mar 2022 10:50:57 +0800 Subject: [PATCH] fix: autocomplete custom children class not work * refactor(v3/vc-selector/input): use composition api * fix: change input props className to class * revert with cloneElement * fix: auto-complete demo custom test --- components/_util/EventInterface.ts | 4 + .../__tests__/__snapshots__/demo.test.js.snap | 2 +- components/vc-select/Selector/Input.tsx | 315 +++++++++--------- 3 files changed, 155 insertions(+), 166 deletions(-) diff --git a/components/_util/EventInterface.ts b/components/_util/EventInterface.ts index 7d6f193c98..f8990a0466 100644 --- a/components/_util/EventInterface.ts +++ b/components/_util/EventInterface.ts @@ -1,6 +1,10 @@ export type FocusEventHandler = (e: FocusEvent) => void; export type MouseEventHandler = (e: MouseEvent) => void; export type KeyboardEventHandler = (e: KeyboardEvent) => void; +export type CompositionEventHandler = (e: CompositionEvent) => void; +export type ClipboardEventHandler = (e: ClipboardEvent) => void; +export type ChangeEventHandler = (e: ChangeEvent) => void; + export type ChangeEvent = Event & { target: { value?: string | undefined; diff --git a/components/auto-complete/__tests__/__snapshots__/demo.test.js.snap b/components/auto-complete/__tests__/__snapshots__/demo.test.js.snap index 878cf2ec9b..144a17df31 100644 --- a/components/auto-complete/__tests__/__snapshots__/demo.test.js.snap +++ b/components/auto-complete/__tests__/__snapshots__/demo.test.js.snap @@ -30,7 +30,7 @@ exports[`renders ./components/auto-complete/demo/custom.vue correctly 1`] = `