Skip to content

Commit

Permalink
fix: attachment list can't to display images with space path (halo-de…
Browse files Browse the repository at this point in the history
…v/console#474)

Signed-off-by: Ryan Wang <[email protected]>
  • Loading branch information
ruibaby authored Mar 1, 2022
1 parent 1313663 commit 7981b64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Attachment/AttachmentSelectModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/views/attachment/AttachmentList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
Expand Down

0 comments on commit 7981b64

Please sign in to comment.