测试bug修改
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user