mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 09:00:50 +00:00
fix tab
This commit is contained in:
parent
852662a0f0
commit
d9413e88f3
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user