From 1d40dd9fe2345822798ef56fd2ee7c1ee1744d3a Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Thu, 31 Aug 2023 08:59:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=94=9F=E6=88=90action=E6=97=B6loading?= =?UTF-8?q?=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Permissions/views/permissions/index.vue | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/modules/Permissions/views/permissions/index.vue b/modules/Permissions/views/permissions/index.vue index 2e4385f..8ab9b21 100644 --- a/modules/Permissions/views/permissions/index.vue +++ b/modules/Permissions/views/permissions/index.vue @@ -21,7 +21,7 @@ @@ -73,11 +73,18 @@ onMounted(() => { }) const actionLoading = ref(false) +const generateId = ref(0) const actionGenerate = async (id: number) => { - actionLoading.value = true - http.post(api, { parent_id: id, actions: true }).then(r => { - search() - actionLoading.value = false - }) + generateId.value = id + http + .post(api, { parent_id: id, actions: true }) + .then(r => { + search() + generateId.value = 0 + }) + .catch(e => { + generateId.value = 0 + catchtable.value.reset() + }) }