this.$nextTick(_ => {
this.$refs.saveTagInput.$refs.input.focus()
})
saveTagInput
input 文本输入框的 ref 引用对象
$nextTick
当页面上元素被重新渲染之后,才会指定回调函数中的代码
this.$nextTick(_ => {
this.$refs.saveTagInput.$refs.input.focus()
})
saveTagInput
input 文本输入框的 ref 引用对象
$nextTick
当页面上元素被重新渲染之后,才会指定回调函数中的代码