This commit is contained in:
aihe 2024-06-23 15:56:29 +08:00
parent 54faa1a8d2
commit f5ecf271e1
2 changed files with 4 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<tpx-bluetooth-native ref="curBlueTooth"> <tpx-bluetooth-native ref="curBlueTooth">
<template v-slot:button> <template v-slot:button>
<u-button @click="handlePrint" type="primary">确认打印</u-button> <u-button @click="handlePrint" type="primary">打印</u-button>
</template> </template>
<template v-slot:content> <template v-slot:content>
<view class="canvas-con"> <view class="canvas-con">
@ -142,7 +142,7 @@ export default {
} }
let conSta = await this.$refs.curBlueTooth.autoConnect() let conSta = await this.$refs.curBlueTooth.autoConnect()
if(conSta) { if(conSta) {
// await this.handlePrint() await this.handlePrint()
return true return true
} }
} catch(e){ } catch(e){

View File

@ -48,7 +48,8 @@ export default {
} }
}, },
mounted () { mounted () {
this.startPrint({ imageUrl: 'https://image-c.weimobwmc.com/ol-6NoX9/ed4f6d5da41f4606811aa8018e2918da.jpg', paperWidth: this.paperWidth }) // Test
// this.startPrint({ imageUrl: 'https://image-c.weimobwmc.com/ol-6NoX9/ed4f6d5da41f4606811aa8018e2918da.jpg', paperWidth: this.paperWidth })
}, },
unmounted() { unmounted() {