Answers for "how to focus on input by ref vue"

1

vue js focus ref

<input type="text" ref="searchbar">

<script>
export default {
  mounted() {
    this.$refs.searchbar.$el.focus();
  }
};
</script>
Posted by: Guest on July-24-2020

Browse Popular Code Answers by Language