From b4668a820cb11703613c59d6529898e230be0b28 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期一, 04 八月 2025 14:57:18 +0800
Subject: [PATCH] bug修改
---
src/utils/print.js | 30 +++++++-----------------------
1 files changed, 7 insertions(+), 23 deletions(-)
diff --git a/src/utils/print.js b/src/utils/print.js
index d4c72e1..13b07cf 100644
--- a/src/utils/print.js
+++ b/src/utils/print.js
@@ -1,16 +1,17 @@
-export function printHtml(html) {
+export function loadPrintStyle() {
let style = getStyle();
- let container = getContainer(html);
-
document.body.appendChild(style);
- document.body.appendChild(container);
+}
+export function printHtml(html) {
+ let container = getContainer(html);
+ document.body.appendChild(container);
getLoadPromise(container).then(() => {
window.print();
- document.body.removeChild(style);
document.body.removeChild(container);
});
}
+
// 璁剧疆鎵撳嵃鏍峰紡
function getStyle() {
@@ -32,24 +33,7 @@
@page {
margin-top: 0;
margin-bottom: 0
- }
- .div-2-column {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- }
- .m-h2 {
- text-align: center;
- font-size: 1.17em;
- margin-top: 50px;
- font-weight: bold;
- }
- #tr {
- height: 30px;
- }
- .txt-center {
- text-align: center;
- }
+ }
`;
let style = document.createElement("style");
style.innerHTML = styleContent;
--
Gitblit v1.8.0