diff --git a/build/tools/gulp/tasks/publish.ts b/build/tools/gulp/tasks/publish.ts index f4ac795ec..df8429acf 100644 --- a/build/tools/gulp/tasks/publish.ts +++ b/build/tools/gulp/tasks/publish.ts @@ -74,11 +74,14 @@ async function publishAll() { process.exit(1); } _npmInstall('normal'); + argv.tag = 'latest'; error = await runTasks(['publish:jigsaw', 'publish:formly']); if (error) { process.exit(1); } + argv.nextVersion = argv.nextVersion + '-g1'; + argv.tag = 'governance'; _npmInstall('governance'); error = await runTasks(['publish:governance:jigsaw', 'publish:governance:formly']); if (error) { diff --git a/package-lock.json b/package-lock.json index 65fa6114b..d0653c042 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19485,9 +19485,9 @@ } }, "ws": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", - "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.3.tgz", + "integrity": "sha512-jmTjYU0j60B+vHey6TfR3Z7RD61z/hmxBS3VMSGIrroOWXQEneK1zNuotOUrGyBHQj0yrpsLHPWtigEFd13ndA==", "dev": true, "requires": { "async-limiter": "~1.0.0" diff --git a/src/jigsaw/common/directive/upload/upload.directive.ts b/src/jigsaw/common/directive/upload/upload.directive.ts index 19bb0e42c..0ac41a812 100644 --- a/src/jigsaw/common/directive/upload/upload.directive.ts +++ b/src/jigsaw/common/directive/upload/upload.directive.ts @@ -361,6 +361,8 @@ export class JigsawUploadDirective extends JigsawUploadBase implements IUploader if (fileInfo.files) { // 把多个file凑成一个formData this.files.filter(file => file.url == "").forEach((item: any) => updateState(item)); + fileInfo.name = 'multiple-files-combined'; + fileInfo.state = 'loading'; fileInfo.files.forEach(file => formData.append(this.contentField, file, file.name)); this._appendAdditionalFields(formData, 'multiple-files-combined'); } else { @@ -391,14 +393,14 @@ export class JigsawUploadDirective extends JigsawUploadBase implements IUploader this._statusLog(fileInfo, this._translateService.instant(`upload.done`)); } if (fileInfo.files) { - this.files.forEach(item => { + this.files.filter(file => file.url == "").forEach(item => { update(item); item.progress = 100; }); - } else { - update(fileInfo); - this._afterCurFileUploaded(fileInfo); + fileInfo.name = "multiple-files-combined"; } + update(fileInfo); + this._afterCurFileUploaded(fileInfo); }, (e) => { const update = (fileInfo: UploadFileInfo) => { fileInfo.state = 'error'; @@ -408,7 +410,7 @@ export class JigsawUploadDirective extends JigsawUploadBase implements IUploader const message = this._translateService.instant(`upload.${e.statusText}`) || e.statusText; if (this.batchMode) { this.files.filter(file => file.url == "").forEach((item: any) => update(item)); - return; + fileInfo.name = "multiple-files-combined"; } update(fileInfo); this._afterCurFileUploaded(fileInfo); @@ -449,10 +451,13 @@ export class JigsawUploadDirective extends JigsawUploadBase implements IUploader return; } - const waitingFile = this.files.find(f => f.state == 'pause'); - if (waitingFile) { - this._sequenceUpload(waitingFile) - } else if (this._isAllFilesUploaded()) { + if (!this.batchMode) { + const waitingFile = this.files.find(f => f.state == 'pause'); + if (waitingFile) { + this._sequenceUpload(waitingFile) + } + } + if (this._isAllFilesUploaded()) { this.complete.emit(this.files); } this._cdr.markForCheck();