mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
chore(Input/InputNumber/PinInput/Textarea): clean functions order
This commit is contained in:
@@ -78,12 +78,6 @@ const ui = computed(() => pinInput({
|
||||
|
||||
const inputsRef = ref<ComponentPublicInstance[]>([])
|
||||
|
||||
function autoFocus() {
|
||||
if (props.autofocus) {
|
||||
inputsRef.value[0]?.$el?.focus()
|
||||
}
|
||||
}
|
||||
|
||||
const completed = ref(false)
|
||||
function onComplete(value: string[]) {
|
||||
// @ts-expect-error - 'target' does not exist in type 'EventInit'
|
||||
@@ -99,15 +93,21 @@ function onBlur(event: FocusEvent) {
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
inputsRef
|
||||
})
|
||||
function autoFocus() {
|
||||
if (props.autofocus) {
|
||||
inputsRef.value[0]?.$el?.focus()
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
setTimeout(() => {
|
||||
autoFocus()
|
||||
}, props.autofocusDelay)
|
||||
})
|
||||
|
||||
defineExpose({
|
||||
inputsRef
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user