forked from github/dataease
Merge pull request #3876 from dataease/pr@dev@fix_link_down_pdf
fix(公共链接): 导出pdf出现loading
This commit is contained in:
commit
c86c94a372
@ -623,7 +623,14 @@ export default {
|
||||
|
||||
document.getElementById('preview-canvas-main').style.height = (scrollHeight + 'px')
|
||||
setTimeout(() => {
|
||||
html2canvas(document.getElementById(domId)).then(canvas => {
|
||||
const timer = setInterval(() => {
|
||||
const containerDom = document.getElementById(domId)
|
||||
const masks = containerDom.getElementsByClassName('el-loading-mask')
|
||||
const mapLoadingArr = containerDom.getElementsByClassName('.symbol-map-loading')
|
||||
if (masks?.length) {
|
||||
const hideMasks = [...masks].filter(item => item.style?.display === 'none')
|
||||
if (masks.length === hideMasks.length && !mapLoadingArr?.length) {
|
||||
html2canvas(containerDom).then(canvas => {
|
||||
const snapshot = canvas.toDataURL('image/jpeg', 1) // 是图片质量
|
||||
this.dataLoading = false
|
||||
this.$emit('change-load-status', false)
|
||||
@ -634,6 +641,10 @@ export default {
|
||||
this.pdfExportShow = true
|
||||
}
|
||||
})
|
||||
clearInterval(timer)
|
||||
}
|
||||
}
|
||||
}, 1000)
|
||||
}, 2500)
|
||||
}, 500)
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user