From 535864383468666449266c43eab854d1a99e0422 Mon Sep 17 00:00:00 2001 From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com> Date: Thu, 21 Jul 2022 16:38:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8F=92=E4=BB=B6=E5=8C=85=E5=BC=95?= =?UTF-8?q?=E7=94=A8=E8=B7=AF=E5=BE=84=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/AsyncComponent/index.vue | 49 +------------------ 1 file changed, 2 insertions(+), 47 deletions(-) diff --git a/frontend/src/components/AsyncComponent/index.vue b/frontend/src/components/AsyncComponent/index.vue index 9e1e53a1ae..806d5e9de3 100644 --- a/frontend/src/components/AsyncComponent/index.vue +++ b/frontend/src/components/AsyncComponent/index.vue @@ -42,60 +42,15 @@ export default { window.SyncComponentCache = {} } let res - console.log(1, this.$route); - const urlMap = { - 'system-role': 'SystemRole', - 'system-dept': 'SystemDept', - 'system-auth': 'SystemAuth', - 'email-task': 'TaskEmail', - 'system-dept-form': 'SystemDeptFormn', - 'system-role-form': 'SystemRoleForm', - 'email-task-form': 'TaskEmailForm', - 'system-ukey': 'SystemUkey' - } - - // if (this.$route.name === 'system-role') { - // this.mode = () => import('de-plugins/src/views/xpack/role/index.vue'); - // return - // } - - // if (this.$route.name === 'system-role-form') { - // this.mode = () => import('de-plugins/src/views/xpack/role/form.vue'); - // return - // } - - // if (this.$route.name === 'dataset') { - // this.mode = () => import('de-plugins/src/views/xpack/dataset/rowpermissions/rowPermissions.vue'); - // return - // } - - // if (this.$route.name === 'system-dept') { - // this.mode = () => import('de-plugins/src/views/xpack/dept/index.vue'); - // return - // } - - // if (this.$route.name === 'system-auth') { - // this.mode = () => import('de-plugins/src/views/xpack/auth/index.vue'); - // return - // } - if (!window.SyncComponentCache[this.url]) { - if (urlMap[this.$route.name]) { - window.SyncComponentCache[this.url] = get(`/static/${urlMap[this.$route.name]}.js`) - } - - // window.SyncComponentCache[this.url] = get(this.url) - + window.SyncComponentCache[this.url] = get(this.url) // window.SyncComponentCache[this.url] = Axios.get(this.url) res = await window.SyncComponentCache[this.url] } else { res = await window.SyncComponentCache[this.url] } - - console.log(1, res) - const Fn = Function - this.mode = new Fn(`return ${res}`)() + this.mode = new Fn(`return ${res.data || res}`)() /* if (res && res.data) { const Fn = Function this.mode = new Fn(`return ${res.data || res}`)()