更换贺报下载的方法9

This commit is contained in:
xuxingjun
2024-12-25 17:45:51 +08:00
parent 0f44179953
commit 30f42c3a3c

View File

@@ -182,9 +182,9 @@ export default {
console.log(2222); console.log(2222);
// 使用 html2canvas 捕获图像,并等待其完成 // 使用 html2canvas 捕获图像,并等待其完成
const canvas = await html2canvas(domElement, { const canvas = await html2canvas(this.$refs.generateImg, {
width: domElement.offsetWidth, width: this.$refs.generateImg.offsetWidth,
height: domElement.offsetHeight, height: this.$refs.generateImg.offsetHeight,
backgroundColor: '#fff', backgroundColor: '#fff',
scale: 1, scale: 1,
dpi: 300 dpi: 300
@@ -248,7 +248,7 @@ export default {
}, },
close() { close() {
this.$emit('child-colse', '1') this.$emit('child-colse', '1')
this.$refs.generateImg = ''; this.$refs.generateImg = null;
} }
} }
} }