项目例子:
async focusInput (index) {
await this.$nextTick(() => {
let el = this.$refs[`scopeInput-${index}`].$el
let input = el.querySelector('.el-input__inner')
input.focus()
})
},
<el-input
@blur="blurInput"
@keyup.native="enterInput"
:ref="`scopeInput-${scope.$index}`"
v-model="coursePrice"
size="small">
</el-input>