You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by qi...@apache.org on 2022/06/06 08:36:08 UTC

[skywalking-booster-ui] branch main updated: fix: activate the correct tab index after renaming a Tabs name (#103)

This is an automated email from the ASF dual-hosted git repository.

qiuxiafan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-booster-ui.git


The following commit(s) were added to refs/heads/main by this push:
     new c875c95  fix: activate the correct tab index after renaming a Tabs name (#103)
c875c95 is described below

commit c875c95c20f3ffba47130f14a785f9392ce67d96
Author: Fine0830 <fi...@outlook.com>
AuthorDate: Mon Jun 6 16:36:04 2022 +0800

    fix: activate the correct tab index after renaming a Tabs name (#103)
---
 src/store/modules/demand-log.ts                               | 1 -
 src/views/dashboard/panel/Layout.vue                          | 9 ++++++---
 src/views/dashboard/panel/Tool.vue                            | 2 +-
 src/views/dashboard/related/ebpf/components/EBPFSchedules.vue | 7 ++++++-
 4 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/src/store/modules/demand-log.ts b/src/store/modules/demand-log.ts
index 0eaf7d1..8756509 100644
--- a/src/store/modules/demand-log.ts
+++ b/src/store/modules/demand-log.ts
@@ -1,4 +1,3 @@
-import { ElMessage } from "element-plus";
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
diff --git a/src/views/dashboard/panel/Layout.vue b/src/views/dashboard/panel/Layout.vue
index b54a23f..02b93fe 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);
       }
     }
diff --git a/src/views/dashboard/panel/Tool.vue b/src/views/dashboard/panel/Tool.vue
index 8d8ed37..31ea55b 100644
--- a/src/views/dashboard/panel/Tool.vue
+++ b/src/views/dashboard/panel/Tool.vue
@@ -80,7 +80,7 @@ limitations under the License. -->
     </div>
     <div class="flex-h tools" v-loading="loading" v-if="!appStore.isMobile">
       <div class="tool-icons flex-h" v-if="dashboardStore.editMode">
-        <el-dropdown content="Controls" placement="bottom">
+        <el-dropdown content="Controls" placement="bottom" :persistent="false">
           <i>
             <Icon class="icon-btn" size="sm" iconName="control" />
           </i>
diff --git a/src/views/dashboard/related/ebpf/components/EBPFSchedules.vue b/src/views/dashboard/related/ebpf/components/EBPFSchedules.vue
index 21539fd..0cd8f9d 100644
--- a/src/views/dashboard/related/ebpf/components/EBPFSchedules.vue
+++ b/src/views/dashboard/related/ebpf/components/EBPFSchedules.vue
@@ -40,7 +40,12 @@ limitations under the License. -->
         @change="changeAggregateType"
         class="selector mr-10"
       />
-      <el-popover placement="bottom" :width="680" trigger="click">
+      <el-popover
+        placement="bottom"
+        :width="680"
+        trigger="click"
+        :persistent="false"
+      >
         <template #reference>
           <el-button type="primary" size="small">
             {{ t("processSelect") }}