How vue circulates to assign values to objects
This article mainly introduces "how vue circulates to assign values to objects". In daily operation, I believe that many people have doubts about how vue circulates to assign values to objects. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts of "how vue circulates to assign values to objects". Next, please follow the editor to study!
Loop assigns a value to the object async submitForm () {var that = this that.allPersonList = [] / / Array of outgoing information / / loop to get A0000 for (var I = 0; I)
< that.personList.length; i++) {//循环拿到传过来的对象集合 personList[{},{},.......] // 出库信息 const newOut = { // 关键! 创建一个新对象 A0000: that.personList[i].a0000, // 将循环拿到的属性循环赋值给newOut.A0000 AG8700: that.getUuid(), AG8701: this.outWareList[0], AG8702: this.outWare.AG8702 } that.allPersonList.push(newOut)// 循环赋值好的对象 push到 集合中 } alert(JSON.stringify(that.allPersonList))--------->Printed data format:
Assign a known array loop to another array
The known array is as follows:
CurrentGood: [{name:'Da',ids:'aaa',pp:'123'}, {name:'Cc',ids:'bbb',pp:'456'}, {name:'Vv',ids:'ccc',pp:'789'}]
Set another array to modeDetail []
For (let iTuno Bandi)