update
This commit is contained in:
parent
e79d27601b
commit
e078f996a1
@ -24,12 +24,7 @@ $(".download").click(() => {
|
|||||||
x:(document.body.scrollWidth - width)/2,
|
x:(document.body.scrollWidth - width)/2,
|
||||||
y:0
|
y:0
|
||||||
}).then(canvas => {
|
}).then(canvas => {
|
||||||
// canvas为转换后的Canvas对象
|
|
||||||
// imgBlob = canvas.toDataURL('image/jpeg', 1.0);
|
|
||||||
// imgBlob = imgBlob.toString().substring(imgBlob.indexOf(",") + 1);
|
|
||||||
// window.saveAs(imgBlob, 'my-node.png');
|
|
||||||
let imgUrl = Canvas2Image.convertToPNG(canvas,$("#app").width(),$("#app").height())
|
let imgUrl = Canvas2Image.convertToPNG(canvas,$("#app").width(),$("#app").height())
|
||||||
console.log($(imgUrl).attr('src'))
|
|
||||||
imgUrl = $(imgUrl).attr('src')
|
imgUrl = $(imgUrl).attr('src')
|
||||||
// 如果浏览器支持msSaveOrOpenBlob方法(也就是使用IE浏览器的时候),那么调用该方法去下载图片
|
// 如果浏览器支持msSaveOrOpenBlob方法(也就是使用IE浏览器的时候),那么调用该方法去下载图片
|
||||||
if (window.navigator.msSaveOrOpenBlob) {
|
if (window.navigator.msSaveOrOpenBlob) {
|
||||||
|
Loading…
Reference in New Issue
Block a user