setSelf() { const arr: any = [] list?.forEach((item) => { const obj = { id: 1 } arr.push(obj) }) arr.push() return this.api?.set1Type(arr) // 调接口 }, setOut() { const obj = { id:1 } return this.api?.set2Type([obj]) // 调接口 }, onSubmit() { Promise.all([this.setSelf(), this.setOut()]).then((res) => { ElMessage({ type: 'success', message: 'xxxxxxx' }) }) }
标签:arr,axios,const,api,setSelf,接口,vue,obj From: https://www.cnblogs.com/cai-hua/p/17869270.html