Vue JS Focus ref
<input type="text" ref="searchbar">
<script>
export default {
mounted() {
this.$refs.searchbar.$el.focus();
}
};
</script>
garzj
<input type="text" ref="searchbar">
<script>
export default {
mounted() {
this.$refs.searchbar.$el.focus();
}
};
</script>