如何解决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));
———————————————— 

猜你喜欢

转载自www.cnblogs.com/mrt-yyy/p/11774757.html