优化打印效果
This commit is contained in:
@@ -7,69 +7,40 @@
|
||||
<meta charset="UTF-8" />
|
||||
<title>Print preview</title>
|
||||
<style>
|
||||
@page {
|
||||
size: auto;
|
||||
}
|
||||
|
||||
html {
|
||||
padding-bottom: 100px;
|
||||
}
|
||||
|
||||
.title_wrap {
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 50px 0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.min_title {
|
||||
font-size: 18px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.item {
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.item.b {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
@media print {
|
||||
h1 {
|
||||
font-size: 1.5em;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
@page {
|
||||
size: auto;
|
||||
margin-top: 50px;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<section id="app">
|
||||
<RS:2><L><CB>####### 6 ######</CB></L><BR>
|
||||
<RS:2><C>*沙县小吃*</C><BR>
|
||||
<RS:2><CB>--已在线支付--</CB><BR>
|
||||
<RS:2><C>----------------</C><BR>
|
||||
送达时间: 2021-01-04 13:28:50<BR>
|
||||
送达时间: 2021-01-04 12:28:50<BR>
|
||||
订单编号: 1200897812792015996<BR>
|
||||
-------01号篮子------<BR>
|
||||
<L>爆炒肥肠 x2 80.0</L><BR>
|
||||
<L>蚂蚁上树 x1 12.3</L><BR>
|
||||
[会员减配送费: 0.0]<BR>
|
||||
<RS:1>[商家承担的配送费: 1.0]<BR>
|
||||
配送费: ¥1.0<BR>
|
||||
<B>实付: ¥43.3</B><BR>
|
||||
<B>手机号: 13012345678</B><BR>
|
||||
<RS:2><B>仲恺高新区惠风西3路1号</B><BR>
|
||||
备 注: 不要辣椒<BR>
|
||||
发票抬头: 惠州市博实结科技有限公司<BR>
|
||||
<LOGO>
|
||||
<CUT>
|
||||
<section>---------------------</section>
|
||||
<section>---------------------</section>
|
||||
<section>---------------------</section>
|
||||
<section>---------------------</section>
|
||||
<section>---------------------</section>
|
||||
<section>---------------------</section>
|
||||
<center><em>{{data.shop_name}}</em></center>
|
||||
<section v-for="item in data.carts" :key="item.id">
|
||||
{{item.name}} x{{item.number}} {{item.salePrice}}
|
||||
<br />
|
||||
</section>
|
||||
<section>---------------------</section>
|
||||
<section>---------------------</section>
|
||||
<section>---------------------</section>
|
||||
<section>---------------------</section>
|
||||
<section>---------------------</section>
|
||||
<section>---------------------</section>
|
||||
</section>
|
||||
<script type="module">
|
||||
const { ipcRenderer } = require("electron");
|
||||
@@ -85,9 +56,10 @@
|
||||
|
||||
onMounted(() => {
|
||||
ipcRenderer.on("getParams", (event, arg) => {
|
||||
console.log(arg);
|
||||
data.value = JSON.parse(arg);
|
||||
ipcRenderer.send("printStart");
|
||||
});
|
||||
ipcRenderer.send("printStart");
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user