Skip to content

Commit 37c51be

Browse files
author
likai
committed
fix: 修复使用imgSrc传入图片高分屏下图片显示小的问题
1 parent 1e6e7b7 commit 37c51be

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,6 +1399,8 @@ export default class ScreenShot {
13991399
const imgContainer = new Image();
14001400

14011401
imgContainer.src = imgSrc;
1402+
imgContainer.width = this.screenShotImageController.width;
1403+
imgContainer.height = this.screenShotImageController.height;
14021404
imgContainer.crossOrigin = "Anonymous";
14031405
imgContainer.onload = () => {
14041406
// 装载截图的dom为null则退出

0 commit comments

Comments
 (0)