如何解决vue 赋值后原数据随赋值后的数据的变化而变化

错误示例

this.leftColumn = {...this.Columns};
this.rightColumn = {...this.Columns};
1
2
正确示例

this.leftColumn = JSON.parse(JSON.stringify(this.Columns));
this.rightColumn = JSON.parse(JSON.stringify(this.Columns));
———————————————— 

posted @ 2019-11-01 00:24  mrt_yy  阅读(4294)  评论(0编辑  收藏  举报