<a-form-model
ref="ruleForm"
:model="dataSource[0]"
:rule="rule">
<a-table
:rowKey='(record,index)=>index'
:customRow="exitCustomRow"
:columns="columns"
:data-source="dataSource"
size="small">
<span slot="serialNumber" slot-scope="text,record,index">
{{index+1}}
</span>
<a-form-model-item
slot="newApartId"
slot-scope="text, record">
<a-input v-model="record.newApartId">
</a-input>
</a-form-model-item>
</a-table>
</a-form-model>
exitCustomRow(record, index) {
return {
on:{
click: event => {
console.log(index)
}
}
}
},
本来想着不断改变绑定的model做提示,但感觉这样的方法蠢,并且界面容易出错,请问各位大佬有什么结合的案例能给我参考一下吗