yusheng 2 сар өмнө
parent
commit
ab085bc02a

+ 6 - 1
src/views/doc/components/browse.vue

@@ -58,7 +58,12 @@
         var iframe = document.getElementById('Iframe');
         var iframe = document.getElementById('Iframe');
         var iframeDocument = iframe.contentWindow.document;
         var iframeDocument = iframe.contentWindow.document;
         var container = iframeDocument.querySelectorAll('.container');
         var container = iframeDocument.querySelectorAll('.container');
-        this.$refs.aa.init(container[0].innerHTML);
+        this.$refs.aa.init(
+          container[0].innerHTML.replace(
+            /src="https?:\/\/[^\/]+(\/[^"]*)"/g,
+            `src="${window.location.origin}$1"`
+          )
+        );
       },
       },
       setFileUrl(row) {
       setFileUrl(row) {
         this.loading = true;
         this.loading = true;