提交 974091e4 编写于 作者: D DCloud_LXH

fix: 修复3.1.2版本 canvasGetImageData、canvasToTempFilePath 高度错误问题

上级 da30fa59
......@@ -4,10 +4,10 @@
:disable-scroll="disableScroll"
v-on="_listeners"
>
<canvas
ref="canvas"
width="300"
height="150"
<canvas
ref="canvas"
width="300"
height="150"
/>
<div
style="
......@@ -21,9 +21,9 @@
>
<slot />
</div>
<v-uni-resize-sensor
ref="sensor"
@resize="_resize"
<v-uni-resize-sensor
ref="sensor"
@resize="_resize"
/>
</uni-canvas>
</template>
......@@ -372,7 +372,7 @@ export default {
const maxWidth = canvas.offsetWidth - x
width = width ? Math.min(width, maxWidth) : maxWidth
const maxHeight = canvas.offsetHeight - y
height = height ? Math.min(height, maxWidth) : maxHeight
height = height ? Math.min(height, maxHeight) : maxHeight
if (!hidpi) {
if (!destWidth && !destHeight) {
destWidth = Math.round(width * pixelRatio)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册