2025-10-21 16:50:33 +08:00
< template >
2025-10-22 09:18:53 +08:00
< div class = "dashboard" >
<!-- 左侧导航栏 -- >
< aside class = "sidebar" >
< div class = "logo" >
< div class = "logo-icon" > < / div >
< span > LOGO < / span >
< / div >
< nav class = "nav-menu" >
< div class = "nav-item active" >
< el-icon > < Grid / > < / el-icon >
< span > 数据仪表台 < / span >
< / div >
< div class = "nav-item" @click ="goToUsers" >
< el-icon > < User / > < / el-icon >
< span > 会员管理 < / span >
< / div >
< div class = "nav-item" @click ="goToOrders" >
< el-icon > < ShoppingCart / > < / el-icon >
< span > 订单管理 < / span >
< / div >
< div class = "nav-item" @click ="goToAPI" >
< el-icon > < Code / > < / el-icon >
< span > API管理 < / span >
< / div >
< div class = "nav-item" @click ="goToTasks" >
< el-icon > < Document / > < / el-icon >
< span > 生成任务记录 < / span >
< / div >
< div class = "nav-item" @click ="goToSettings" >
< el-icon > < Setting / > < / el-icon >
< span > 系统设置 < / span >
< / div >
< / nav >
< div class = "sidebar-footer" >
< div class = "online-users" >
当前在线用户 : < span class = "highlight" > 87 / 500 < / span >
< / div >
< div class = "system-uptime" >
系统运行时间 : < span class = "highlight" > 48 小时32分 < / span >
< / div >
< / div >
< / aside >
<!-- 主内容区域 -- >
< main class = "main-content" >
<!-- 顶部搜索栏 -- >
< header class = "top-header" >
< div class = "search-bar" >
< el-icon class = "search-icon" > < Search / > < / el-icon >
< input type = "text" placeholder = "搜索你的想要的内容" class = "search-input" / >
< / div >
< div class = "header-actions" >
< el-icon class = "notification-icon" > < Bell / > < / el-icon >
< div class = "user-avatar" >
< img src = "/images/backgrounds/welcome.jpg" alt = "用户头像" / >
< el-icon class = "dropdown-icon" > < ArrowDown / > < / el-icon >
< / div >
< / div >
< / header >
<!-- KPI 卡片区域 -- >
< section class = "kpi-section" >
< div class = "kpi-card" >
< div class = "kpi-icon user-icon" >
< el-icon > < User / > < / el-icon >
< / div >
< div class = "kpi-content" >
< div class = "kpi-title" > 用户总数 < / div >
< div class = "kpi-value" > 12 , 847 < / div >
< div class = "kpi-trend positive" > + 12 % 较上月同期 < / div >
2025-10-21 16:50:33 +08:00
< / div >
< / div >
2025-10-22 09:18:53 +08:00
< div class = "kpi-card" >
< div class = "kpi-icon paid-user-icon" >
< el-icon > < User / > < / el-icon >
< div class = "currency-symbol" > ¥ < / div >
2025-10-21 16:50:33 +08:00
< / div >
2025-10-22 09:18:53 +08:00
< div class = "kpi-content" >
< div class = "kpi-title" > 付费用户数 < / div >
< div class = "kpi-value" > 3 , 215 < / div >
< div class = "kpi-trend negative" > - 5 % 较上月同期 < / div >
2025-10-21 16:50:33 +08:00
< / div >
2025-10-22 09:18:53 +08:00
< / div >
< div class = "kpi-card" >
< div class = "kpi-icon revenue-icon" >
< el-icon > < Money / > < / el-icon >
2025-10-21 16:50:33 +08:00
< / div >
2025-10-22 09:18:53 +08:00
< div class = "kpi-content" >
< div class = "kpi-title" > 今日收入 < / div >
< div class = "kpi-value" > ¥ 28 , 450 < / div >
< div class = "kpi-trend positive" > + 15 % 较上月同期 < / div >
2025-10-21 16:50:33 +08:00
< / div >
2025-10-22 09:18:53 +08:00
< / div >
< / section >
<!-- 图表区域 -- >
< section class = "charts-section" >
<!-- 日活用户趋势图 -- >
2025-10-22 09:23:39 +08:00
< div class = "chart-card full-width" >
2025-10-22 09:18:53 +08:00
< div class = "chart-header" >
< h3 > 日活用户趋势 < / h3 >
< div class = "year-selector" >
< span > 2025 年 < / span >
< el-icon > < ArrowDown / > < / el-icon >
< / div >
2025-10-21 16:50:33 +08:00
< / div >
2025-10-22 09:18:53 +08:00
< div class = "chart-container" >
2025-10-22 09:22:42 +08:00
< div class = "line-chart" >
<!-- SVG 曲线图 -- >
2025-10-22 09:27:34 +08:00
< svg width = "100%" height = "200" viewBox = "0 0 840 200" class = "chart-svg" >
2025-10-22 09:22:42 +08:00
<!-- 网格线 -- >
< defs >
2025-10-22 09:27:34 +08:00
< pattern id = "grid" width = "60" height = "40" patternUnits = "userSpaceOnUse" >
< path d = "M 60 0 L 0 0 0 40" fill = "none" stroke = "#e2e8f0" stroke -width = " 0.5 " / >
2025-10-22 09:22:42 +08:00
< / pattern >
< / defs >
< rect width = "100%" height = "100%" fill = "url(#grid)" / >
2025-10-22 09:27:34 +08:00
<!-- 数据曲线 - 平滑连接12个月的数据点 -- >
2025-10-22 09:33:27 +08:00
< path d = "M 60,160 C 90,155 120,150 150,140 C 180,130 210,115 240,120 C 270,105 300,100 330,90 C 360,80 390,85 420,80 C 450,85 480,85 510,95 C 540,95 570,100 600,100 C 630,95 660,90 690,80 C 720,70 750,70 780,70"
2025-10-22 09:22:42 +08:00
fill = "none"
stroke = "#3b82f6"
stroke - width = "3"
class = "chart-line-path" / >
2025-10-22 09:33:27 +08:00
<!-- 12 个月的数据点 - 每个月一个点 -- >
2025-10-22 09:22:42 +08:00
< circle cx = "60" cy = "160" r = "4" fill = "#3b82f6" class = "chart-dot" / >
2025-10-22 09:33:27 +08:00
< circle cx = "120" cy = "150" r = "4" fill = "#3b82f6" class = "chart-dot" / >
< circle cx = "180" cy = "140" r = "4" fill = "#3b82f6" class = "chart-dot" / >
< circle cx = "240" cy = "120" r = "4" fill = "#3b82f6" class = "chart-dot" / >
< circle cx = "300" cy = "100" r = "4" fill = "#3b82f6" class = "chart-dot" / >
< circle cx = "360" cy = "90" r = "4" fill = "#3b82f6" class = "chart-dot" / >
< circle cx = "420" cy = "80" r = "4" fill = "#3b82f6" class = "chart-dot" / >
< circle cx = "480" cy = "85" r = "4" fill = "#3b82f6" class = "chart-dot" / >
< circle cx = "540" cy = "95" r = "4" fill = "#3b82f6" class = "chart-dot" / >
< circle cx = "600" cy = "100" r = "4" fill = "#3b82f6" class = "chart-dot" / >
< circle cx = "660" cy = "90" r = "4" fill = "#3b82f6" class = "chart-dot" / >
< circle cx = "720" cy = "70" r = "4" fill = "#3b82f6" class = "chart-dot" / >
2025-10-22 09:22:42 +08:00
2025-10-22 09:33:27 +08:00
<!-- 高亮数据点 - 6 月数据点 -- >
< circle cx = "360" cy = "90" r = "6" fill = "#3b82f6" class = "highlight-dot" / >
< circle cx = "360" cy = "90" r = "12" fill = "#3b82f6" opacity = "0.2" class = "highlight-ring" / >
2025-10-22 09:22:42 +08:00
2025-10-22 09:33:27 +08:00
<!-- 工具提示 - 6 月数据 -- >
< g class = "tooltip-group" transform = "translate(360, 70)" >
2025-10-22 09:22:42 +08:00
< rect x = "-30" y = "-40" width = "60" height = "30" rx = "6" fill = "#1e293b" class = "tooltip-bg" / >
< text x = "0" y = "-25" text -anchor = " middle " fill = "white" font -size = " 12 " font -weight = " 600 " class = "tooltip-value" > 1 , 000 < / text >
2025-10-22 09:33:27 +08:00
< text x = "0" y = "-10" text -anchor = " middle " fill = "white" font -size = " 10 " opacity = "0.8" class = "tooltip-date" > 6 月12号 < / text >
2025-10-22 09:22:42 +08:00
<!-- 工具提示箭头 -- >
< polygon points = "0,0 -5,10 5,10" fill = "#1e293b" class = "tooltip-arrow" / >
< / g >
< / svg >
2025-10-22 09:18:53 +08:00
< / div >
< div class = "chart-x-axis" >
< span > 1 月 < / span >
< span > 2 月 < / span >
< span > 3 月 < / span >
< span > 4 月 < / span >
< span > 5 月 < / span >
< span > 6 月 < / span >
< span > 7 月 < / span >
< span > 8 月 < / span >
< span > 9 月 < / span >
< span > 10 月 < / span >
< span > 11 月 < / span >
< span > 12 月 < / span >
< / div >
< div class = "chart-y-axis" >
< span > 1500 < / span >
< span > 1000 < / span >
< span > 500 < / span >
< span > 100 < / span >
< span > 0 < / span >
< / div >
2025-10-21 16:50:33 +08:00
< / div >
2025-10-22 09:18:53 +08:00
< / div >
<!-- 用户转化率图 -- >
2025-10-22 09:23:39 +08:00
< div class = "chart-card full-width" >
2025-10-22 09:18:53 +08:00
< div class = "chart-header" >
< h3 > 用户转化率 < / h3 >
< div class = "year-selector" >
< span > 2025 年 < / span >
< el-icon > < ArrowDown / > < / el-icon >
< / div >
2025-10-21 16:50:33 +08:00
< / div >
2025-10-22 09:18:53 +08:00
< div class = "chart-container" >
< div class = "bar-chart" >
< div class = "bar" style = "height: 15%;" > < / div >
< div class = "bar" style = "height: 25%;" > < / div >
< div class = "bar" style = "height: 20%;" > < / div >
< div class = "bar" style = "height: 30%;" > < / div >
< div class = "bar" style = "height: 18%;" > < / div >
< div class = "bar" style = "height: 22%;" > < / div >
< div class = "bar" style = "height: 28%;" > < / div >
< div class = "bar" style = "height: 35%;" > < / div >
< div class = "bar active" style = "height: 40%;" > < / div >
< div class = "bar" style = "height: 25%;" > < / div >
< div class = "bar" style = "height: 20%;" > < / div >
< div class = "bar" style = "height: 18%;" > < / div >
< / div >
< div class = "chart-x-axis" >
< span > 1 月 < / span >
< span > 2 月 < / span >
< span > 3 月 < / span >
< span > 4 月 < / span >
< span > 5 月 < / span >
< span > 6 月 < / span >
< span > 7 月 < / span >
< span > 8 月 < / span >
< span > 9 月 < / span >
< span > 10 月 < / span >
< span > 11 月 < / span >
< span > 12 月 < / span >
2025-10-21 16:50:33 +08:00
< / div >
2025-10-22 09:18:53 +08:00
< div class = "chart-y-axis" >
< span > 20 % < / span >
< span > 15 % < / span >
< span > 10 % < / span >
< span > 5 % < / span >
< span > 0 % < / span >
< / div >
< / div >
< / div >
< / section >
< / main >
2025-10-21 16:50:33 +08:00
< / div >
< / template >
< script setup >
import { ref , onMounted } from 'vue'
import { useRouter } from 'vue-router'
import { useUserStore } from '@/stores/user'
import { ElMessage } from 'element-plus'
const router = useRouter ( )
const userStore = useUserStore ( )
2025-10-22 09:18:53 +08:00
// 导航功能
const goToUsers = ( ) => {
ElMessage . info ( '跳转到会员管理' )
// router.push('/admin/users')
}
2025-10-21 16:50:33 +08:00
const goToOrders = ( ) => {
if ( userStore . isAuthenticated ) {
router . push ( '/orders' )
} else {
ElMessage . warning ( '请先登录' )
router . push ( '/login' )
}
}
2025-10-22 09:18:53 +08:00
const goToAPI = ( ) => {
ElMessage . info ( '跳转到API管理' )
// router.push('/admin/api')
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
const goToTasks = ( ) => {
ElMessage . info ( '跳转到生成任务记录' )
// router.push('/admin/tasks')
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
const goToSettings = ( ) => {
ElMessage . info ( '跳转到系统设置' )
// router.push('/admin/settings')
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
onMounted ( ( ) => {
// 初始化数据
} )
< / script >
< style scoped >
. dashboard {
display : flex ;
min - height : 100 vh ;
background : # f8fafc ;
font - family : - apple - system , BlinkMacSystemFont , 'Segoe UI' , Roboto , sans - serif ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
/* 左侧导航栏 */
. sidebar {
2025-10-22 09:29:27 +08:00
width : 320 px ;
2025-10-22 09:18:53 +08:00
background : white ;
border - right : 1 px solid # e2e8f0 ;
display : flex ;
flex - direction : column ;
padding : 24 px 0 ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. logo {
display : flex ;
align - items : center ;
2025-10-22 09:29:27 +08:00
padding : 0 28 px ;
2025-10-22 09:18:53 +08:00
margin - bottom : 32 px ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. logo - icon {
width : 24 px ;
height : 24 px ;
background : # 3 b82f6 ;
border - radius : 4 px ;
margin - right : 12 px ;
}
2025-10-21 16:50:33 +08:00
2025-10-22 09:18:53 +08:00
. logo span {
font - size : 18 px ;
font - weight : 600 ;
color : # 1 e293b ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. nav - menu {
flex : 1 ;
2025-10-22 09:30:22 +08:00
padding : 0 24 px ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. nav - item {
display : flex ;
align - items : center ;
2025-10-22 09:30:22 +08:00
padding : 18 px 24 px ;
margin - bottom : 6 px ;
border - radius : 10 px ;
2025-10-22 09:18:53 +08:00
cursor : pointer ;
transition : all 0.2 s ease ;
color : # 64748 b ;
2025-10-22 09:30:22 +08:00
font - size : 16 px ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. nav - item : hover {
background : # f1f5f9 ;
color : # 334155 ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. nav - item . active {
background : # eff6ff ;
color : # 3 b82f6 ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. nav - item . el - icon {
2025-10-22 09:30:22 +08:00
margin - right : 16 px ;
font - size : 22 px ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. nav - item span {
2025-10-22 09:30:22 +08:00
font - size : 16 px ;
2025-10-22 09:18:53 +08:00
font - weight : 500 ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. sidebar - footer {
2025-10-22 09:31:16 +08:00
padding : 0 32 px 20 px ;
2025-10-22 09:18:53 +08:00
margin - top : auto ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. online - users ,
. system - uptime {
2025-10-22 09:31:16 +08:00
font - size : 14 px ;
2025-10-22 09:18:53 +08:00
color : # 64748 b ;
2025-10-22 09:31:16 +08:00
margin - bottom : 10 px ;
line - height : 1.5 ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. highlight {
color : # 3 b82f6 ;
font - weight : 600 ;
2025-10-22 09:31:16 +08:00
font - size : 15 px ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
/* 主内容区域 */
. main - content {
flex : 1 ;
2025-10-21 16:50:33 +08:00
display : flex ;
flex - direction : column ;
2025-10-22 09:18:53 +08:00
background : # f8fafc ;
}
/* 顶部搜索栏 */
. top - header {
background : white ;
border - bottom : 1 px solid # e2e8f0 ;
padding : 16 px 24 px ;
display : flex ;
align - items : center ;
justify - content : space - between ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. search - bar {
position : relative ;
display : flex ;
align - items : center ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. search - icon {
position : absolute ;
left : 12 px ;
color : # 94 a3b8 ;
font - size : 16 px ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. search - input {
width : 300 px ;
padding : 8 px 12 px 8 px 40 px ;
border : 1 px solid # e2e8f0 ;
border - radius : 8 px ;
font - size : 14 px ;
background : # f8fafc ;
outline : none ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. search - input : focus {
border - color : # 3 b82f6 ;
background : white ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. search - input : : placeholder {
color : # 94 a3b8 ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. header - actions {
2025-10-21 16:50:33 +08:00
display : flex ;
align - items : center ;
2025-10-22 09:18:53 +08:00
gap : 16 px ;
}
. notification - icon {
font - size : 20 px ;
color : # 64748 b ;
cursor : pointer ;
}
. user - avatar {
display : flex ;
align - items : center ;
cursor : pointer ;
}
. user - avatar img {
width : 32 px ;
height : 32 px ;
border - radius : 50 % ;
object - fit : cover ;
margin - right : 8 px ;
}
. dropdown - icon {
font - size : 12 px ;
color : # 64748 b ;
}
/* KPI 卡片区域 */
. kpi - section {
padding : 24 px ;
display : grid ;
grid - template - columns : repeat ( 3 , 1 fr ) ;
gap : 24 px ;
}
. kpi - card {
background : white ;
border - radius : 12 px ;
padding : 24 px ;
box - shadow : 0 1 px 3 px rgba ( 0 , 0 , 0 , 0.1 ) ;
display : flex ;
align - items : center ;
gap : 16 px ;
}
. kpi - icon {
width : 48 px ;
height : 48 px ;
border - radius : 12 px ;
display : flex ;
align - items : center ;
justify - content : center ;
position : relative ;
}
. kpi - icon . el - icon {
font - size : 24 px ;
}
. user - icon {
background : # fef3c7 ;
color : # f59e0b ;
}
. paid - user - icon {
background : # dbeafe ;
color : # 3 b82f6 ;
}
. paid - user - icon . currency - symbol {
position : absolute ;
bottom : - 2 px ;
right : - 2 px ;
width : 16 px ;
height : 16 px ;
background : # 3 b82f6 ;
color : white ;
border - radius : 50 % ;
font - size : 10 px ;
display : flex ;
align - items : center ;
justify - content : center ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. revenue - icon {
background : # fce7f3 ;
color : # ec4899 ;
}
. kpi - content {
2025-10-21 16:50:33 +08:00
flex : 1 ;
}
2025-10-22 09:18:53 +08:00
. kpi - title {
font - size : 14 px ;
color : # 64748 b ;
margin - bottom : 8 px ;
}
. kpi - value {
font - size : 24 px ;
font - weight : 700 ;
color : # 1 e293b ;
2025-10-21 16:50:33 +08:00
margin - bottom : 4 px ;
}
2025-10-22 09:18:53 +08:00
. kpi - trend {
font - size : 12 px ;
font - weight : 500 ;
}
. kpi - trend . positive {
color : # 059669 ;
}
. kpi - trend . negative {
color : # dc2626 ;
}
/* 图表区域 */
. charts - section {
padding : 0 24 px 24 px ;
2025-10-22 09:23:39 +08:00
display : flex ;
flex - direction : column ;
2025-10-22 09:18:53 +08:00
gap : 24 px ;
}
2025-10-22 09:23:39 +08:00
. chart - card . full - width {
width : 100 % ;
}
2025-10-22 09:18:53 +08:00
. chart - card {
background : white ;
border - radius : 12 px ;
padding : 24 px ;
box - shadow : 0 1 px 3 px rgba ( 0 , 0 , 0 , 0.1 ) ;
}
. chart - header {
display : flex ;
justify - content : space - between ;
align - items : center ;
margin - bottom : 24 px ;
}
. chart - header h3 {
font - size : 16 px ;
font - weight : 600 ;
color : # 1 e293b ;
margin : 0 ;
}
. year - selector {
display : flex ;
align - items : center ;
gap : 8 px ;
color : # 64748 b ;
2025-10-21 16:50:33 +08:00
font - size : 14 px ;
2025-10-22 09:18:53 +08:00
cursor : pointer ;
}
. chart - container {
position : relative ;
height : 300 px ;
}
2025-10-22 09:22:42 +08:00
/* 日活用户趋势图 - SVG曲线图 */
. line - chart {
2025-10-22 09:18:53 +08:00
position : relative ;
width : 100 % ;
height : 200 px ;
margin - bottom : 20 px ;
2025-10-22 09:22:42 +08:00
background : white ;
border - radius : 8 px ;
overflow : hidden ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:22:42 +08:00
. chart - svg {
2025-10-22 09:18:53 +08:00
width : 100 % ;
height : 100 % ;
}
2025-10-22 09:22:42 +08:00
. chart - line - path {
stroke - dasharray : 1000 ;
stroke - dashoffset : 1000 ;
animation : drawLine 2 s ease - in - out forwards ;
2025-10-22 09:18:53 +08:00
}
2025-10-22 09:22:42 +08:00
. chart - dot {
opacity : 0 ;
animation : fadeInDots 0.5 s ease - in - out forwards ;
animation - delay : 1.5 s ;
2025-10-22 09:18:53 +08:00
}
2025-10-22 09:22:42 +08:00
. highlight - dot {
opacity : 0 ;
animation : highlightDot 0.5 s ease - in - out forwards ;
animation - delay : 2 s ;
}
. highlight - ring {
opacity : 0 ;
animation : highlightRing 1 s ease - in - out infinite ;
animation - delay : 2 s ;
}
. tooltip - group {
opacity : 0 ;
animation : fadeInTooltip 0.5 s ease - in - out forwards ;
animation - delay : 2.5 s ;
}
. tooltip - bg {
filter : drop - shadow ( 0 4 px 12 px rgba ( 0 , 0 , 0 , 0.15 ) ) ;
2025-10-22 09:18:53 +08:00
}
2025-10-22 09:22:42 +08:00
. tooltip - arrow {
filter : drop - shadow ( 0 2 px 4 px rgba ( 0 , 0 , 0 , 0.1 ) ) ;
}
/* 动画效果 */
@ keyframes drawLine {
to {
stroke - dashoffset : 0 ;
}
}
@ keyframes fadeInDots {
to {
opacity : 1 ;
}
}
@ keyframes highlightDot {
to {
opacity : 1 ;
}
}
@ keyframes highlightRing {
0 % , 100 % {
opacity : 0.2 ;
transform : scale ( 1 ) ;
}
50 % {
opacity : 0.4 ;
transform : scale ( 1.2 ) ;
}
}
@ keyframes fadeInTooltip {
to {
opacity : 1 ;
}
}
/* 悬停效果 */
. chart - dot : hover {
r : 6 ;
fill : # 2563 eb ;
transition : all 0.2 s ease ;
}
. highlight - dot : hover {
r : 8 ;
fill : # 2563 eb ;
transition : all 0.2 s ease ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. chart - x - axis {
display : flex ;
justify - content : space - between ;
padding : 0 20 px ;
font - size : 12 px ;
color : # 64748 b ;
}
. chart - y - axis {
position : absolute ;
left : 0 ;
top : 0 ;
height : 200 px ;
display : flex ;
flex - direction : column ;
justify - content : space - between ;
font - size : 12 px ;
color : # 64748 b ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
/* 用户转化率图 */
. bar - chart {
2025-10-21 16:50:33 +08:00
display : flex ;
2025-10-22 09:18:53 +08:00
align - items : end ;
2025-10-21 16:50:33 +08:00
justify - content : space - between ;
2025-10-22 09:18:53 +08:00
height : 200 px ;
margin - bottom : 20 px ;
padding : 0 20 px ;
}
. bar {
width : 20 px ;
background : # dbeafe ;
border - radius : 2 px 2 px 0 0 ;
transition : all 0.3 s ease ;
}
. bar . active {
background : # 3 b82f6 ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. bar : hover {
background : # 2563 eb ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
/* 响应式设计 */
@ media ( max - width : 1024 px ) {
. kpi - section {
grid - template - columns : 1 fr ;
}
2025-10-21 16:50:33 +08:00
}
@ media ( max - width : 768 px ) {
2025-10-22 09:18:53 +08:00
. dashboard {
flex - direction : column ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. sidebar {
width : 100 % ;
height : auto ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. nav - menu {
display : flex ;
overflow - x : auto ;
padding : 0 16 px ;
2025-10-21 16:50:33 +08:00
}
2025-10-22 09:18:53 +08:00
. nav - item {
white - space : nowrap ;
margin - right : 16 px ;
margin - bottom : 0 ;
}
. sidebar - footer {
display : none ;
}
. search - input {
width : 200 px ;
}
. kpi - section {
padding : 16 px ;
}
. charts - section {
padding : 0 16 px 16 px ;
2025-10-21 16:50:33 +08:00
}
}
< / style >