From 18f7e93d5bb111348c1a47291866352dcf295c4e Mon Sep 17 00:00:00 2001 From: guoju0808 Date: Wed, 26 Aug 2026 12:24:55 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=B6=E4=BB=96=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=A7=BB=E5=8A=A8=E7=AB=AF=E9=80=82=E9=85=8D?= =?UTF-8?q?=20(doctor/sponsor/executor)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit doctor/Home.vue: 完善移动端适配 - 原只有 .cols-row → 1fr 一行规则 - 加 welcome-bar 紧凑 padding (20/24 → 14/16) + flex-wrap - 加 welcome-text h2 字号 20 → 16, p 13 → 12 - 加 section padding 16/20 → 12/14, section-title 15 → 14 - 加 breadcrumb 字号 13 → 12, .doctor-home padding 16/20 → 12 sponsor/Home.vue: 补 stats-grid-5 媒体规则 - 原只有 stats-grid-3/2 媒体规则, 漏 stats-grid-5 - 加 stats-grid-5 → 2 列 + ≤480px → 1 列 - 加整页 padding 16 → 12, breadcrumb 13 → 12 - 加 stat-card padding 24 → 16/12 + min-height 120 → 90 - 加 stat-label/Value/Desc 字号缩小 - 加 .section padding 20/24 → 14/16 executor/Overview.vue: 补 stats-grid 5 列媒体规则 - 原 5 个 KPI 卡 5 列布局在 mobile 完全挤爆, 但媒体查询里没改 grid-template-columns - 加 .stats-grid → 2 列 + ≤480px → 1 列 - 加 stat-card padding/min-height 调整 - 加 stat-label/Value 字号缩小 - 加 .section padding 20/24 → 14/16 admin/Workbench.vue: 已三档断点 (1200/768/480), 无需调整 manager/Workbench.vue: 已加 5 → 2 列布局, 无需调整 --- ry-vue3/src/views/doctor/Home.vue | 19 ++++++++++++++++++- ry-vue3/src/views/executor/Overview.vue | 24 ++++++++++++++++++++++++ ry-vue3/src/views/sponsor/Home.vue | 21 +++++++++++++++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) diff --git a/ry-vue3/src/views/doctor/Home.vue b/ry-vue3/src/views/doctor/Home.vue index 264a31d..6c905b7 100644 --- a/ry-vue3/src/views/doctor/Home.vue +++ b/ry-vue3/src/views/doctor/Home.vue @@ -237,7 +237,24 @@ onBeforeUnmount(() => { .simple-item.disabled .item-title { color: #bfbfbf; } .simple-item.disabled:hover .item-title { color: #bfbfbf; } .empty { padding: 16px 0; text-align: center; color: #bfbfbf; font-size: 13px; } -@media (max-width: 768px) { .cols-row { grid-template-columns: 1fr; } } + +/* 移动端适配 (≤768px) */ +@media (max-width: 768px) { + .doctor-home { padding: 12px !important; } + .breadcrumb { font-size: 12px !important; margin-bottom: 8px !important; } + + /* cols-row: 双栏 → 单栏 */ + .cols-row { grid-template-columns: 1fr !important; } + + /* welcome-bar: 紧凑 padding + 字号缩小 */ + .welcome-bar { padding: 14px 16px !important; flex-wrap: wrap !important; gap: 8px; margin-bottom: 12px !important; } + .welcome-text h2 { font-size: 16px !important; margin-bottom: 4px !important; } + .welcome-text p { font-size: 12px !important; } + + /* section: padding 收窄 */ + .section { padding: 12px 14px !important; margin-bottom: 12px !important; } + .section-title { font-size: 14px !important; margin-bottom: 10px !important; } +} /* 二维码弹窗 */ .qrcode-wrap { text-align: center; padding: 12px 0; } diff --git a/ry-vue3/src/views/executor/Overview.vue b/ry-vue3/src/views/executor/Overview.vue index 9dc5f7a..1434117 100644 --- a/ry-vue3/src/views/executor/Overview.vue +++ b/ry-vue3/src/views/executor/Overview.vue @@ -203,5 +203,29 @@ onMounted(() => { loadStats() }) /* 表格字号收紧 */ :deep(.el-table) { font-size: 12px !important; } + + /* 5 个 KPI 卡: 桌面 5 列 → mobile 2 列 + 字号缩小 */ + .stats-grid { + grid-template-columns: repeat(2, 1fr) !important; + gap: 10px !important; + } + .stat-card { + padding: 16px 12px !important; + min-height: 90px !important; + } + .stat-label { + font-size: 12px !important; + margin-bottom: 8px !important; + } + .stat-value { font-size: 24px !important; } + + /* 消息通知 */ + .section { padding: 14px 16px !important; } + .section-title { font-size: 14px !important; margin-bottom: 12px !important; } + } + + /* ≤480px 极窄屏: 5 卡 → 1 列 */ + @media (max-width: 480px) { + .stats-grid { grid-template-columns: 1fr !important; } } \ No newline at end of file diff --git a/ry-vue3/src/views/sponsor/Home.vue b/ry-vue3/src/views/sponsor/Home.vue index 019be0e..9732343 100644 --- a/ry-vue3/src/views/sponsor/Home.vue +++ b/ry-vue3/src/views/sponsor/Home.vue @@ -137,7 +137,28 @@ onMounted(() => { .more:hover { text-decoration: underline; } @media (max-width: 768px) { + /* 5/3/2 列面板: 全部 ≤768px 改为 2 列布局 */ + .stats-grid-5 { grid-template-columns: repeat(2, 1fr) !important; } .stats-grid-3 { grid-template-columns: repeat(2, 1fr); } .stats-grid-2 { grid-template-columns: 1fr; } + + /* 整页 padding 收窄 */ + .sponsor-home { padding: 12px !important; } + .breadcrumb { font-size: 12px !important; margin-bottom: 8px !important; } + + /* 卡片 padding 收窄 + 字号缩小 */ + .stat-card { padding: 16px 12px !important; min-height: 90px; } + .stat-label { font-size: 12px !important; margin-bottom: 8px !important; } + .stat-value { font-size: 24px !important; margin-bottom: 4px !important; } + .stat-desc { font-size: 11px !important; } + + /* 消息通知 */ + .section { padding: 14px 16px !important; } + .section-title { font-size: 14px !important; margin-bottom: 12px !important; } +} + +/* ≤480px 极窄屏: 5 卡 → 1 列 */ +@media (max-width: 480px) { + .stats-grid-5 { grid-template-columns: 1fr !important; } } \ No newline at end of file