Merge pull request #5730 from dataease/pr@dev_st_fix

Pr@dev st fix
This commit is contained in:
dataeaseShu 2023-07-21 10:51:14 +08:00 committed by GitHub
commit ea72262b28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,15 +54,13 @@ export default {
// window.SyncComponentCache[this.url] = Axios.get(this.url)
res = await window.SyncComponentCache[this.url]
} else {
this.mode = await window.SyncComponentCache[this.url]
return
res = await window.SyncComponentCache[this.url]
}
if (res) {
const Fn = Function
const dynamicCode = res.data || res
const component = new Fn(`return ${dynamicCode}`)()
this.mode = component.default || component
window.SyncComponentCache[this.url] = this.mode
}
}
}