Optimized image loading

This commit is contained in:
jiangrui
2025-03-08 20:04:57 +08:00
parent 73440cca45
commit 0a9b053dff
2 changed files with 12 additions and 3 deletions

View File

@@ -12,7 +12,11 @@
<div class="detail-cover"> <div class="detail-cover">
<el-image <el-image
class="cover-image" class="cover-image"
:src="`/tele-images/?url=${encodeURIComponent(currentResource.image as string)}`" :src="
userStore.imagesSource === 'proxy'
? `/tele-images/?url=${encodeURIComponent(currentResource.image as string)}`
: currentResource.image
"
fit="cover" fit="cover"
/> />
<el-tag <el-tag
@@ -73,7 +77,7 @@
class="channel-logo" class="channel-logo"
scroll-container="#pc-resources-content" scroll-container="#pc-resources-content"
fit="cover" fit="cover"
lazy loading="lazy"
/> />
<span>{{ group.channelInfo.name }}</span> <span>{{ group.channelInfo.name }}</span>
<span class="item-count">({{ group.list.length }})</span> <span class="item-count">({{ group.list.length }})</span>
@@ -257,6 +261,7 @@ const handleLoadMore = (channelId: string) => {
border-radius: 50%; border-radius: 50%;
overflow: hidden; overflow: hidden;
box-shadow: var(--theme-shadow-sm); box-shadow: var(--theme-shadow-sm);
margin-right: 8px;
} }
.item-count { .item-count {

View File

@@ -22,7 +22,11 @@
" "
hide-on-click-modal hide-on-click-modal
:preview-src-list="[ :preview-src-list="[
`${location.origin}/tele-images/?url=${encodeURIComponent(row.image as string)}`, `${location.origin}${
userStore.imagesSource === 'proxy'
? '/tele-images/?url=' + encodeURIComponent(row.image as string)
: row.image
}`,
]" ]"
:zoom-rate="1.2" :zoom-rate="1.2"
:max-scale="7" :max-scale="7"