From 5808c8ddc3cc56b3eae1ce5669d2df7a316c89f3 Mon Sep 17 00:00:00 2001 From: ko1234 Date: Thu, 30 Oct 2025 16:25:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=AC=8A=E9=99=90=20:=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=8C=AF=E8=AA=A4=E6=8F=90=E7=A4=BA=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=8C=E7=95=B6=E6=9B=B4=E6=96=B0=E5=A4=B1=E6=95=97?= =?UTF-8?q?=E6=99=82=E9=A1=AF=E7=A4=BA=E9=8C=AF=E8=AA=A4=E8=A8=8A=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../accountManagement/components/RoleAuthModal.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/views/accountManagement/components/RoleAuthModal.vue b/src/views/accountManagement/components/RoleAuthModal.vue index b10a453..eef0282 100644 --- a/src/views/accountManagement/components/RoleAuthModal.vue +++ b/src/views/accountManagement/components/RoleAuthModal.vue @@ -8,10 +8,11 @@ import { getAccountRoleAuthList, postAccountRole, } from "@/apis/account"; -import { defineProps, onMounted, ref, watch, computed } from "vue"; +import { defineProps, onMounted, ref, watch, computed, inject } from "vue"; import useActiveBtn from "@/hooks/useActiveBtn"; import { useI18n } from "vue-i18n"; const { t } = useI18n(); +const { openToast } = inject("app_toast"); const props = defineProps({ selectedRole: Object, cancelModal: Function, @@ -120,8 +121,12 @@ const onOk = async () => { ...props.selectedRole, ...postData, }); - props.update(); - onCancel(); + if (res.isSuccess) { + props.update(); + onCancel(); + } else { + openToast("error", res.msg, "#role_auth_modal"); + } }; watch(