From d55ff1205d53ef26ca5b42b97aba07d87e809384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8=E9=9C=96=E9=93=83?= Date: Thu, 21 Aug 2025 20:55:03 +0800 Subject: [PATCH] =?UTF-8?q?style(layout):=20=E4=BC=98=E5=8C=96=20DefaultLa?= =?UTF-8?q?yout=E7=BB=84=E4=BB=B6=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 调整 #app 样式,移除默认的 margin 和 padding - 添加 header 和 footer 的样式类 - 优化模板结构,提高代码可读性 - 添加退出登录失败的提示消息 --- src/assets/main.css | 4 +-- src/layouts/DefaultLayout.vue | 46 ++++++++++++++++++++++++++++------- 2 files changed, 39 insertions(+), 11 deletions(-) diff --git a/src/assets/main.css b/src/assets/main.css index c86d1bf..efbbdac 100644 --- a/src/assets/main.css +++ b/src/assets/main.css @@ -1,8 +1,8 @@ @import './base.css'; #app { - margin: 0 auto; - padding: 2rem; + margin: 0; + padding: 0; font-weight: normal; display: flex; flex-direction: column; diff --git a/src/layouts/DefaultLayout.vue b/src/layouts/DefaultLayout.vue index 4e289ac..0907168 100644 --- a/src/layouts/DefaultLayout.vue +++ b/src/layouts/DefaultLayout.vue @@ -5,6 +5,7 @@ import { h, ref } from 'vue' import { AppstoreOutlined, MailOutlined } from '@ant-design/icons-vue' import router from '@/router/index.js' import { removeToken } from '@/utils/auth.js' +import { message } from 'ant-design-vue' const current = ref(['mail']) const items = ref([ @@ -48,6 +49,7 @@ const logout = async () => { removeToken() await router.push('/login') } else { + message.warn('登陆失败') console.error('Logout failed', response.statusText) } } @@ -55,22 +57,48 @@ const logout = async () => { - +