From 60ad8c2bf94a5f683f483b1f8193ae7b4f6627f3 Mon Sep 17 00:00:00 2001 From: ajaxzheng <894103554@qq.com> Date: Fri, 15 Nov 2024 17:58:40 +0800 Subject: [PATCH] fix(input): [input] fixed the error when using v-if to switch back and forth after configuring the displayOnly attribute (#2527) --- packages/renderless/src/input/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/renderless/src/input/index.ts b/packages/renderless/src/input/index.ts index 4fc2c075fe..71ec49a1cc 100644 --- a/packages/renderless/src/input/index.ts +++ b/packages/renderless/src/input/index.ts @@ -270,7 +270,7 @@ export const resizeTextarea = const { autosize, type } = parent - if (type !== 'textarea') { + if (type !== 'textarea' || !vm.$refs.textarea) { return }