diff --git a/cwd-admin/src/components/CountTo.vue b/cwd-admin/src/components/CountTo.vue new file mode 100644 index 0000000..32ab02d --- /dev/null +++ b/cwd-admin/src/components/CountTo.vue @@ -0,0 +1,68 @@ + + + diff --git a/cwd-admin/src/styles/components/analyticsvisit.less b/cwd-admin/src/styles/components/analyticsvisit.less index 02a1898..393297f 100644 --- a/cwd-admin/src/styles/components/analyticsvisit.less +++ b/cwd-admin/src/styles/components/analyticsvisit.less @@ -46,6 +46,10 @@ color: var(--text-primary); display: flex; align-items: baseline; + /* 使用等宽数字,防止数字滚动时宽度抖动 */ + font-variant-numeric: tabular-nums; + /* 确保数字字体回退到系统等宽字体,增强兼容性 */ + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; } .trend { diff --git a/cwd-admin/src/views/AnalyticsVisitView/index.vue b/cwd-admin/src/views/AnalyticsVisitView/index.vue index 9fef02f..fe2b9db 100644 --- a/cwd-admin/src/views/AnalyticsVisitView/index.vue +++ b/cwd-admin/src/views/AnalyticsVisitView/index.vue @@ -21,12 +21,12 @@
全站总访问量
-
{{ overview.totalPv }}
+
今日访问量
- {{ overview.todayPv }} +
本周访问量
- {{ overview.weekPv }} +
本月访问量
- {{ overview.monthPv }} +
有访问记录的页面数
-
{{ overview.totalPages }}
+
@@ -215,6 +215,7 @@ import { onMounted, onBeforeUnmount, ref, nextTick, watch, inject, computed } from "vue"; import type { Ref } from "vue"; import * as echarts from "echarts"; +import CountTo from "../../components/CountTo.vue"; import { fetchVisitOverview, fetchVisitPages,