Fixed #585 - FileUpload Preview columns become misaligned when both image and non-image files are uploaded

pull/682/head
Cagatay Civici 2020-11-25 17:41:30 +03:00
parent 04bdc70afc
commit c108bb9b87
1 changed files with 2 additions and 2 deletions

View File

@ -14,8 +14,8 @@
<FileUploadMessage v-for="msg of messages" severity="error" :key="msg">{{msg}}</FileUploadMessage>
<div class="p-fileupload-files" v-if="hasFiles">
<div class="p-fileupload-row" v-for="(file, index) of files" :key="file.name + file.type + file.size">
<div v-if="isImage(file)">
<img role="presentation" :alt="file.name" :src="file.objectURL" :width="previewWidth" />
<div>
<img v-if="isImage(file)" role="presentation" :alt="file.name" :src="file.objectURL" :width="previewWidth" />
</div>
<div>{{file.name}}</div>
<div>{{formatSize(file.size)}}</div>