Pārlūkot izejas kodu

feat(report): 添加打印预览的外部样式表

yusheng 1 nedēļu atpakaļ
vecāks
revīzija
88c9c4d808

+ 3 - 1
src/views/inspectionReport/components/reportTemplateWrapper.vue

@@ -514,7 +514,9 @@
         const printWindow = window.open('', '_blank');
         printWindow.document.open();
         printWindow.document.write('<html><head><title>打印预览</title>');
-
+        printWindow.document.write(
+          '<link rel="stylesheet" href="your-stylesheet-url.css" type="text/css" />'
+        );
         printWindow.document.write('</head><body>');
         printWindow.document.write(printSection.innerHTML);
         printWindow.document.write('</body></html>');