diff --git a/src/runtime/components/forms/Input.vue b/src/runtime/components/forms/Input.vue index 537de062e6..fdaadad942 100644 --- a/src/runtime/components/forms/Input.vue +++ b/src/runtime/components/forms/Input.vue @@ -85,6 +85,10 @@ export default defineComponent({ type: Boolean, default: false }, + autofocusDelay: { + type: Number, + default: 100, + }, icon: { type: String, default: null @@ -181,7 +185,7 @@ export default defineComponent({ onMounted(() => { setTimeout(() => { autoFocus() - }, 100) + }, props.autofocusDelay) }) const inputClass = computed(() => { diff --git a/src/runtime/components/forms/Textarea.vue b/src/runtime/components/forms/Textarea.vue index ec2cff9726..54cc838b64 100644 --- a/src/runtime/components/forms/Textarea.vue +++ b/src/runtime/components/forms/Textarea.vue @@ -72,6 +72,10 @@ export default defineComponent({ type: Boolean, default: false }, + autofocusDelay: { + type: Number, + default: 100 + }, resize: { type: Boolean, default: false @@ -168,7 +172,7 @@ export default defineComponent({ onMounted(() => { setTimeout(() => { autoFocus() - }, 100) + }, props.autofocusDelay) }) watch(() => props.modelValue, () => {