style:优化登录页面样式和全局样式

- 移除 Login.vue 中的多余 padding
- 在 App.vue 中添加全局样式重置,确保一致的样式表现
- 更新 App.vue 中的根元素类名,提高代码可读性
This commit is contained in:
zhangtao 2025-08-01 18:36:30 +08:00
parent d6ba24ae33
commit bf6eb5b277
2 changed files with 9 additions and 4 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<div id="app"> <div class="app-container">
<!-- 登录页面不显示布局 --> <!-- 登录页面不显示布局 -->
<router-view v-if="$route.path === '/login'" /> <router-view v-if="$route.path === '/login'" />
<!-- 主应用布局 --> <!-- 主应用布局 -->
@ -14,7 +14,13 @@ import AppLayout from '@/components/AppLayout.vue'
</script> </script>
<style> <style>
#app { /* 全局样式重置 */
body {
margin: 0;
padding: 0;
}
.app-container {
font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif; font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
} }
</style> </style>

View File

@ -118,7 +118,6 @@ const handleSubmit = async () => {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 20px;
} }
.login-card { .login-card {