测试ucharts

This commit is contained in:
仲么了
2023-03-27 09:39:50 +08:00
parent 02e950130d
commit 3f966d4024
4 changed files with 44 additions and 90 deletions

View File

@@ -18,7 +18,6 @@ export default {
methods: {
htmlToCanvas (option) {
let posterImg = option.posterImg;
console.log(posterImg);
this.$emit('renderFinish', posterImg);
}
}
@@ -33,13 +32,10 @@ export default {
console.log(123);
// 获取设备dpi
setTimeout(() => {
console.log(domId);
let dom = document.getElementById(domId);
console.log(dom);
html2canvas(dom, {
scale: 8,
useCORS: true,
}).then((canvas) => {
// this.$refs.header.appendChild(canvas);
const posterImg = canvas.toDataURL()