feat: 支持通过URL参数切换管理界面标签页

- 添加URL参数解析功能,支持 ?tab=apiKeys 等参数直接跳转到指定标签页
- 切换标签页时自动更新URL,方便分享和书签
- 支持浏览器前进后退按钮,保持标签页状态同步
- 默认dashboard标签页不显示URL参数,保持简洁
This commit is contained in:
breaker
2025-07-25 01:25:33 +08:00
parent 561f5ffc7f
commit f149be0d0c
2 changed files with 43 additions and 1 deletions

View File

@@ -208,7 +208,7 @@
<button
v-for="tab in tabs"
:key="tab.key"
@click="activeTab = tab.key"
@click="switchTab(tab.key)"
:class="['tab-btn flex-1 py-3 px-6 text-sm font-semibold transition-all duration-300',
activeTab === tab.key ? 'active' : 'text-gray-700 hover:bg-white/10 hover:text-gray-900']"
>