修改登录退出逻辑
This commit is contained in:
@ -1,18 +1,31 @@
|
||||
/* inventory-web/src/style.css */
|
||||
|
||||
/* 1. 保留原有的字体定义,确保文字清晰好看 */
|
||||
:root {
|
||||
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
||||
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
||||
line-height: 1.5;
|
||||
font-weight: 400;
|
||||
|
||||
/* 颜色方案配置 */
|
||||
color-scheme: light dark;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
background-color: #242424;
|
||||
|
||||
/* 字体渲染优化 */
|
||||
font-synthesis: none;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* 2. 针对亮色模式的颜色适配 (保留) */
|
||||
@media (prefers-color-scheme: light) {
|
||||
:root {
|
||||
color: #213547;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
/* 3. 链接的基本样式 (保留,但通常 RouterLink 会覆盖) */
|
||||
a {
|
||||
font-weight: 500;
|
||||
color: #646cff;
|
||||
@ -22,58 +35,44 @@ a:hover {
|
||||
color: #535bf2;
|
||||
}
|
||||
|
||||
body {
|
||||
/* -------------------------------------------------
|
||||
【重要修改区域】
|
||||
下面的代码是为了修复“无法铺满全屏”的问题
|
||||
-------------------------------------------------
|
||||
*/
|
||||
|
||||
/* 4. 全局盒模型修复:防止 padding 撑大元素 */
|
||||
*, *::before, *::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 5. 重置 body 和 html */
|
||||
html, body {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
place-items: center;
|
||||
min-width: 320px;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 3.2em;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 8px;
|
||||
border: 1px solid transparent;
|
||||
padding: 0.6em 1.2em;
|
||||
font-size: 1em;
|
||||
font-weight: 500;
|
||||
font-family: inherit;
|
||||
background-color: #1a1a1a;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.25s;
|
||||
}
|
||||
button:hover {
|
||||
border-color: #646cff;
|
||||
}
|
||||
button:focus,
|
||||
button:focus-visible {
|
||||
outline: 4px auto -webkit-focus-ring-color;
|
||||
}
|
||||
|
||||
.card {
|
||||
padding: 2em;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%; /* 强制高度占满 */
|
||||
|
||||
/* !!! 删除了原有的 display: flex; place-items: center;
|
||||
这是导致你页面缩在中间的罪魁祸首
|
||||
*/
|
||||
display: block;
|
||||
|
||||
overflow: hidden; /* 防止最外层出现双滚动条 */
|
||||
}
|
||||
|
||||
/* 6. 重置 #app 挂载点 */
|
||||
#app {
|
||||
max-width: 1280px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem;
|
||||
text-align: center;
|
||||
/* !!! 删除了 max-width: 1280px; padding: 2rem; text-align: center;
|
||||
这是导致你页面两边留白、无法全屏的原因
|
||||
*/
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
:root {
|
||||
color: #213547;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
a:hover {
|
||||
color: #747bff;
|
||||
}
|
||||
button {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
}
|
||||
/* 注意:原文件中关于 button, .card 的样式已被删除,
|
||||
因为你的项目中引入了 Element Plus,
|
||||
保留原生 button 样式会和 Element Plus 组件产生冲突。
|
||||
*/
|
||||
Reference in New Issue
Block a user