如图,表格中的红色输入框触发事件(这里用的是回车事件)时,绿色输入框获得焦点。
<el-table-column
:show-overflow-tooltip="true"
:label="$t("table.registerInOut.tag")"
prop="tag"
align="center"
width="180px"
>
<template slot-scope="scope">
<el-input
:disabled="scope.row.disabled"
placeholder="扫描或输入编号"
v-model="scope.row.tag"
@keyup.enter.native="addAnswer(scope.row)"
auto-complete="off"
/>
</template>
</el-table-column>
this.$refs[index].onEnter = () => {
}