小程序中不能使用document.getElementById("section")吗?
我项目中报错Cannot read property 'getElementById' of undefined。不知道问题出在哪 调用这个函数就报错Cannot read property 'getElementById' of undefined saveImg(){
var shareContent = document.getElementById("section");
html2canvas(shareContent).then((canvas) => {
this.src1 = canvas.toDataURL() ;
})
setTimeout(()=>{
this.selectSrc()
},1500)
},