chore(Textarea): clean

This commit is contained in:
Benjamin Canac
2024-03-22 18:30:11 +01:00
parent 03fb75f256
commit afc270589c

View File

@@ -28,6 +28,7 @@ export interface TextareaProps {
autoresize?: boolean
ui?: Partial<typeof textarea.slots>
}
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<HTMLTextAreaElement | null>(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)
})