mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-23 08:20:39 +01:00
chore(Textarea): clean
This commit is contained in:
@@ -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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user