mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 12:03:05 +08:00
fix(嵌入式): 插件无法正常加载
This commit is contained in:
parent
4a34dc54c1
commit
e0d2d96c72
@ -8,7 +8,7 @@ import { i18n } from '@/plugins/vue-i18n'
|
||||
import * as Vue from 'vue'
|
||||
import axios from 'axios'
|
||||
import * as Pinia from 'pinia'
|
||||
import * as vueRouter from 'vue-router'
|
||||
import router from '@/router'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
import request from '@/config/axios'
|
||||
const { wsCache } = useCache()
|
||||
@ -122,12 +122,12 @@ onMounted(async () => {
|
||||
const xpack = await window[moduleName].mapping[attrs.jsname]
|
||||
plugin.value = xpack.default
|
||||
} else {
|
||||
window['Vue'] = Vue
|
||||
window['Axios'] = axios
|
||||
window['Pinia'] = Pinia
|
||||
window['vueRouter'] = vueRouter
|
||||
window['MittAll'] = useEmitt().emitter.all
|
||||
window['I18n'] = i18n
|
||||
window['VueDe'] = Vue
|
||||
window['AxiosDe'] = axios
|
||||
window['PiniaDe'] = Pinia
|
||||
window['vueRouterDe'] = router
|
||||
window['MittAllDe'] = useEmitt().emitter.all
|
||||
window['I18nDe'] = i18n
|
||||
const url = `/xpackComponent/pluginStaticInfo/${moduleName}`
|
||||
request.get({ url }).then(async res => {
|
||||
new Function(res.data || res)()
|
||||
|
Loading…
Reference in New Issue
Block a user