更新
This commit is contained in:
@@ -6,38 +6,33 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Print preview</title>
|
||||
<style>
|
||||
section {
|
||||
font-size: 24px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
<div class="html2canvas" style="position: fixed;top: -1000%;">
|
||||
<section style="font-size: 22px;">#B1 B2</section>
|
||||
<section style="font-size: 22px;">喔喔奶茶 x12</section>
|
||||
<section style="font-size: 22px;">麻辣味</section></section></section>
|
||||
<section style="font-size: 22px;">03-08 16:32 ¥123.00</section>
|
||||
<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");
|
||||
// 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'
|
||||
// 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);
|
||||
})
|
||||
// html2canvas(document.querySelector('.html2canvas')).then(canvas => {
|
||||
// console.log(canvas)
|
||||
// document.querySelector('#app').appendChild(canvas)
|
||||
// }).catch(err=> {
|
||||
// console.log(err);
|
||||
// })
|
||||
|
||||
// createApp({
|
||||
// setup() {
|
||||
|
||||
Reference in New Issue
Block a user