Quellcode durchsuchen

09.28 快捷键注释

zhuohongkui vor 1 Jahr
Ursprung
Commit
79c10f43cd

+ 4 - 2
public/pdf/web/viewer.html

@@ -774,6 +774,7 @@ See https://github.com/adobe-type-tools/cmap-resources
 
                 <div class="verticalToolbarSeparator hiddenMediumView"></div>
 
+                <!-- 编辑 -->
                 <div
                   id="editorModeButtons"
                   class="splitToolbarButton toggled hide_btn"
@@ -809,10 +810,11 @@ See https://github.com/adobe-type-tools/cmap-resources
                   id="editorModeSeparator"
                   class="verticalToolbarSeparator"
                 ></div>
-
+                
+                <!-- 功能 -->
                 <button
                   id="secondaryToolbarToggle"
-                  class="toolbarButton"
+                  class="toolbarButton hide_btn"
                   title="Tools"
                   tabindex="48"
                   data-l10n-id="tools"

+ 8 - 8
public/pdf/web/viewer.js

@@ -2698,7 +2698,7 @@ const PDFViewerApplication = {
       passive: false
     });
     window.removeEventListener("click", webViewerClick);
-    window.removeEventListener("keydown", webViewerKeyDown);
+    // window.removeEventListener("keydown", webViewerKeyDown);
     window.removeEventListener("resize", _boundEvents.windowResize);
     window.removeEventListener("hashchange", _boundEvents.windowHashChange);
     window.removeEventListener("beforeprint", _boundEvents.windowBeforePrint);
@@ -13368,13 +13368,13 @@ function renderProgress(index, total, l10n) {
     progressPerc.textContent = msg;
   });
 }
-window.addEventListener("keydown", function (event) {
-  if (event.keyCode === 80 && (event.ctrlKey || event.metaKey) && !event.altKey && (!event.shiftKey || window.chrome || window.opera)) {
-    window.print();
-    event.preventDefault();
-    event.stopImmediatePropagation();
-  }
-}, true);
+// window.addEventListener("keydown", function (event) {
+//   if (event.keyCode === 80 && (event.ctrlKey || event.metaKey) && !event.altKey && (!event.shiftKey || window.chrome || window.opera)) {
+//     window.print();
+//     event.preventDefault();
+//     event.stopImmediatePropagation();
+//   }
+// }, true);
 if ("onbeforeprint" in window) {
   const stopPropagationIfNeeded = function (event) {
     if (event.detail !== "custom") {

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
public/pdf/web/viewer.js.map


+ 8 - 8
src/components/pdf/index.vue

@@ -55,18 +55,18 @@ export default {
   },
   computed: {
     url() {
-      // if (this.is_encrypt) {
-      //   return this.pdfUrl;
-      // }
-      // return this.pdfUrl.indexOf("http") > -1
-      //   ? this.pdfUrl
-      //   : OSS_URL + this.pdfUrl;
-      return 'http://192.168.2.36:8080/Pig.pdf'
+      if (this.is_encrypt) {
+        return this.pdfUrl;
+      }
+      return this.pdfUrl.indexOf("http") > -1
+        ? this.pdfUrl
+        : OSS_URL + this.pdfUrl;
+      // return "http://192.168.2.36:8080/Pig.pdf";
     },
     pdf_watermarkText() {
       return this.userInfo.phone
         ? this.userInfo.phone.replace(this.userInfo.phone.slice(3, 7), "****")
-        : watermarkText;
+        : this.watermarkText;
     },
   },
   mounted() {

+ 1 - 0
vue.config.js

@@ -58,6 +58,7 @@ module.exports = {
 	},
     devServer: {
         port: 8080,
+        disableHostCheck: true,
         proxy: {
             // 选项写法
             '/': {

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.