链接全转https协议,去除获取在线预览链接,改为本地生成,修复部分bug,优化预览图(同步更新)
This commit is contained in:
+14
-14
@@ -6,6 +6,7 @@
|
||||
:empty-text="emptyText"
|
||||
:row-key="gallery=>gallery.gid"
|
||||
class="table"
|
||||
@cellMouseEnter="showThumbnail"
|
||||
>
|
||||
|
||||
<el-table-column type="expand">
|
||||
@@ -31,9 +32,7 @@
|
||||
|
||||
<el-table-column label="名字" width="300vw">
|
||||
<template #default="scoped">
|
||||
<span @mouseover="showThumbnail(scoped.row)">
|
||||
{{galleryNameType === 'shortName' ? scoped.row.shortName: scoped.row.name}}
|
||||
</span>
|
||||
{{galleryNameType === 'shortName' ? scoped.row.shortName: scoped.row.name}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -42,7 +41,7 @@
|
||||
<span>
|
||||
<el-button @click="downloadTask(scoped.row.download)" :disabled="scoped.row.download === undefined">下载</el-button>
|
||||
<el-button @click="changeGalleryCollect(scoped.row.gid, scoped.row.isCollect)">{{scoped.row.isCollect ? '取消收藏' : '收藏'}}</el-button>
|
||||
<el-button @click="onlineGalleryReader(scoped.row.gid)" :disabled="scoped.row.download === undefined">在线看</el-button>
|
||||
<el-button @click="onlineGalleryReader(scoped.row)" :disabled="scoped.row.download === undefined">在线看</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -111,7 +110,7 @@
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<OnlineReader :currentLinks="currentLinks" :isOnlineReading="isOnlineReading"/>
|
||||
<OnlineReader :current-gallery="currentGallery" :isOnlineReading="isOnlineReading"/>
|
||||
|
||||
<span v-show="!loadComplete" class="side">请输入授权码后再查看</span>
|
||||
</div>
|
||||
@@ -124,12 +123,16 @@ import axios from "axios";
|
||||
import {ElMessage} from "element-plus";
|
||||
import OnlineReader from "./OnlineReader.vue";
|
||||
|
||||
let link = "https://downloader.lionwebsite.xyz/GalleryManage/"
|
||||
|
||||
//输入
|
||||
let inputNode = ref(null)
|
||||
//是否正在编辑页数
|
||||
let isEditingPage = ref(false)
|
||||
//是否正在编辑标签
|
||||
let isEditingTag = ref(false)
|
||||
//是否预览本子
|
||||
let isOnlineReading = ref(false)
|
||||
|
||||
//临时变量
|
||||
let galleryForTag = ref({})
|
||||
@@ -151,9 +154,6 @@ let loadComplete = computed(() => {
|
||||
let currentTasks = computed(() => {
|
||||
return store.getters.currentTasks ? store.getters.currentTasks: null
|
||||
})
|
||||
let isOnlineReading = computed(() => {
|
||||
return store.state.isOnlineReading
|
||||
})
|
||||
|
||||
let min = computed(() => {
|
||||
return store.getters.min
|
||||
@@ -177,9 +177,7 @@ let emptyText = computed(() => {
|
||||
})
|
||||
|
||||
//在线预览相关
|
||||
let currentLinks = computed(() => {
|
||||
return store.state.currentLinks
|
||||
})
|
||||
let currentGallery = ref({name:"name"})
|
||||
let imageWidth = computed(() => {
|
||||
return store.state.imageWidth
|
||||
})
|
||||
@@ -309,8 +307,9 @@ function updateGallery(link){
|
||||
function deleteGallery(gid){
|
||||
store.dispatch("deleteGallery", gid)
|
||||
}
|
||||
function onlineGalleryReader(gid){
|
||||
store.dispatch("queryOnlineLinks", gid)
|
||||
function onlineGalleryReader(gallery){
|
||||
currentGallery.value = gallery
|
||||
isOnlineReading.value = true;
|
||||
}
|
||||
function shareGallery(data){
|
||||
const {gid, shortName} = data
|
||||
@@ -333,11 +332,12 @@ function shareGallery(data){
|
||||
|
||||
//显示缩略图
|
||||
function showThumbnail(gallery){
|
||||
if(gallery.download !== undefined && gallery.status === "下载完成")
|
||||
if(gallery.status === "下载完成") {
|
||||
clearTimeout(debounceTimer)
|
||||
debounceTimer = setTimeout(() => {
|
||||
store.commit("_changeThumbnailGallery", gallery)
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user