修复画廊下载按钮和下载链接
This commit is contained in:
@@ -84,7 +84,7 @@
|
||||
</table>
|
||||
<template #footer>
|
||||
<el-button @click="postTask" v-if="chosenGallery.availableResolution">下载</el-button>
|
||||
<el-button @click="window.open(chosenGallery.download)" v-else>下载文件</el-button>
|
||||
<el-button @click="downloadChosenGallery" v-else-if="chosenGallery.status === '下载完成'">下载文件</el-button>
|
||||
<el-button @click="readOnlineGallery(chosenGallery)">在线预览</el-button>
|
||||
<el-button v-if="chosenGallery.status === '下载完成'" @click="deleteGallery">删除</el-button>
|
||||
</template>
|
||||
@@ -271,6 +271,13 @@ function deleteGallery(){
|
||||
store.dispatch("deleteGallery", chosenGallery.value.gid)
|
||||
}
|
||||
|
||||
function downloadChosenGallery(){
|
||||
if(chosenGallery.value.download)
|
||||
window.open(chosenGallery.value.download)
|
||||
else
|
||||
ElMessage({message: "下载地址不存在,请刷新任务后重试", type: "error"})
|
||||
}
|
||||
|
||||
function validate(){
|
||||
if(AuthCode.value.trim() === ""){
|
||||
ElMessage("请输入授权码后再验证")
|
||||
@@ -357,4 +364,4 @@ function saveConfig(){
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user