Merge pull request 'feat: 修改加载问题' (#240) from fix/updatesyspic into test

Reviewed-on: #240
pull/241/head
yaoshuli 1 year ago
commit 838552242c

@ -117,19 +117,19 @@ const layout = debounce(() => {
}) })
loading.value = false loading.value = false
// //
// _imagesload = imagesloaded('.grid-item') _imagesload = imagesloaded('.grid-item')
// _imagesload.on('done', (instance) => { _imagesload.on('done', (instance) => {
// (_masonry as any).layout() (_masonry as any).layout()
// if (!el.value) if (!el.value)
// return return
// loading.value = false loading.value = false
// }) })
// _imagesload.on('fail', (instance) => { _imagesload.on('fail', (instance) => {
// message.error('') message.error('图片错误')
// loading.value = false loading.value = false
// }) })
}, 300) }, 300)
useInfiniteScroll( useInfiniteScroll(
@ -144,7 +144,7 @@ onUpdated(() => {
nextTick(() => { nextTick(() => {
setTimeout(() => { setTimeout(() => {
layout() layout()
}, 2000) }, 50)
}) })
}) })
@ -739,19 +739,8 @@ defineExpose({
:preview-src="item.imgUrl" :preview-src="item.imgUrl"
:src="item.thumburl" :src="item.thumburl"
:fallback-src="bgLoadingImg" :fallback-src="bgLoadingImg"
style="display: none" :style="{ backgroundImage: `url(${loading ? bgLoadingImg : 'none'})` }"
/> />
<img
v-lazy="item.thumburl" class="img" :class="{
'img-fit': viewMode === 'horizontalVersion',
'img-full': viewMode === '3:4' || viewMode === 'verticalVersion',
}" alt="" @click="
($event) => {
previewHandler(index, $event);
hideDownload($event);
}
"
>
<img <img
v-if="item.states == 3" v-if="item.states == 3"
class="tag-status" class="tag-status"

Loading…
Cancel
Save