UI界面模拟shadcn admin效果

This commit is contained in:
Cheng Zhou
2025-12-25 15:47:47 +08:00
parent 148fa6ad9a
commit a1a4964cd2
25 changed files with 1061 additions and 636 deletions
+20 -82
View File
@@ -1,12 +1,5 @@
<template>
<div class="login-container">
<!-- 动态背景元素 -->
<div class="bg-animate">
<div class="circle circle-1"></div>
<div class="circle circle-2"></div>
<div class="circle circle-3"></div>
</div>
<div class="login-content">
<div class="login-brand">
<h1 class="brand-title">CTMS</h1>
@@ -145,62 +138,11 @@ const onSubmit = async () => {
align-items: center;
justify-content: center;
min-height: 100vh;
background-color: #f8fafc;
background-color: var(--ctms-bg-base);
position: relative;
overflow: hidden;
}
/* 动态背景 */
.bg-animate {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}
.circle {
position: absolute;
border-radius: 50%;
filter: blur(80px);
z-index: 0;
opacity: 0.4;
animation: move 20s infinite alternate;
}
.circle-1 {
width: 500px;
height: 500px;
background: #3b82f6;
top: -100px;
left: -100px;
}
.circle-2 {
width: 400px;
height: 400px;
background: #10b981;
bottom: -50px;
right: -50px;
animation-delay: -5s;
}
.circle-3 {
width: 300px;
height: 300px;
background: #6366f1;
top: 40%;
left: 30%;
animation-delay: -10s;
}
@keyframes move {
from { transform: translate(0, 0) scale(1); }
to { transform: translate(50px, 100px) scale(1.1); }
}
.login-content {
width: 420px;
z-index: 1;
@@ -214,17 +156,15 @@ const onSubmit = async () => {
.brand-title {
font-size: 48px;
font-weight: 800;
background: linear-gradient(135deg, var(--ctms-primary) 0%, #6366f1 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-weight: 700;
color: var(--ctms-text-main);
letter-spacing: -1px;
margin: 0;
}
.brand-subtitle {
font-size: 14px;
color: #64748b;
color: var(--ctms-text-secondary);
margin-top: 8px;
letter-spacing: 2px;
text-transform: uppercase;
@@ -232,11 +172,10 @@ const onSubmit = async () => {
}
.login-card {
border: 1px solid rgba(255, 255, 255, 0.7);
background: rgba(255, 255, 255, 0.8);
backdrop-filter: blur(20px);
border-radius: 20px;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
border: 1px solid var(--ctms-border-color);
background: #ffffff;
border-radius: 16px;
box-shadow: none;
padding: 12px;
}
@@ -248,34 +187,34 @@ const onSubmit = async () => {
.form-title {
font-size: 24px;
font-weight: 700;
color: #1e293b;
color: var(--ctms-text-main);
margin: 0;
}
.form-desc {
font-size: 14px;
color: #94a3b8;
color: var(--ctms-text-secondary);
margin-top: 8px;
}
.elegant-form :deep(.el-form-item__label) {
font-size: 13px;
font-weight: 600;
color: #475569;
color: var(--ctms-text-regular);
padding-bottom: 8px;
}
.elegant-form :deep(.el-input__wrapper) {
background-color: #f8fafc;
box-shadow: 0 0 0 1px #e2e8f0 inset;
background-color: #ffffff;
box-shadow: 0 0 0 1px var(--ctms-border-color) inset;
padding: 8px 12px;
border-radius: 10px;
transition: var(--ctms-transition);
}
.elegant-form :deep(.el-input__wrapper.is-focus) {
box-shadow: 0 0 0 1px var(--ctms-primary) inset, 0 0 0 4px rgba(47, 84, 235, 0.1) !important;
background-color: #fff;
box-shadow: 0 0 0 1px var(--ctms-primary) inset !important;
background-color: #ffffff;
}
.form-options {
@@ -298,22 +237,21 @@ const onSubmit = async () => {
font-size: 16px;
font-weight: 600;
border-radius: 12px;
background: linear-gradient(135deg, var(--ctms-primary) 0%, #4f46e5 100%);
background: var(--ctms-primary);
border: none;
box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
box-shadow: none;
transition: var(--ctms-transition);
}
.submit-btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
transform: translateY(-1px);
}
.register-prompt {
margin-top: 24px;
text-align: center;
font-size: 14px;
color: #64748b;
color: var(--ctms-text-secondary);
}
.register-prompt a {
@@ -330,6 +268,6 @@ const onSubmit = async () => {
.login-footer p {
font-size: 12px;
color: #94a3b8;
color: var(--ctms-text-disabled);
}
</style>