This commit is contained in:
aihe 2024-06-23 12:09:19 +08:00
parent d24fd1c0fb
commit 39a47d3a76
3 changed files with 8 additions and 9 deletions

View File

@ -3,9 +3,9 @@
<template v-slot:header>
<view class="blcok-white" style="margin-top: 0;padding-top: 0;padding-bottom: 0;">
<view >
<u-row custom-style="gap: 10rpx;">
<u-row custom-style="gap: 15rpx;">
<u-button @click="discoveryPrinter">
{{searchLoading?'搜索中...':'搜索周边设备'}}
{{searchLoading?'搜索中...':'搜索设备'}}
</u-button>
<u-button @click="stopDiscoveryPrinter">停止搜索</u-button>
@ -200,6 +200,7 @@ export default {
console.log("连接蓝牙 设备=====", deviceId)
let bl = await new Promise((resolve)=> {
bluetoothTool.connDevice(deviceId,(result) => {
console.log('bluetoothTool.connDevice result ====== ', result)
let lb = !!result
_this.isStateOn = lb
resolve(lb)

View File

@ -4,7 +4,6 @@
<u-button @click="handlePrint" type="primary">确认打印</u-button>
</template>
<template v-slot:content>
<view class="pt-20 pb-10">打印内容</view>
<view class="canvas-con">
<canvas :canvas-id="canvasId" :style="{width:canvasWidth + 'px', height: canvasHeight + 'px'}"></canvas>
</view>
@ -154,12 +153,11 @@ export default {
<style scoped lang="scss">
.canvas-con{
width: 100%;
overflow: auto;
}
/*图片隐藏到窗口外*/
canvas {
// position: absolute;
// z-index: -999;
// top: -999px;
position: absolute;
z-index: -999;
top: -999px;
}
</style>

View File

@ -3,9 +3,9 @@
<template v-slot:header>
<view class="blcok-white" style="margin-top: 0;">
<view >
<u-row custom-style="gap: 10rpx;">
<u-row custom-style="gap: 15rpx;">
<u-button @click="discoveryPrinter">
{{searchLoading?'搜索中...':'搜索周边设备'}}
{{searchLoading?'搜索中...':'搜索设备'}}
</u-button>
<u-button @click="stopDiscoveryPrinter">停止搜索</u-button>