guhongwei 4 years ago
parent
commit
2bf115c88a
1 changed files with 12 additions and 0 deletions
  1. 12 0
      public/index.html

+ 12 - 0
public/index.html

@@ -14,4 +14,16 @@
     <div id="app"></div>
     <!-- built files will be auto injected -->
   </body>
+  <script language=javascript>
+    // 禁止右键菜单
+      document.oncontextmenu = function () { return false; };
+      // 禁止文字选择
+      document.onselectstart = function () { return false; };
+      // 禁止复制
+      document.oncopy = function () { return false; };
+      // 禁止剪切
+      document.oncut = function () { return false; };
+      // 禁止粘贴
+      document.onpaste = function () { return false; };
+  </script>
 </html>