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