鍍金池/ 問答/HTML/ 為什么我給iview的table組件綁定的數(shù)據(jù)中把_expanded設(shè)為true

為什么我給iview的table組件綁定的數(shù)據(jù)中把_expanded設(shè)為true會(huì)報(bào)錯(cuò)

為什么我給iview的table組件綁定的數(shù)據(jù)中把_expanded設(shè)為true會(huì)報(bào)錯(cuò)
let tempData = response.data.data;

    for (let i = 0; i < tempData.length; i++) {
      tempData[i].date = tempData[i].list[0].borrow_date.substring(0, 7);
      tempData[i]._expanded = true;
    }
    _this.data1 = tempData;
    

clipboard.png

回答
編輯回答
誮惜顏

_this.data1 = tempData.map(item=>{

    item._expanded=true;return item;
})
2017年9月11日 11:48