forked from platypush/platypush
Focus the <input> element when a <NameEditor> element is created.
This commit is contained in:
parent
dd80dc998c
commit
f49b866a51
1 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<form @submit.prevent="submit" class="name-editor">
|
<form @submit.prevent="submit" class="name-editor">
|
||||||
<input type="text" v-model="text" :disabled="disabled">
|
<input type="text" v-model="text" :disabled="disabled" ref="input">
|
||||||
<button type="submit">
|
<button type="submit">
|
||||||
<i class="fas fa-circle-check" />
|
<i class="fas fa-circle-check" />
|
||||||
</button>
|
</button>
|
||||||
|
@ -21,7 +21,7 @@ export default {
|
||||||
|
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
deafult: false,
|
default: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ export default {
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.text = this.value
|
this.text = this.value
|
||||||
|
this.$refs.input.focus()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue