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
+25 -27
View File
@@ -11,7 +11,7 @@
class="action-item"
@click="go(item.path)"
>
<div class="action-icon-wrapper" :style="{ backgroundColor: item.color + '20', color: item.color }">
<div class="action-icon-wrapper">
<el-icon><component :is="item.icon" /></el-icon>
</div>
<span class="action-label">{{ item.label }}</span>
@@ -31,13 +31,13 @@ import {
const router = useRouter();
const actions = [
{ label: "伦理与启动", path: "/study/milestones", icon: Timer, color: "#2f54eb" },
{ label: "受试者", path: "/study/subjects", icon: UserFilled, color: "#722ed1" },
{ label: "不良事件", path: "/study/aes", icon: Warning, color: "#faad14" },
{ label: "数据问题", path: "/study/data-queries", icon: QuestionFilled, color: "#1890ff" },
{ label: "药品库存", path: "/study/imp/inventory", icon: Management, color: "#52c41a" },
{ label: "费用治理", path: "/study/finance", icon: Money, color: "#eb2f96" },
{ label: "项目知识库", path: "/study/faq", icon: Collection, color: "#fa8c16" },
{ label: "伦理与启动", path: "/study/milestones", icon: Timer },
{ label: "受试者", path: "/study/subjects", icon: UserFilled },
{ label: "不良事件", path: "/study/aes", icon: Warning },
{ label: "数据问题", path: "/study/data-queries", icon: QuestionFilled },
{ label: "药品库存", path: "/study/imp/inventory", icon: Management },
{ label: "费用治理", path: "/study/finance", icon: Money },
{ label: "项目知识库", path: "/study/faq", icon: Collection },
];
const go = (path: string) => router.push(path);
@@ -48,7 +48,7 @@ const go = (path: string) => router.push(path);
background-color: #fff;
border-radius: var(--ctms-radius);
padding: 24px;
box-shadow: var(--ctms-shadow-sm);
border: 1px solid var(--ctms-border-color);
}
.section-header {
@@ -59,12 +59,12 @@ const go = (path: string) => router.push(path);
}
.header-icon {
font-size: 18px;
color: var(--ctms-primary);
font-size: 16px;
color: var(--ctms-text-secondary);
}
.header-title {
font-size: 16px;
font-size: 15px;
font-weight: 600;
color: var(--ctms-text-main);
}
@@ -79,31 +79,31 @@ const go = (path: string) => router.push(path);
display: flex;
align-items: center;
padding: 12px 16px;
background-color: #fafafa;
background-color: #ffffff;
border: 1px solid var(--ctms-border-color);
border-radius: 8px;
border-radius: 10px;
cursor: pointer;
transition: all 0.3s ease;
transition: var(--ctms-transition);
position: relative;
overflow: hidden;
}
.action-item:hover {
background-color: #fff;
border-color: var(--ctms-primary-hover);
box-shadow: var(--ctms-shadow-sm);
transform: translateY(-2px);
background-color: #ffffff;
border-color: var(--ctms-border-color-hover);
}
.action-icon-wrapper {
width: 36px;
height: 36px;
width: 34px;
height: 34px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
font-size: 18px;
margin-right: 12px;
color: var(--ctms-text-secondary);
background-color: var(--ctms-bg-muted);
}
.action-label {
@@ -116,13 +116,11 @@ const go = (path: string) => router.push(path);
.action-arrow {
font-size: 14px;
color: var(--ctms-text-disabled);
opacity: 0;
transition: all 0.3s ease;
transform: translateX(-10px);
opacity: 1;
transition: var(--ctms-transition);
}
.action-item:hover .action-arrow {
opacity: 1;
transform: translateX(0);
color: var(--ctms-text-secondary);
}
</style>