html2canvas(document.getElementById('resource_chart'),{ useCORS:true, logging:false, $('#resource_chart').width(),//设置canvas尺寸与所截图尺寸相同,防止白边 height:$('#resource_chart').height(),//防止白边 }).then(function (canvas) {