cashier_desktop/public/print.html

60 lines
1.6 KiB
HTML

<!--
~ Copyright (c) 2023. Author Hubert Formin <2399270194@qq.com>
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Print preview</title>
</head>
<body>
<div id="app">
<div class="html2canvas">
<section>#B5 B6</section>
<section>喔喔奶茶 x22</section>
<section>麻辣味</section></section></section>
<section>03-08 16:32 ¥123.00</section>
</div>
</div>
<script type="module">
// const { ipcRenderer } = require("electron");
// import {
// createApp,
// ref,
// onMounted,
// } from "../node_modules/vue/dist/vue.esm-browser.js";
// import html2canvas from '../node_modules/html2canvas/dist/html2canvas.esm.js'
// html2canvas(document.querySelector('.html2canvas')).then(canvas => {
// console.log(canvas)
// document.querySelector('#app').appendChild(canvas)
// }).catch(err=> {
// console.log(err);
// })
// createApp({
// setup() {
// const data = ref({});
// onMounted(() => {
// ipcRenderer.on("getParams", (event, arg) => {
// // console.log(arg);
// data.value = JSON.parse(arg);
// setTimeout(() => {
// ipcRenderer.send("printStart");
// },500)
// });
// });
// return {
// data,
// };
// },
// }).mount("#app");
</script>
</body>
</html>