Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

二维码的canvas截图显示不出来 #128

Open
UU-see opened this issue Jan 8, 2025 · 0 comments
Open

二维码的canvas截图显示不出来 #128

UU-see opened this issue Jan 8, 2025 · 0 comments

Comments

@UU-see
Copy link

UU-see commented Jan 8, 2025

<div data-v-c0f80114="" class="qrcode__wrap target" qroptions="[object Object]"><canvas width="1027" height="1027" style="width: 100%;"></canvas></div>
像这样的元素截图显示不出来

    const blob = await domToBlob(clonedElement, {
      scale: type ? 1 : 0.2,
      quality: type ? 1 : 0.2,
      fetch: {
        requestInit: {
          cache: 'no-cache',
        },
      },
    })
    const formData = new FormData()
    formData.append('file', blob, 'cover.jpeg')
    const { url } = await getImgS3Api(formData)
    return url
  } catch (error) {
    console.error('Screenshot failed:', error)
    throw new Error('生成截图失败')
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant