diff --git a/src/input/input.tsx b/src/input/input.tsx index 765583f7f..ff15bd50c 100644 --- a/src/input/input.tsx +++ b/src/input/input.tsx @@ -141,13 +141,13 @@ export default defineComponent({ nextTick(() => { setInputValue(innerValue.value); props.onBlur?.(innerValue.value, { e }); - formItem.handleBlur(); + formItem?.handleBlur(); }); return; } props.onBlur?.(innerValue.value, { e }); - formItem.handleBlur(); + formItem?.handleBlur(); }; const handleCompositionend = (e: CompositionEvent) => { diff --git a/src/textarea/textarea.tsx b/src/textarea/textarea.tsx index fc5c6e7fd..53188ffcf 100644 --- a/src/textarea/textarea.tsx +++ b/src/textarea/textarea.tsx @@ -109,7 +109,7 @@ export default defineComponent({ props.onFocus?.(innerValue.value, { e }); }; const handleBlur = (e: FocusEvent) => { - formItem.handleBlur(); + formItem?.handleBlur(); props.onBlur?.(innerValue.value, { e }); };