Browse Source

预览也禁用 右键和快捷键

黄琪勇 11 tháng trước cách đây
mục cha
commit
27ad30726b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/page-instrument/App.tsx

+ 1 - 1
src/page-instrument/App.tsx

@@ -98,7 +98,7 @@ export default defineComponent({
       const _loading = document.getElementById("loading");
       _loading && document.body.removeChild(_loading);
       // console.log(query);
-      if (query.platform == "pc") {
+      if (query.platform == "pc" || query.isPreView) {
         document.body.addEventListener("keyup", (e: KeyboardEvent) => onKeyBoard(e));
         // 禁用右键菜单
         document.addEventListener("contextmenu", function (event) {