Browse Source

fix: attachment list can't to display images with space path (#474)

Signed-off-by: Ryan Wang <i@ryanc.cc>
pull/475/head
Ryan Wang 3 years ago committed by GitHub
parent
commit
0f5875168d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/components/Attachment/AttachmentSelectModal.vue
  2. 2
      src/views/attachment/AttachmentList.vue

2
src/components/Attachment/AttachmentSelectModal.vue

@ -72,7 +72,7 @@
<span v-if="!isImage(item)" class="attachments-group-item-type">{{ item.suffix }}</span>
<span
v-else
:style="`background-image:url(${item.thumbPath})`"
:style="`background-image:url(${encodeURI(item.thumbPath)})`"
class="attachments-group-item-img"
loading="lazy"
/>

2
src/views/attachment/AttachmentList.vue

@ -85,7 +85,7 @@
<span v-if="!isImage(item)" class="attachments-group-item-type">{{ item.suffix }}</span>
<span
v-else
:style="`background-image:url(${item.thumbPath})`"
:style="`background-image:url(${encodeURI(item.thumbPath)})`"
class="attachments-group-item-img"
loading="lazy"
/>

Loading…
Cancel
Save