diff --git a/src/views/dashboard/panel/Layout.vue b/src/views/dashboard/panel/Layout.vue index b54a23f2..02b93fea 100644 --- a/src/views/dashboard/panel/Layout.vue +++ b/src/views/dashboard/panel/Layout.vue @@ -29,7 +29,7 @@ limitations under the License. --> :h="item.h" :i="item.i" :key="item.i" - @click="clickGrid(item)" + @click="clickGrid(item, $event)" :class="{ active: dashboardStore.activedGridItem === item.i }" :drag-ignore-from="dragIgnoreFrom" > @@ -55,10 +55,13 @@ export default defineComponent({ const dashboardStore = useDashboardStore(); const selectorStore = useSelectorStore(); - function clickGrid(item: LayoutConfig) { + function clickGrid(item: LayoutConfig, event: Event) { dashboardStore.activeGridItem(item.i); dashboardStore.selectWidget(item); - if (item.type === "Tab") { + if ( + item.type === "Tab" && + (event.target as HTMLDivElement)?.className !== "tab-layout" + ) { dashboardStore.setActiveTabIndex(0); } }