Add a slot to the file-list

pull/21733/head
Joel Rodrigues 2022-03-03 16:15:54 +00:00 committed by GitHub
parent 473ef53f93
commit 516fe58bd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 14 deletions

View File

@ -270,22 +270,24 @@ export default {
if (this.showFileList) {
uploadList = (
<UploadList
disabled={this.uploadDisabled}
listType={this.listType}
files={this.uploadFiles}
on-remove={this.handleRemove}
handlePreview={this.onPreview}>
{
(props) => {
if (this.$scopedSlots.file) {
return this.$scopedSlots.file({
file: props.file
});
<slot :file-list="this.uploadFiles">
<UploadList
disabled={this.uploadDisabled}
listType={this.listType}
files={this.uploadFiles}
on-remove={this.handleRemove}
handlePreview={this.onPreview}>
{
(props) => {
if (this.$scopedSlots.file) {
return this.$scopedSlots.file({
file: props.file
});
}
}
}
}
</UploadList>
</UploadList>
</slot>
);
}