likaia / js-screen-shot

web端自定义截图插件(原生JS版)
https://www.kaisir.cn/js-screen-shot/
MIT License
808 stars 107 forks source link

页面出现空白 #153

Closed zyf-2016 closed 8 months ago

zyf-2016 commented 8 months ago

Version of js-screen-shot

1.9.9-rc.11

Operating system and its version

Windows

Browser and its version

Google Chrome 122.0.6261.70

Sandbox to reproduce

No response

What happened?

1709118803552

用的html2canvas模式,理论上截图应该都是天蓝色背景,但是右边出现了空白

报错信息

No response

likaia commented 8 months ago

Hello @zyf-2016. Your feedback has been received, and you will be notified in the issue area when the problem is resolved. 你好 @zyf-2016,已收到你反馈的问题,问题解决后将在issue区域通知你。

likaia commented 8 months ago

Version of js-screen-shot

1.9.9-rc.11

Operating system and its version

Windows

Browser and its version

Google Chrome 122.0.6261.70

Sandbox to reproduce

No response

What happened?

1709118803552

用的html2canvas模式,理论上截图应该都是天蓝色背景,但是右边出现了空白

报错信息

No response

页面是缩放了吗?

zyf-2016 commented 8 months ago

是的,浏览器缩放设置的是100%。页面就是一个div元素宽高100%,用chrome浏览器100%复现,edge浏览器是正常的

likaia commented 8 months ago

是的,浏览器缩放设置的是100%。页面就是一个div元素宽高100%,用chrome浏览器100%复现,edge浏览器是正常的

代码贴一下,我试试

zyf-2016 commented 8 months ago
<template>
    <div style="width:100vw;height:100vh;background:skyblue"></div>
</template>

<script setup lang="ts">
import ScreenShot from "js-web-screen-shot";
import { onMounted } from "vue";
onMounted(() => {
    new ScreenShot({
        enableWebRtc: false
    })
})
</script>
zyf-2016 commented 8 months ago

chrome 121.0.6167.140版本也是正常的,应该是浏览器版本兼容问题

zyf-2016 commented 8 months ago

不好意思,是我自己安装的扩展程序导致的,浪费您时间了