修复蓝牙传输数据

This commit is contained in:
微微一笑
2025-10-31 15:35:03 +08:00
parent 3eeffdb62c
commit 3526f28d06

View File

@ -1,6 +1,6 @@
<template>
<view>
<canvas type="2d" canvas-id="reusableCanvas" :width="currentCanvasWidth" :height="currentCanvasHeight"
<canvas canvas-id="reusableCanvas" :width="currentCanvasWidth" :height="currentCanvasHeight"
class="offscreen-canvas"></canvas>
</view>
</template>
@ -149,7 +149,6 @@
// 5. 异步绘制并获取像素数据(串行处理避免冲突)
await new Promise((resolve, reject) => {
ctx.draw(false, () => {
setTimeout(() => {
uni.canvasGetImageData({
canvasId: 'reusableCanvas',
x: 0,
@ -170,7 +169,6 @@
reject(err)
}
});
}, 100);
});
});
@ -202,6 +200,5 @@
position: fixed;
left: -9999px;
top: -9999px;
visibility: hidden;
}
</style>