diff --git a/frontend/src/views/layout/AppLayout.vue b/frontend/src/views/layout/AppLayout.vue index c5f2216..15b5219 100644 --- a/frontend/src/views/layout/AppLayout.vue +++ b/frontend/src/views/layout/AppLayout.vue @@ -13,10 +13,12 @@ const menus = computed(() => [ { to: '/orders', label: '订单', perm: 'orders:read' }, { to: '/import', label: '导入', perm: 'import:preview' }, { to: '/settings/customers', label: '客户', perm: 'dict:read' }, - { to: '/settings/statuses', label: '状态', perm: 'dict:read' }, + { to: '/settings/statuses', label: '状态', perm: 'dict:read' } ]) async function logout() { + const res = confirm('确认退出登录吗?') + if (!res) return try { if (auth.refreshToken) await apiLogout({ refreshToken: auth.refreshToken }) } finally { @@ -37,7 +39,11 @@ async function logout() { v-if="auth.hasPerm(m.perm)" :to="m.to" class="block rounded px-3 py-2 text-sm hover:bg-slate-800/60" - :class="route.path === m.to ? 'bg-slate-800/80 text-white' : 'text-slate-300'" + :class=" + route.path === m.to + ? 'bg-slate-800/80 text-white' + : 'text-slate-300' + " > {{ m.label }} @@ -46,9 +52,18 @@ async function logout() {
-
-
欢迎,{{ auth.user?.displayName || auth.user?.username }}
- +
+
+ 欢迎,{{ auth.user?.displayName || auth.user?.username }} +
+
diff --git a/frontend/src/views/login/LoginView.vue b/frontend/src/views/login/LoginView.vue index e11cc6f..8f0a29a 100644 --- a/frontend/src/views/login/LoginView.vue +++ b/frontend/src/views/login/LoginView.vue @@ -1,15 +1,15 @@