From b7fd75f75a90425977aa449c02843c2cd14fb601 Mon Sep 17 00:00:00 2001 From: sleepyShen1989 <109908413+sleepyShen1989@users.noreply.github.com> Date: Wed, 1 Feb 2023 22:14:53 +0800 Subject: [PATCH] fix(components): [cascader] fix warning when clear (#11335) closed #11226 --- packages/components/cascader/src/cascader.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/components/cascader/src/cascader.ts b/packages/components/cascader/src/cascader.ts index e166cd2b29..bb408c4a2e 100644 --- a/packages/components/cascader/src/cascader.ts +++ b/packages/components/cascader/src/cascader.ts @@ -58,8 +58,8 @@ export const cascaderProps = buildProps({ }) export const cascaderEmits = { - [UPDATE_MODEL_EVENT]: (val: CascaderValue) => !!val, - [CHANGE_EVENT]: (val: CascaderValue) => !!val, + [UPDATE_MODEL_EVENT]: (val: CascaderValue) => !!val || val === null, + [CHANGE_EVENT]: (val: CascaderValue) => !!val || val === null, focus: (evt: FocusEvent) => evt instanceof FocusEvent, blur: (evt: FocusEvent) => evt instanceof FocusEvent, visibleChange: (val: boolean) => isBoolean(val),