优化部分细节(同步更新)

This commit is contained in:
chuzhongzai 2023-08-05 21:53:39 +08:00
parent 4f87b7178e
commit 925f952748
3 changed files with 6 additions and 7 deletions

View File

@ -81,7 +81,7 @@
</tr>
</el-dialog>
<HentaiSearch :is-querying="isQuerying" @close="closeQueryPanel"></HentaiSearch>
<HentaiSearch :is-querying="isQuerying" @close="isQuerying = false"></HentaiSearch>
<el-dialog title="修改授权码" v-model="isAlterAuthCode" width="100%">
<el-form>
@ -386,9 +386,6 @@ function resetLocalQuery(){
store.commit("_searchLocalByTag", [''])
param.value = ""
}
function closeQueryPanel(){
isQuerying.value = false
}
//
function deleteGallery(){

View File

@ -2,6 +2,7 @@
import {computed, ref, watch} from "vue";
import store from "../store/index.js";
let props = defineProps(['currentGallery', 'isOnlineReading'])
let emit = defineEmits(['close'])
let isShowUp = ref()
let onlineReadingScrollbar = ref()
let links = ref()
@ -32,7 +33,7 @@ function alterPage(){
//
function jump(targetIndex){
links.value = props.currentLinks.slice(targetIndex * lengthPerPage.value, (targetIndex + 1) * lengthPerPage.value)
links.value = props.currentGallery.images.slice(targetIndex * lengthPerPage.value, (targetIndex + 1) * lengthPerPage.value)
index.value = targetIndex
temp_index.value = targetIndex + 1
onlineReadingScrollbar.value.setScrollTop(0)
@ -40,6 +41,7 @@ function jump(targetIndex){
function closeDialog(){
onlineReadingScrollbar.value.setScrollTop(0)
emit('close')
}
</script>
@ -55,7 +57,7 @@ function closeDialog(){
</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="currentLinks" :initial-index="index * lengthPerPage + i" loading="lazy"/>
:preview-src-list="currentGallery.images" :initial-index="index * lengthPerPage + i" loading="lazy"/>
</el-scrollbar>
<!--五页以下-->

View File

@ -104,7 +104,7 @@
</el-form>
</el-dialog>
<OnlineReader :current-gallery="currentGallery" :isOnlineReading="isOnlineReading"/>
<OnlineReader :current-gallery="currentGallery" :isOnlineReading="isOnlineReading" @close="isOnlineReading = false"/>
</template>
<script setup>