|
@@ -277,6 +277,8 @@ export default {
|
|
|
// imageTofile是给截图范围内的父级元素自定义的ref名称
|
|
|
// let canvasBox = this.$refs.imageTofile
|
|
|
let canvasBox = document.getElementById('forestWarmSuperMap')
|
|
|
+ let toolbar=document.getElementById('toolbar');
|
|
|
+ canvasBox.removeChild(toolbar);
|
|
|
console.log(canvasBox)
|
|
|
// 获取父级的宽高
|
|
|
const width = parseInt(window.getComputedStyle(canvasBox).width)
|
|
@@ -300,6 +302,7 @@ export default {
|
|
|
console.log(dataURL)
|
|
|
this.downloadImage(dataURL)
|
|
|
})
|
|
|
+ canvasBox.appendChild(toolbar)
|
|
|
},
|
|
|
//下载图片
|
|
|
downloadImage(url) {
|