This commit is contained in:
2026-08-25 17:17:06 +08:00
parent e8812a0a73
commit 73ac7b85db
13 changed files with 175 additions and 9 deletions
+24 -1
View File
@@ -1,6 +1,6 @@
<script setup>
import { onMounted, reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
import { ElMessage, ElMessageBox } from 'element-plus'
import { UploadFilled } from '@element-plus/icons-vue'
import request from '../api/request'
@@ -66,6 +66,24 @@ function submitAdd() {
const fileList = ref([])
function removeRow(row) {
ElMessageBox.confirm(
`确定删除版本 ${row.version}?删除最新版本会同时移除已下发的 APK(客户端将不再提示该更新)`,
'删除版本记录',
{
confirmButtonText: '删除',
cancelButtonText: '取消',
type: 'warning',
},
)
.then(() => request.post('/app-versions/delete', { id: row.id }))
.then(() => {
ElMessage.success('已删除')
load()
})
.catch(() => {})
}
onMounted(load)
</script>
@@ -84,6 +102,11 @@ onMounted(load)
<el-table-column prop="createdAt" label="下发时间" width="180">
<template #default="{ row }">{{ row.createdAt || '-' }}</template>
</el-table-column>
<el-table-column label="操作" width="90" fixed="right">
<template #default="{ row }">
<el-button link type="danger" @click="removeRow(row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination