diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index f2bfb055e..103012f12 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -725,7 +725,7 @@ export default { name: '名称', description: '描述', delete: '删除', - deleteWarn: '删除操作会把数据一并删除,此操作不可回滚,是否继续?', + deleteWarn: '删除操作会把所有数据和备份一并删除,此操作不可回滚,是否继续?', syncSuccess: '同步成功', canUpdate: '可升级', backup: '备份', diff --git a/frontend/src/views/app-store/installed/index.vue b/frontend/src/views/app-store/installed/index.vue index 7b150cdf1..b75e34734 100644 --- a/frontend/src/views/app-store/installed/index.vue +++ b/frontend/src/views/app-store/installed/index.vue @@ -131,6 +131,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'; import Backups from './backups.vue'; import AppResources from './check/index.vue'; import { App } from '@/api/interface/app'; +import { useDeleteData } from '@/hooks/use-delete-data'; let data = ref(); let loading = ref(false); @@ -188,12 +189,12 @@ const openOperate = (row: any, op: string) => { open.value = true; }); } else if (op == 'delete') { - AppInstalledDeleteCheck(row.id).then((res) => { + AppInstalledDeleteCheck(row.id).then(async (res) => { const items = res.data; if (res.data && res.data.length > 0) { checkRef.value.acceptParams({ items: items }); } else { - onOperate(op); + await useDeleteData(InstalledOp, operateReq, 'app.deleteWarn'); } }); } else { @@ -228,16 +229,7 @@ const onOperate = async (operation: string) => { type: 'info', }, ).then(() => { - open.value = false; - loading.value = true; - InstalledOp(operateReq) - .then(() => { - ElMessage.success(i18n.global.t('commons.msg.operationSuccess')); - search(); - }) - .finally(() => { - loading.value = false; - }); + operate(); }); };