From 3a762a34ea30d9b396166493bc457d85cfb633c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Thu, 15 Sep 2022 12:16:47 +0300 Subject: [PATCH] Fixed #2974 - FileUpload | new content slot --- api-generator/components/fileupload.js | 6 +++++- src/components/fileupload/FileUpload.d.ts | 6 +++++- src/components/fileupload/FileUpload.vue | 7 +++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/api-generator/components/fileupload.js b/api-generator/components/fileupload.js index 72986a9f62..034a4fea3d 100644 --- a/api-generator/components/fileupload.js +++ b/api-generator/components/fileupload.js @@ -276,9 +276,13 @@ const FileUploadEvents = [ ]; const FileUploadSlots = [ + { + name: 'content', + description: 'Custom uploaded content template.' + }, { name: 'empty', - description: 'Custom content when there is no selected file' + description: 'Custom content when there is no selected file.' } ]; diff --git a/src/components/fileupload/FileUpload.d.ts b/src/components/fileupload/FileUpload.d.ts index 8e3e4e105d..023dc419ad 100755 --- a/src/components/fileupload/FileUpload.d.ts +++ b/src/components/fileupload/FileUpload.d.ts @@ -202,7 +202,11 @@ export interface FileUploadProps { export interface FileUploadSlots { /** - * Custom empty template. + * Custom uploaded content template. + */ + content: () => VNode[]; + /** + * Custom content when there is no selected file. */ empty: () => VNode[]; } diff --git a/src/components/fileupload/FileUpload.vue b/src/components/fileupload/FileUpload.vue index e842971c7d..357018ec5a 100755 --- a/src/components/fileupload/FileUpload.vue +++ b/src/components/fileupload/FileUpload.vue @@ -24,6 +24,9 @@ +
+ +
@@ -41,10 +44,10 @@