给每页添加页数下标,防止因为乱序加载导致分不清页数(同步更新)

This commit is contained in:
chuzhongzai 2023-12-28 10:58:36 +08:00
parent 61c4dbc8e8
commit 75d5b7ec67

View File

@ -78,17 +78,22 @@ function set_current_page(page){
</script>
<template>
<el-dialog v-model="isShowUp" @close="closeDialog" width="100%" top="0" fullscreen >
<el-dialog v-model="isShowUp" @close="closeDialog" width="100%" top="0" fullscreen>
<template #header style="padding-bottom: 0">
在线预览: {{readingGallery.name}} 页数{{readingGallery.pages}}<br>
在线预览: {{readingGallery.name}}<br>
页数{{readingGallery.pages}}<br>
<div style="font-size: 3vh; display: inline" v-if="max > 0">
{{ index + 1 }} - {{ (index) * lengthPerPage + 1 }} ~
{{ (index + 1) * lengthPerPage + 1 > readingGallery.images.length ? readingGallery.images.length : (index + 1) * lengthPerPage }}
</div>
</template>
<el-scrollbar height="75vh" ref="onlineReadingScrollbar">
<el-image v-for="(link, i) in links" :src="link" :style="{'width': 'auto', 'text-align': 'center', 'background-color': 'ghostwhite'}"
:preview-src-list="links" :initial-index="i" @switch="switch_page" @show="set_current_page(i)" loading="lazy"/>
<div v-for="(link, i) in links" style="display: inline-block; text-align: center">
<el-image :src="link" :style="{'width': 'auto', 'text-align': 'center', 'background-color': 'ghostwhite'}"
:preview-src-list="links" :initial-index="i" @switch="switch_page" @show="set_current_page(i)" loading="lazy"/> <br>
{{lengthPerPage * index + i + 1}}
</div>
</el-scrollbar>
<!--五页以下-->