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 } } }