VUE脱坑/1-- 如何解决vue 赋值后原数据随赋值后的数据的变化而变化

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_39517820/article/details/83182080

错误示例

	  this.leftColumn = {...this.Columns};
      this.rightColumn =  {...this.Columns};

正确示例

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

猜你喜欢

转载自blog.csdn.net/qq_39517820/article/details/83182080