问题描述
现在有一个需求,前端动态修改表格中的一些数据,希望数据源变化的同时,表格也可以实时刷新状态。
请问有遇到这种需求并且有方法解决的吗?
补充:
再把场景问题说的再具体点,我现在需要在table中
label="设置标签"
align="center">
{ {scope.row.restaurantTagTypes[0].restaurantTagText}}
{ {scope.row.restaurantTagTypes[1].restaurantTagText}}
实现方法
changeStatus1(index, row) {
console.log('row---', JSON.stringify(row.restaurantTagTypes))
console.log('111-----' + JSON.stringify(this.tableData[index].restaurantTagTypes))
if (row.restaurantTagTypes[0].checked === true) {
console.log('true')
this.tableData[index].restaurantTagTypes[0].status = 0
this.tableData[index].restaurantTagTypes[0].checked = false
} else {
console.log('false