From e5da0736a6ba1575af7c642bf6f6c22501c0a0a6 Mon Sep 17 00:00:00 2001 From: zhengkunwang223 Date: Fri, 2 Dec 2022 11:12:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/modules/zh.ts | 2 +- frontend/src/views/app-store/installed/index.vue | 16 ++++------------ 2 files changed, 5 insertions(+), 13 deletions(-) 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(); }); };