fix: the attachment list image is not updated after paging (#496)

Signed-off-by: Ryan Wang <i@ryanc.cc>
pull/497/head
Ryan Wang 2022-03-09 20:29:35 +08:00 committed by GitHub
parent 0faacf4d82
commit af36295abd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 15 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(${encodeURI(item.thumbPath)})`"
:style="{ backgroundImage: `url('${encodeURI(item.thumbPath)}')` }"
class="attachments-group-item-img"
loading="lazy"
/>

View File

@ -71,10 +71,10 @@
>
<template #renderItem="item, index">
<a-list-item
@mouseenter="$set(item, 'hover', true)"
@mouseleave="$set(item, 'hover', false)"
:key="index"
@click="handleItemClick(item)"
@mouseenter="$set(item, 'hover', true)"
@mouseleave="$set(item, 'hover', false)"
@contextmenu.prevent="handleContextMenu($event, item)"
>
<div
@ -85,7 +85,7 @@
<span v-if="!isImage(item)" class="attachments-group-item-type">{{ item.suffix }}</span>
<span
v-else
:style="`background-image:url(${encodeURI(item.thumbPath)})`"
:style="{ backgroundImage: `url('${encodeURI(item.thumbPath)}')` }"
class="attachments-group-item-img"
loading="lazy"
/>
@ -99,26 +99,26 @@
</a-card-meta>
<a-icon
v-show="!isItemSelect(item) && item.hover"
type="plus-circle"
theme="twoTone"
class="absolute top-1 right-2 font-bold cursor-pointer transition-all"
:style="{ fontSize: '18px', color: 'rgb(37 99 235)' }"
class="absolute top-1 right-2 font-bold cursor-pointer transition-all"
theme="twoTone"
type="plus-circle"
@click.stop="handleSelect(item)"
/>
<a-icon
v-show="isItemSelect(item)"
type="check-circle"
theme="twoTone"
class="absolute top-1 right-2 font-bold cursor-pointer transition-all"
:style="{ fontSize: '18px', color: 'rgb(37 99 235)' }"
class="absolute top-1 right-2 font-bold cursor-pointer transition-all"
theme="twoTone"
type="check-circle"
/>
<a-icon
v-show="item.hover && list.selected.length > 0"
type="profile"
theme="twoTone"
class="absolute top-1 left-2 font-bold cursor-pointer transition-all"
@click.stop="handleOpenDetail(item)"
:style="{ fontSize: '18px' }"
class="absolute top-1 left-2 font-bold cursor-pointer transition-all"
theme="twoTone"
type="profile"
@click.stop="handleOpenDetail(item)"
/>
</div>
</a-list-item>

View File

@ -77,7 +77,7 @@
>
<div class="photo-thumb photos-group-item">
<span
:style="`background-image:url(${encodeURI(item.thumbnail)})`"
:style="{ backgroundImage: `url('${encodeURI(item.thumbnail)}')` }"
class="photos-group-item-img"
loading="lazy"
/>