diff --git a/api-generator/components/fileupload.js b/api-generator/components/fileupload.js index 72986a9f6..93902dd0d 100644 --- a/api-generator/components/fileupload.js +++ b/api-generator/components/fileupload.js @@ -279,6 +279,18 @@ const FileUploadSlots = [ { name: 'empty', description: 'Custom content when there is no selected file' + }, + { + name: 'chooseicon', + description: 'Custom choose icon template.' + }, + { + name: 'uploadicon', + description: 'Custom upload icon template.' + }, + { + name: 'cancelicon', + description: 'Custom cancel icon template.' } ]; diff --git a/components/lib/fileupload/FileUpload.d.ts b/components/lib/fileupload/FileUpload.d.ts index 561b7efbd..f6dc60d96 100755 --- a/components/lib/fileupload/FileUpload.d.ts +++ b/components/lib/fileupload/FileUpload.d.ts @@ -236,17 +236,14 @@ export interface FileUploadProps { showCancelButton?: boolean | undefined; /** * Icon of the choose button. - * @defaultValue pi pi-fw pi-plus */ chooseIcon?: string | undefined; /** * Icon of the upload button. - * @defaultValue pi pi-fw pi-upload */ uploadIcon?: string | undefined; /** * Icon of the cancel button. - * @defaultValue pi pi-fw pi-times */ cancelIcon?: string | undefined; /** @@ -321,6 +318,18 @@ export interface FileUploadSlots { * Custom content when there is no selected file. */ empty(): VNode[]; + /** + * Custom choose icon template. + */ + chooseicon(): VNode[]; + /** + * Custom upload icon template. + */ + uploadicon(): VNode[]; + /** + * Custom cancel icon template. + */ + cancelicon(): VNode[]; } export interface FileUploadEmits { diff --git a/components/lib/fileupload/FileUpload.vue b/components/lib/fileupload/FileUpload.vue index 9f180880f..713573e94 100755 --- a/components/lib/fileupload/FileUpload.vue +++ b/components/lib/fileupload/FileUpload.vue @@ -4,11 +4,25 @@