fix(upload): accept file.thumbnailUrl (#3216)

This commit is contained in:
VincentFong 2022-07-04 00:56:40 +08:00 committed by GitHub
parent 9120cbf20d
commit 4207226c1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -228,7 +228,8 @@ export default defineComponent({
{{ default: () => documentIcon }}
</NBaseIcon>
</span>
) : (file.url || this.thumbnailUrl) && file.status !== 'error' ? (
) : (file.url || this.thumbnailUrl || file.thumbnailUrl) &&
file.status !== 'error' ? (
<a
rel="noopener noreferer"
target="_blank"
@ -254,13 +255,13 @@ export default defineComponent({
/>
)}
</a>
) : (
) : (
<span class={`${clsPrefix}-upload-file-info__thumbnail`}>
<NBaseIcon clsPrefix={clsPrefix}>
{{ default: () => imageIcon }}
</NBaseIcon>
</span>
)
)
} else {
icon = (
<span class={`${clsPrefix}-upload-file-info__thumbnail`}>