From 1d0192813c74771cdaf3f665a460671311c1802c Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Wed, 20 Jan 2021 12:53:31 +0300 Subject: [PATCH] Fixed #821 - File Upload cant disable and hide Upload & Cancel --- src/components/fileupload/FileUpload.d.ts | 2 ++ src/components/fileupload/FileUpload.vue | 12 ++++++++++-- src/views/fileupload/FileUploadDoc.vue | 12 ++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/components/fileupload/FileUpload.d.ts b/src/components/fileupload/FileUpload.d.ts index ac9d26c4d..413634f66 100755 --- a/src/components/fileupload/FileUpload.d.ts +++ b/src/components/fileupload/FileUpload.d.ts @@ -18,6 +18,8 @@ declare class FileUpload extends Vue { uploadLabel?: string; cancelLabel?: string; customUpload?: boolean; + showUploadButton?: boolean; + showCancelButton?: boolean; $emit(eventName: 'select', e: { originalEvent: Event, files: any }): this; $emit(eventName: 'before-upload', e: { xhr: XMLHttpRequest, formData: any }): this; $emit(eventName: 'progress', e: { originalEvent: Event, progress: any }): this; diff --git a/src/components/fileupload/FileUpload.vue b/src/components/fileupload/FileUpload.vue index d45f04fe3..cc7c815ad 100755 --- a/src/components/fileupload/FileUpload.vue +++ b/src/components/fileupload/FileUpload.vue @@ -6,8 +6,8 @@ {{chooseButtonLabel}} - - + +
@@ -116,6 +116,14 @@ export default { customUpload: { type: Boolean, default: false + }, + showUploadButton: { + type: Boolean, + default: true + }, + showCancelButton: { + type: Boolean, + default: true } }, duplicateIEEvent: false, diff --git a/src/views/fileupload/FileUploadDoc.vue b/src/views/fileupload/FileUploadDoc.vue index a1028cc46..405dc45c0 100755 --- a/src/views/fileupload/FileUploadDoc.vue +++ b/src/views/fileupload/FileUploadDoc.vue @@ -215,6 +215,18 @@ myUploader(event) { false Whether to use the default upload or a manual implementation defined in uploadHandler callback. Defaults to PrimeVue Locale configuration. + + showUploadButton + boolean + true + Whether to show the upload button. + + + showCancelButton + boolean + true + Whether to show the cancel button. +