|
@@ -36,6 +36,7 @@ export default defineComponent({
|
|
|
const route = useRoute()
|
|
|
console.log('🚀 ~ route', route)
|
|
|
const data = reactive({
|
|
|
+ downLoading: false,
|
|
|
refreshing: false,
|
|
|
loading: false,
|
|
|
finished: false,
|
|
@@ -89,6 +90,7 @@ export default defineComponent({
|
|
|
data.imgShow = true
|
|
|
}
|
|
|
const saveImg = async () => {
|
|
|
+ if (data.downLoading) return;
|
|
|
const container: HTMLElement = document.querySelector(
|
|
|
`[data-src='${images.value[data.startPosition]}'] img`
|
|
|
)!
|
|
@@ -97,6 +99,7 @@ export default defineComponent({
|
|
|
message: '保存中',
|
|
|
duration: 0
|
|
|
})
|
|
|
+ data.downLoading = true
|
|
|
html2canvas(container, {
|
|
|
allowTaint: true,
|
|
|
useCORS: true,
|
|
@@ -121,6 +124,9 @@ export default defineComponent({
|
|
|
showFailToast('保存失败')
|
|
|
t.close()
|
|
|
})
|
|
|
+ .finally(() => {
|
|
|
+ data.downLoading = false
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
|