fix: update

This commit is contained in:
Fine 2023-12-20 16:16:58 +08:00
parent 20292e2a1c
commit c91e30a4c3

View File

@ -284,12 +284,14 @@ limitations under the License. -->
return; return;
} }
await queryExpressions(); await queryExpressions();
if ((props.data.children || [])[activeTabIndex.value]?.enable === false) {
const index = (props.data.children || []).findIndex((tab: any) => tab.enable !== false) || 0; const index = (props.data.children || []).findIndex((tab: any) => tab.enable !== false) || 0;
const items = ((props.data.children || [])[index] || {}).children; const items = ((props.data.children || [])[index] || {}).children;
dashboardStore.setCurrentTabItems(items || []); dashboardStore.setCurrentTabItems(items || []);
dashboardStore.activeGridItem(0); dashboardStore.activeGridItem(0);
activeTabIndex.value = index; activeTabIndex.value = index;
needQuery.value = true; needQuery.value = true;
}
}, },
); );
watch( watch(