洪海涛 4 년 전
부모
커밋
34aa8ddba9
2개의 변경된 파일20개의 추가작업 그리고 10개의 파일을 삭제
  1. 15 7
      src/views/monthlyReport/components/anchor.vue
  2. 5 3
      src/views/monthlyReport/components/menu.vue

+ 15 - 7
src/views/monthlyReport/components/anchor.vue

@@ -11,14 +11,22 @@
         }"
         }"
       />
       />
 
 
-      <div
-        class="mi"
-        @contextmenu.prevent="openMenu($event, item)"
-        @click="change(item)"
-        @mousemove="mouseMoveItem({ event: $event, item })"
+      <el-tooltip
+        class="item"
+        effect="dark"
+        :enterable="false"
+        :content="item.name"
+        placement="top-start"
       >
       >
-        <span class="title"> {{ item.name }}</span>
-      </div>
+        <div
+          class="mi"
+          @contextmenu.prevent="openMenu($event, item)"
+          @click="change(item)"
+          @mousemove="mouseMoveItem({ event: $event, item })"
+        >
+          <span class="title"> {{ item.name }}</span>
+        </div>
+      </el-tooltip>
 
 
       <span v-if="item.children && item.children.length">
       <span v-if="item.children && item.children.length">
         <Anchor
         <Anchor

+ 5 - 3
src/views/monthlyReport/components/menu.vue

@@ -40,17 +40,19 @@ export default {
   },
   },
   methods: {
   methods: {
     init() {
     init() {
-      this.show = false
       this.menuStyle = {
       this.menuStyle = {
         left: `${this.menuData.event.clientX + 10}px`,
         left: `${this.menuData.event.clientX + 10}px`,
         top: `${this.menuData.event.clientY + 15}px`
         top: `${this.menuData.event.clientY + 15}px`
       }
       }
+      setTimeout(() => {
+        this.show = false
+      }, 200)
     },
     },
     closeMenu() {
     closeMenu() {
       clearTimeout(this.timeout)
       clearTimeout(this.timeout)
       this.timeout = setTimeout(() => {
       this.timeout = setTimeout(() => {
-        // this.show = true
-      }, 0)
+        this.show = true
+      }, 100)
     }
     }
   }
   }
 }
 }