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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM