diff --git a/src/views/dashboard/controls/Tab.vue b/src/views/dashboard/controls/Tab.vue index fc2ebbc6..a0a15c22 100644 --- a/src/views/dashboard/controls/Tab.vue +++ b/src/views/dashboard/controls/Tab.vue @@ -284,12 +284,14 @@ limitations under the License. --> return; } await queryExpressions(); - const index = (props.data.children || []).findIndex((tab: any) => tab.enable !== false) || 0; - const items = ((props.data.children || [])[index] || {}).children; - dashboardStore.setCurrentTabItems(items || []); - dashboardStore.activeGridItem(0); - activeTabIndex.value = index; - needQuery.value = true; + if ((props.data.children || [])[activeTabIndex.value]?.enable === false) { + const index = (props.data.children || []).findIndex((tab: any) => tab.enable !== false) || 0; + const items = ((props.data.children || [])[index] || {}).children; + dashboardStore.setCurrentTabItems(items || []); + dashboardStore.activeGridItem(0); + activeTabIndex.value = index; + needQuery.value = true; + } }, ); watch(