...{cityCode:this.curCity}state.chartData = {...state.chartData,...val}
1 回答

月關(guān)寶盒
TA貢獻1772條經(jīng)驗 獲得超5個贊
ES6擴展運算符。它好比 rest 參數(shù)的逆運算,將一個數(shù)組轉(zhuǎn)為用逗號分隔的參數(shù)序列。 console.log(1, [2, 3, 4], 5) console.log(1, ...[2, 3, 4], 5) array.push(...[2, 3, 4]); Math.max(...[14, 3, 77]) 可以試試
添加回答
舉報
0/150
提交
取消