<div id="app">
<input type="text" ref="content" />
<button @click="getFocus">getFocus</button>
</div>
let app=new Vue({
el: "#app",
methods: {
getFocus: function(){
this.$refs.content.focus()
}
}
})
This Pen doesn't use any external CSS resources.