mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-21 07:21:46 +01:00
feat(Input/Textarea): expose ref
This commit is contained in:
@@ -133,6 +133,10 @@ function onBlur(event: FocusEvent) {
|
||||
emits('blur', event)
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
inputRef
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
setTimeout(() => {
|
||||
autoFocus()
|
||||
|
||||
@@ -228,6 +228,10 @@ function onUpdateOpen(value: boolean) {
|
||||
emits('focus', event)
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
inputRef
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -151,6 +151,10 @@ watch(() => modelValue, () => {
|
||||
nextTick(autoResize)
|
||||
})
|
||||
|
||||
defineExpose({
|
||||
textareaRef
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
setTimeout(() => {
|
||||
autoResize()
|
||||
|
||||
Reference in New Issue
Block a user