Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dashboard/src/components/extension/McpServersSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,9 @@ export default {
mounted() {
this.getServers();
this.refreshInterval = setInterval(() => {
// 轮询时间延长到30秒,减少服务器压力,同时保持数据相对新鲜
this.getServers();
}, 5000);
}, 30000);
},
unmounted() {
if (this.refreshInterval) {
Expand Down
6 changes: 3 additions & 3 deletions dashboard/src/views/ExtensionPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ const {
<InstalledPluginsTab :state="pageState" />

<!-- 指令面板标签页内容 -->
<v-tab-item v-show="activeTab === 'components'">
<v-tab-item v-if="activeTab === 'components'">
<div class="mb-4 pt-4 pb-4">
<div class="d-flex align-center flex-wrap" style="gap: 12px">
<h2 class="text-h2 mb-0">{{ tm("tabs.handlersOperation") }}</h2>
Comment on lines +165 to 168
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question (bug_risk): Switching from v-show to v-if changes lifecycle behavior and may reset internal state on each tab switch.

Any internal state within these tab contents (e.g., scroll position, unsaved form data, expanded panels) will now be lost on each tab change. If some tabs need to preserve state, keep those sections on v-show, or lift the persistent state into a parent component that isn’t conditionally rendered.

Expand All @@ -180,7 +180,7 @@ const {
</v-tab-item>

<!-- 已安装的 MCP 服务器标签页内容 -->
<v-tab-item v-show="activeTab === 'mcp'">
<v-tab-item v-if="activeTab === 'mcp'">
<div class="mb-4 pt-4 pb-4">
<div class="d-flex align-center flex-wrap" style="gap: 12px">
<h2 class="text-h2 mb-0">{{ tm("tabs.installedMcpServers") }}</h2>
Expand All @@ -198,7 +198,7 @@ const {
</v-tab-item>

<!-- Skills 标签页内容 -->
<v-tab-item v-show="activeTab === 'skills'">
<v-tab-item v-if="activeTab === 'skills'">
<div class="mb-4 pt-4 pb-4">
<div class="d-flex align-center flex-wrap" style="gap: 12px">
<h2 class="text-h2 mb-0">{{ tm("tabs.skills") }}</h2>
Expand Down
Loading