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

Posted xiaoliu66007

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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

 

以上是关于vue编辑当行数据,弹窗赋值的主要内容,如果未能解决你的问题,请参考以下文章