VUE脫坑/1-- 如何解決vue 賦值後原數據隨賦值後的數據的變化而變化

錯誤示例

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

正確示例

	  this.leftColumn = JSON.parse(JSON.stringify(this.Columns));
      this.rightColumn = JSON.parse(JSON.stringify(this.Columns));
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章