diff --git a/src/components/UploadFile.vue b/src/components/UploadFile.vue index a4e19fee..53a38fa2 100644 --- a/src/components/UploadFile.vue +++ b/src/components/UploadFile.vue @@ -173,7 +173,7 @@ export default { this.initFileList() this.visible = true }, - initFileList () { + async initFileList () { if (!this.fileIds) { return } @@ -184,12 +184,12 @@ export default { fileIdArr = this.fileIds.split(',') } const fileList = [] - fileIdArr.forEach(async id => { + for (const id of fileIdArr) { const fileInfo = await this.getFileInfoByFileId(id) if (fileInfo) { fileList.push(fileInfo) } - }) + } this.fileList = fileList console.log(this.fileList) },