From 405015882a342e6d90f19642931472458ba09983 Mon Sep 17 00:00:00 2001 From: aihe <961836564@qq.com> Date: Tue, 25 Jun 2024 16:13:45 +0800 Subject: [PATCH] uu --- .../render-template-native.vue | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/components/tpx-bluetooth-print/render-template-native.vue b/components/tpx-bluetooth-print/render-template-native.vue index 96dfff7..75593be 100644 --- a/components/tpx-bluetooth-print/render-template-native.vue +++ b/components/tpx-bluetooth-print/render-template-native.vue @@ -82,16 +82,13 @@ export default { }, // 给外部调用api,打印自定义图 async callPrint({ paperWidth, imgRes } = {}) { - try{ - this.paperWidth = paperWidth || this.paperWidth - this.imgRes = imgRes - let conSta = await this.$refs.curBlueTooth.autoConnect() - this.$emit('autoConnectCallback', conSta) - if(conSta) { - await this.handlePrint() - return true - } - } catch(e){ + this.paperWidth = paperWidth || this.paperWidth + this.imgRes = imgRes + let conSta = await this.$refs.curBlueTooth.autoConnect() + this.$emit('autoConnectCallback', conSta) + if(conSta) { + await this.handlePrint() + return true } } }