From d3a8cb9c173294c8f4fbab71882b902736a8e9fc Mon Sep 17 00:00:00 2001 From: engigu Date: Mon, 19 Jan 2026 20:12:01 +0800 Subject: [PATCH] fix: opt page style --- .../components/pages/dashboard/Dashboard.vue | 70 ++++++++----------- 1 file changed, 29 insertions(+), 41 deletions(-) diff --git a/web/src/components/pages/dashboard/Dashboard.vue b/web/src/components/pages/dashboard/Dashboard.vue index c2ef7e8..bc25eef 100644 --- a/web/src/components/pages/dashboard/Dashboard.vue +++ b/web/src/components/pages/dashboard/Dashboard.vue @@ -22,6 +22,7 @@ interface CateData { } let state = reactive({ + trendDays: 30, basicData: { message_total_num: 0, hosted_message_total_num: 0, @@ -66,7 +67,8 @@ const getTrendStatisticData = async () => { // 根据屏幕大小决定请求的天数 const isSmallScreen = window.innerWidth < 768; const days = isSmallScreen ? 15 : 30; - + state.trendDays = days; + const rsp = await request.get(`/statistic?type=trend&days=${days}`); if (rsp && rsp.data && rsp.data.code == 200) { state.trendData = rsp.data.data; @@ -116,7 +118,7 @@ const loadAllStatisticData = async () => { const renderLineChart = () => { const latestSendData = state.trendData.latest_send_data || []; - + const options = { series: [ { @@ -327,9 +329,20 @@ const renderLineChart = () => { }, legend: { position: 'top', - horizontalAlign: 'center', - offsetY: 0, - offsetX: 0 + horizontalAlign: 'right', + floating: true, + offsetY: -20, + offsetX: -5, + fontSize: '10px', + markers: { + width: 6, + height: 6, + radius: 3 + }, + itemMargin: { + horizontal: 5, + vertical: 0 + } } } }] @@ -443,41 +456,16 @@ onMounted(() => {