mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 17:05:10 +00:00
fix tab
This commit is contained in:
parent
852662a0f0
commit
d9413e88f3
@ -29,7 +29,7 @@ limitations under the License. -->
|
|||||||
:h="item.h"
|
:h="item.h"
|
||||||
:i="item.i"
|
:i="item.i"
|
||||||
:key="item.i"
|
:key="item.i"
|
||||||
@click="clickGrid(item)"
|
@click="clickGrid(item, $event)"
|
||||||
:class="{ active: dashboardStore.activedGridItem === item.i }"
|
:class="{ active: dashboardStore.activedGridItem === item.i }"
|
||||||
:drag-ignore-from="dragIgnoreFrom"
|
:drag-ignore-from="dragIgnoreFrom"
|
||||||
>
|
>
|
||||||
@ -55,10 +55,13 @@ export default defineComponent({
|
|||||||
const dashboardStore = useDashboardStore();
|
const dashboardStore = useDashboardStore();
|
||||||
const selectorStore = useSelectorStore();
|
const selectorStore = useSelectorStore();
|
||||||
|
|
||||||
function clickGrid(item: LayoutConfig) {
|
function clickGrid(item: LayoutConfig, event: Event) {
|
||||||
dashboardStore.activeGridItem(item.i);
|
dashboardStore.activeGridItem(item.i);
|
||||||
dashboardStore.selectWidget(item);
|
dashboardStore.selectWidget(item);
|
||||||
if (item.type === "Tab") {
|
if (
|
||||||
|
item.type === "Tab" &&
|
||||||
|
(event.target as HTMLDivElement)?.className !== "tab-layout"
|
||||||
|
) {
|
||||||
dashboardStore.setActiveTabIndex(0);
|
dashboardStore.setActiveTabIndex(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user