对接完毕下单
This commit is contained in:
34
public/print.html
Normal file
34
public/print.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<!--
|
||||
~ Copyright (c) 2023. Author Hubert Formin <2399270194@qq.com>
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Print preview</title>
|
||||
<style>
|
||||
@page {
|
||||
size: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<section id="main">测试打印</section>
|
||||
<!-- <script type="module">
|
||||
const { ipcRenderer } = require("electron");
|
||||
window.onload = () => {
|
||||
ipcRenderer.on("webview-print-render", (event, info) => {
|
||||
// 执行渲染
|
||||
const main = document.getElementById("main");
|
||||
main.appendChild(info.shop_name);
|
||||
ipcRenderer.send("load-ok", {
|
||||
width: document.body.clientWidth,
|
||||
height: document.body.clientHeight,
|
||||
});
|
||||
ipcRenderer.sendToHost("did-finish-load");
|
||||
});
|
||||
};
|
||||
</script> -->
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user