解决方法——
// this.editForm = this.list.datas[index] 原来的写法
this.editForm =JSON.parse(JSON.stringify(this.list.datas[index]))
深拷贝编辑表单
本文介绍了一种解决表单编辑中数据引用问题的方法,通过使用JSON深拷贝技术确保数据独立,避免了直接引用导致的数据同步错误。
解决方法——
// this.editForm = this.list.datas[index] 原来的写法
this.editForm =JSON.parse(JSON.stringify(this.list.datas[index]))
580
1万+
1396
1046

被折叠的 条评论
为什么被折叠?