From afc270589c34b818284007279e8f6529f7c692c5 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Fri, 22 Mar 2024 18:30:11 +0100 Subject: [PATCH] chore(Textarea): clean --- src/runtime/components/Textarea.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/runtime/components/Textarea.vue b/src/runtime/components/Textarea.vue index d9ef06d5..c55b40e8 100644 --- a/src/runtime/components/Textarea.vue +++ b/src/runtime/components/Textarea.vue @@ -28,6 +28,7 @@ export interface TextareaProps { autoresize?: boolean ui?: Partial } + export interface TextareaEmits { (e: 'blur', event: FocusEvent): void } @@ -62,7 +63,6 @@ const ui = computed(() => tv({ extend: textarea, slots: props.ui })({ size: size?.value })) - const inputRef = ref(null) function autoFocus () { @@ -117,7 +117,7 @@ onMounted(() => { }, props.autofocusDelay) }) -const autoResize = () => { +function autoResize () { if (props.autoresize) { if (!inputRef.value) { @@ -140,7 +140,6 @@ const autoResize = () => { } } - watch(() => modelValue, () => { nextTick(autoResize) })