This commit is contained in:
aihe 2024-06-25 16:13:45 +08:00
parent 0e7dcd3d1d
commit 405015882a

View File

@ -82,16 +82,13 @@ export default {
}, },
// 给外部调用api,打印自定义图 // 给外部调用api,打印自定义图
async callPrint({ paperWidth, imgRes } = {}) { async callPrint({ paperWidth, imgRes } = {}) {
try{ this.paperWidth = paperWidth || this.paperWidth
this.paperWidth = paperWidth || this.paperWidth this.imgRes = imgRes
this.imgRes = imgRes let conSta = await this.$refs.curBlueTooth.autoConnect()
let conSta = await this.$refs.curBlueTooth.autoConnect() this.$emit('autoConnectCallback', conSta)
this.$emit('autoConnectCallback', conSta) if(conSta) {
if(conSta) { await this.handlePrint()
await this.handlePrint() return true
return true
}
} catch(e){
} }
} }
} }