Browse Source

修改打印

hella_online_20241011
lijuncheng 4 months ago
parent
commit
92d4af8025
  1. 4
      src/pages/print/index.vue

4
src/pages/print/index.vue

@ -5,7 +5,7 @@
</view> </view>
<view class="" style="font-size: 40rpx; margin-top: 20rpx; margin-left: 20rpx;"> <view class="" style="font-size: 40rpx; margin-top: 20rpx; margin-left: 20rpx;">
打印时间 {{time}} 打印时间 : {{time}}
</view> </view>
<button style="position: fixed; bottom: 0;right: 0; width: 100%;" @click="printImage" type="primary" >app打印测试</button> <button style="position: fixed; bottom: 0;right: 0; width: 100%;" @click="printImage" type="primary" >app打印测试</button>
@ -40,7 +40,7 @@
methods: { methods: {
// #ifdef APP // #ifdef APP
printImage(){ printImage(){
var content =`<html><body><h1 class="font-40">(${this.userName})用户,测试打印功能</h1><h1 class="font-40">打印时间+${this.time}zuot</h1> </body></html>` var content =`<html><body><h1 class="font-40">(${this.userName})用户,测试打印功能</h1><h1 class="font-40">打印时间 : ${this.time}</h1> </body></html>`
testModule.doHTMLPrint(content) testModule.doHTMLPrint(content)
} }
// #endif // #endif

Loading…
Cancel
Save