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 2022-03-01 15:37:08 +08:00 committed by GitHub
parent a58d933200
commit 0f5875168d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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"
/>

View File

@ -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"
/>