需要將一個value值前面加上key值,放進數組/對象中
this.$set(res.data[0],'type','1')
this.$set( target, key, value )
target:要更改的數據源(可以是對象或者數組)
key:要更改的具體數據
value :重新賦的值。
結果:res.data = {
? ? ? ??????????a:1,
? ? ? ? ????????b:? 2,
? ? ? ? ????????type : 1
????????}
將一些對象放入數組中
let arrlist = []
arrlist.push(this.frontfileList[0],this.afterfileList[0],this.appletfileList[0])
?