Fix/upload: fix two bug (#927)

* fix(upload): fix picture not show without slot

* fix(upload): fix fileList not work
This commit is contained in:
Ryan2128 2020-12-10 11:05:13 +08:00 committed by GitHub
parent c7d185c6a2
commit 5fa80d3c5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View File

@ -190,16 +190,13 @@ export default defineComponent({
onRemove: this.handleRemove,
handlePreview: this.onPreview,
},
{
this.$slots.file ? {
default: (props: { file: UploadFile; }) => {
if (this.$slots.file) {
return this.$slots.file({
file: props.file,
})
}
return null
return this.$slots.file({
file: props.file,
})
},
},
} : null,
)
} else {
uploadList = null

View File

@ -135,6 +135,7 @@ export default (props: IUseHandlersProps) => {
})
}, {
immediate: true,
deep: true,
})
return {