From d1589ba12b2f3731a1280dae3b28a43e6d3ce37f Mon Sep 17 00:00:00 2001 From: rd <> Date: Tue, 1 Jul 2025 17:52:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_base/exit-account-modal/img/icon1.png | Bin 0 -> 639 bytes .../_base/exit-account-modal/index.vue | 98 ++++++++++++++++++ src/components/_base/navbar/index.vue | 62 +++++++---- 3 files changed, 138 insertions(+), 22 deletions(-) create mode 100644 src/components/_base/exit-account-modal/img/icon1.png create mode 100644 src/components/_base/exit-account-modal/index.vue diff --git a/src/components/_base/exit-account-modal/img/icon1.png b/src/components/_base/exit-account-modal/img/icon1.png new file mode 100644 index 0000000000000000000000000000000000000000..40402eba487815a406941dbf66496801eadeb21e GIT binary patch literal 639 zcmV-_0)YLAP)KuGS6A2z7(FfeWO@ zk3tClJi_BWfIT}7Lj-(=BP@{7Q&J>2Q5u){rn-Vkb2h>c0tpgG!Y;w_K*g+MmxAtp zVb_?#6EA`Mm4qdDqGF0LN)np;2<;?LP9?_--7V%CbxOZEO?~OU)d7i1N!%yGt!AU7 z(Jx#gTLo@W+zO{itH2(_tq>y5Y%4u!>G+84i-R1a`o4`AEy&++M=j6rqo6)z^#J)| z8GKk`#BT7RSDP)!r1ks|er|+&afvc~soa;LS|3MPub-*aNu{6F*t8(SErueIyOUPc zKsw~Va>ij~wT3mi1y3;P-{q=e^r5Okj0^*g>4D`IeUSz=-=QRLnBg! z28T-Hg7(r-o05YkA9gOwJYum`dCVGB;DO8?LdhcfHc@6#u~!|F6$pV-pl}5yE>T7p zg&r50_TmYKf^9}Y8v^MKL`+tqe@YsAs#hKwZ)F&_MY)zfaf^f@H&)55BAYfw3dtJmIV2V6OqzVa+wdOBW3#^Daz}&O* Z`~v?$k_a=)qKN + + + + + diff --git a/src/components/_base/navbar/index.vue b/src/components/_base/navbar/index.vue index 04308ce..87e2fbb 100644 --- a/src/components/_base/navbar/index.vue +++ b/src/components/_base/navbar/index.vue @@ -8,6 +8,7 @@ import { useSidebarStore } from '@/stores/modules/side-bar'; import { MENU_GROUP_IDS } from '@/router/constants'; import router from '@/router'; import { useRoute } from 'vue-router'; +import ExitAccountModal from '@/components/_base/exit-account-modal/index.vue'; interface MenuItem { name: string; @@ -20,7 +21,7 @@ interface MenuItem { const lists = ref([]); const sidebarStore = useSidebarStore(); const route = useRoute(); - +const exitAccountModalRef = ref(null); const selectedKey = computed(() => { // 判断是否为工作台页面(假设路由名为 'Home' 或 path 为 '/') if (route.name === 'Home' || route.path === '/') { @@ -31,10 +32,7 @@ const selectedKey = computed(() => { }); const clickExit = async () => { - const { code } = await fetchLogOut(); - if (code === 200) { - handleUserLogout(); - } + exitAccountModalRef.value?.open(); }; const getMenus = async () => { const res = await fetchMenusTree(); @@ -112,31 +110,37 @@ const handleDopdownClick = (index: any, ind: any) => {
  • - + avatar @@ -237,7 +242,8 @@ const handleDopdownClick = (index: any, ind: any) => {