mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-21 23:40:39 +01:00
feat(Input/Textarea): allow specifying autofocus delay for page transitions (#816)
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
@@ -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, () => {
|
||||
|
||||
Reference in New Issue
Block a user