测试bug修改

This commit is contained in:
仲么了
2023-08-17 09:24:59 +08:00
parent 792e1ce7d7
commit 6bc28e4f44
33 changed files with 1066 additions and 826 deletions

View File

@@ -1,7 +1,7 @@
<template>
<view>
<view class="html2canvas" :prop="domId" :id="domId" :change:prop="canvasImage.generateImage">
<slot></slot>
<view class="html2canvas" :prop="domId" :change:prop="canvasImage.generateImage">
<slot ></slot>
</view>
</view>
</template>
@@ -33,11 +33,13 @@ export default {
setTimeout(() => {
let dom = document.getElementById(domId);
console.log(dom.offsetWidth, dom.offsetHeight);
html2canvas(dom, {
scale: 8,
html2canvas(dom, {
scale: 2,
useCORS: true,
width: dom.offsetWidth,
height: dom.offsetHeight,
dpi: 300,
taintTest: true,
}).then((canvas) => {
// this.$refs.header.appendChild(canvas);
const posterImg = canvas.toDataURL()
@@ -54,4 +56,5 @@ export default {
</script>
<style lang="scss"></style>
<style lang="scss">
</style>