vue编辑当行数据,弹窗赋值

编辑如下

...
@click="handleEdit(scope.$index, scope.row)">编辑</el-button>
...

 使用 Object.assign 来传值,如果直接用

this.editForm=row
来传值,则编辑的时候会影响当行显示
//编辑
      handleEdit: function (index, row) {
        this.editFormVisible = true;//dialog对话窗口打开
        this.editForm = Object.assign({}, row);//将数据传入dialog页面
        this.editForm.index=index;//传递当前index
      }

参考;https://blog.csdn.net/weixin_42648692/article/details/103005916

原文地址:https://www.cnblogs.com/xiaoliu66007/p/13305077.html