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() { // 由子组件实现