Merge pull request #204 from jamebal/dev

perf: iframe预览,没有加载完成也显示
This commit is contained in:
jmal 2024-06-22 19:09:12 +08:00 committed by GitHub
commit bb035a4101
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -70,19 +70,13 @@ export default {
this.services.push({label: service, value: this.url})
}
}
} else {
this.url = undefined
this.services = []
}
const iframe = this.$refs.iframeContent;
if (iframe.attachEvent) {
iframe.attachEvent('onload', () => {
this.$nextTick(() => {
this.onReady()
})
} else {
iframe.onload = () => {
this.onReady()
}
this.url = undefined
this.services = []
this.$emit('loadFileFailed')
}
},
base64EncodeUnicode(str) {