Browse Source

禁止复制

jwyu 2 years ago
parent
commit
d490d87dde
1 changed files with 18 additions and 9 deletions
  1. 18 9
      src/views/hzyb/Index.vue

+ 18 - 9
src/views/hzyb/Index.vue

@@ -132,6 +132,24 @@ const handleCloseAudioPup=()=>{
     </div>
 </template>
 
+<style lang="scss">
+// 禁止页面打印
+@media print{
+  body{
+    display: none;
+  }
+}
+
+*{
+    user-select: none;
+    -moz-user-select:-moz-none;
+    -o-user-select:none;
+    -webkit-user-select: none;
+    -ms-user-select: none;
+    -khtml-user-select:none;
+}
+</style>
+
 <style lang="scss" scoped>
 .popup-audio-box{
     position: fixed;
@@ -216,13 +234,4 @@ const handleCloseAudioPup=()=>{
         }
     }
 }
-*{
-    user-select: none;
-    -moz-user-select:-moz-none;
-    moz-user-select: none;
-    -o-user-select:none;
-    -webkit-user-select: none;
-    -ms-user-select: none;
-    -khtml-user-select:none;
-}
 </style>