From 832d187eb555736f3fc0decf327c0972c56f7a53 Mon Sep 17 00:00:00 2001 From: ajaxzheng <894103554@qq.com> Date: Fri, 15 Nov 2024 17:20:46 +0800 Subject: [PATCH] fix(input): [input] fixed the error when using v-if to switch back and forth after configuring the displayOnly attribute --- 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 }