소스 검색

鼠标右键

yuwandanmian 1 년 전
부모
커밋
f5f26ea042
1개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  1. 7 2
      src/views/recordsRoom/qc/caseViews.vue

+ 7 - 2
src/views/recordsRoom/qc/caseViews.vue

@@ -38,7 +38,7 @@
           </li>
         </ul>
       </div>
-      <div class="cont-left-file" @mouseup.prevent="handleMouseupHandle">
+      <div class="cont-left-file" @mouseup.prevent="handleMouseupHandle" @contextmenu.prevent="handelContextmenu">
         <div v-if="is_active == 0">
           <mainHomePage ref="main" :data="mainHomeData" :if-file="ifFile" />
         </div>
@@ -280,12 +280,17 @@ export default {
       this.getCaseQualityResults()
     },
     // 鼠标右击事件
+    handelContextmenu() {
+      if (this.dialogData.text) {
+        this.dialogData.bSwitch = true
+      }
+    },
+    // 鼠标事件
     handleMouseupHandle() {
       const text = window.getSelection().toString()
       if (text.trim().length) {
         this.dialogData.blbh = this.is_active_blbh
         this.dialogData.text = text
-        this.dialogData.bSwitch = true
       }
     },
     // 获取新病案指控结果