动态添加输入框并获取焦点
注意一定要加 edit-render="{ autofocus: '.vxe-input--inner' }"
<vxe-table-column field="coption" title="选项" align="center"
:edit-render="{ autofocus: '.vxe-input--inner' }">
<template #edit="scope">
<vxe-input type="text" v-model="scope.row.coption" :disabled="formDisabled"
@change="$refs.xTable.updateStatus(scope)"></vxe-input>
</template>
</vxe-table-column>
const $table = this.$refs.xTable2
const record = {
serialNum: this.zm[this.tableData.length],
coption: '',
}
const { row: newRow } = await $table.insertAt(record, row)
await $table.setEditCell(newRow, 'coption')
this.tableData.push(newRow)