新增删除功能
This commit is contained in:
@@ -42,12 +42,10 @@
|
||||
</el-col>
|
||||
<el-col :span="6"></el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="DashBoard" v-show="!loadComplete">
|
||||
<el-col :span="20">
|
||||
<el-col :span="15">
|
||||
<el-input v-model="AuthCode" class="validate">
|
||||
<template #prefix>
|
||||
请输入授权码:
|
||||
@@ -142,7 +140,7 @@ export default {
|
||||
width: auto;
|
||||
background-color: ghostwhite;
|
||||
display: block;
|
||||
margin-left: 400px;
|
||||
margin-left: 200px;
|
||||
margin-top: 200px;
|
||||
}
|
||||
</style>
|
||||
+20
-5
@@ -12,17 +12,20 @@
|
||||
文件大小:{{props.row.fileSize}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Name" width="300">
|
||||
<el-table-column label="名字" width="300">
|
||||
<template #default="scoped">
|
||||
{{scoped.row.name}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="link" width="80">
|
||||
<el-table-column label="操作" width="180">
|
||||
<template #default="scoped">
|
||||
<el-link :href="scoped.row.download" v-show="scoped.row.download">download</el-link>
|
||||
<span v-show="scoped.row.download">
|
||||
<el-button @click="downloadGallery(scoped.row.download)">下载</el-button>
|
||||
<el-button @click="deleteGallery(scoped.row.gid)">删除</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="status" width="60">
|
||||
<el-table-column label="进度" width="60">
|
||||
<template #default="scoped">
|
||||
{{ scoped.row.progress }}
|
||||
</template>
|
||||
@@ -61,6 +64,7 @@ export default {
|
||||
let input = ref(null)
|
||||
|
||||
let data = computed(() => {
|
||||
console.log(store.getters.task)
|
||||
if(store.getters.task)
|
||||
return store.getters.task
|
||||
else
|
||||
@@ -72,6 +76,8 @@ export default {
|
||||
})
|
||||
|
||||
let max = computed(() => {
|
||||
if(targetPage.value > store.getters.max)
|
||||
store.commit("_changePage", store.getters.max)
|
||||
return store.getters.max
|
||||
})
|
||||
|
||||
@@ -118,7 +124,6 @@ export default {
|
||||
}
|
||||
|
||||
function reverse(){
|
||||
console.log("reverse")
|
||||
isEditing.value = !isEditing.value
|
||||
if(isEditing){
|
||||
input.value.focus()
|
||||
@@ -126,6 +131,14 @@ export default {
|
||||
targetPage.value = page.value
|
||||
}
|
||||
|
||||
function downloadGallery(link){
|
||||
window.open(link)
|
||||
}
|
||||
|
||||
function deleteGallery(gid){
|
||||
store.dispatch("deleteGallery", gid)
|
||||
}
|
||||
|
||||
|
||||
return {update,
|
||||
data,
|
||||
@@ -142,6 +155,8 @@ export default {
|
||||
toMin,
|
||||
previous,
|
||||
next,
|
||||
downloadGallery,
|
||||
deleteGallery,
|
||||
store
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user