This commit is contained in:
pplokijuhyg 2020-02-11 14:16:07 +08:00
parent d3103d5f7b
commit 31ad08e125

View File

@ -1,3 +1,4 @@
### 代码
```
var canvas2 = document.createElement("canvas");
var _canvas = document.getElementById('app');
@ -20,7 +21,7 @@ console.log(canvas2.style.width)
background: null,
windowWidth:document.body.scrollWidth,
windowHeight:document.body.scrollHeight,
x:(document.body.scrollWidth - width) / 2,
x:0,
y:0
}).then(canvas => {
let imgUrl = `<img style="width:100%" src="${canvas.toDataURL()}" />`
@ -31,4 +32,5 @@ console.log(canvas2.style.width)
});
}
})
```
```
html2canvas