Browse Source
Merge pull request #207 from colinin/4.2
Multiple clicks are not allowed to download
pull/252/head
cKey
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
0 deletions
-
vueJs/src/views/file-management/components/FileDownloadForm.vue
|
|
|
@ -44,6 +44,7 @@ |
|
|
|
size="mini" |
|
|
|
type="success" |
|
|
|
icon="el-icon-caret-right" |
|
|
|
:disabled="row.downloading" |
|
|
|
@click="handleDownloadFile(row)" |
|
|
|
> |
|
|
|
{{ $t('fileSystem.begin') }} |
|
|
|
@ -74,6 +75,7 @@ export class FileInfo { |
|
|
|
pause!: boolean |
|
|
|
blobs = new Array<BlobPart>() |
|
|
|
type!: string |
|
|
|
downloading!: boolean |
|
|
|
} |
|
|
|
|
|
|
|
@Component({ |
|
|
|
@ -106,12 +108,14 @@ export default class FileDownloadForm extends Vue { |
|
|
|
|
|
|
|
private handleRemoveFile(fileInfo: FileInfo) { |
|
|
|
fileInfo.pause = true |
|
|
|
fileInfo.downloading = false |
|
|
|
fileInfo.blobs.length = 0 |
|
|
|
this.$emit('onFileRemoved', fileInfo) |
|
|
|
} |
|
|
|
|
|
|
|
private handleDownloadFile(fileInfo: FileInfo) { |
|
|
|
fileInfo.pause = false |
|
|
|
fileInfo.downloading = true |
|
|
|
if (fileInfo.progress >= 100) { |
|
|
|
this.downloadBlob(fileInfo) |
|
|
|
} else { |
|
|
|
|