From b159ddb765978ba5b4d6b19ea583c612e2c4a5c3 Mon Sep 17 00:00:00 2001 From: liuwei Date: Wed, 19 Mar 2025 14:14:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E8=B7=B3=E8=BD=AC=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/stats_dashboard/templates/base.html | 29 +++++++++++++++------ 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/plugins/stats_dashboard/templates/base.html b/plugins/stats_dashboard/templates/base.html index da9a0cf..4df8d7d 100644 --- a/plugins/stats_dashboard/templates/base.html +++ b/plugins/stats_dashboard/templates/base.html @@ -82,25 +82,24 @@ background-color="#545c64" text-color="#fff" active-text-color="#ffd04b" - @select="handleSelect" - router> - + @select="handleSelect"> + 首页概览 - + 插件统计 - + 用户统计 - + 群组统计 - + 错误日志 @@ -148,7 +147,21 @@ methods: { handleSelect(key, keyPath) { this.currentView = key; - this.loadData(); + // 添加页面跳转逻辑 + const routes = { + '1': '/', + '2': '/plugins', + '3': '/users', + '4': '/groups', + '5': '/errors' + }; + + // 如果当前不在对应页面,则跳转 + const currentPath = window.location.pathname; + const targetPath = routes[key]; + if (currentPath !== targetPath && targetPath !== undefined) { + window.location.href = targetPath; + } }, loadData() { // 由子组件实现