12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta http-equiv="X-UA-Compatible" content="ie=edge" />
- <title>Document</title>
- <style>
- body,
- html {
- padding: 0;
- margin: 0;
- font-size: 14px;
- }
- @page {
- margin: 0px;
- }
- .text-center {
- text-align: center;
- }
- .mt {
- /* margin-top: 5px; */
- }
- .mt-1 {
- margin-top: 10px;
- }
- .mt-2 {
- margin-top: 20px;
- }
- .mt-3 {
- margin-top: 30px;
- }
- .ml-1 {
- margin-left: 10px;
- }
- .p-1 {
- padding: 10px;
- }
- .font-bold {
- font-weight: bold;
- }
- .w-50 {
- width: 50%;
- }
- .itemtitle{
- width: 25%;
- padding:4px 5px;
- border-right:1px solid #000;
- }
- .itemstyle{
- width: 75%;
- padding:4px 5px;
- }
- </style>
- </head>
- <body id="bd" style="padding:15px 5px;box-sizing: border-box;">
- </body>
- <script>
- const { ipcRenderer } = require('electron')
- ipcRenderer.on('webview-print-render', (event, info) => {
- // 执行渲染
- console.log(info);
- document.getElementById('bd').innerHTML = info.html
- ipcRenderer.sendToHost('webview-print-do')
- })
- </script>
- <style>
- #bd {}
- </style>
- </html>
|