| | |
| | | // 导入全局的svg图标 |
| | | import '@/plugins/svgIcon' |
| | | |
| | | import Iconify from '@iconify/iconify' |
| | | import epJson from '@iconify/json/json/ep.json' |
| | | import faJson from '@iconify/json/json/fa.json' |
| | | import faSolidJson from '@iconify/json/json/fa-solid.json' |
| | | |
| | | Iconify.addCollection(epJson) |
| | | Iconify.addCollection(faJson) |
| | | Iconify.addCollection(faSolidJson) |
| | | |
| | | export * from '@iconify/iconify' |
| | | |
| | | export default Iconify |
| | | |
| | | // 初始化多语言 |
| | | import { setupI18n } from '@/plugins/vueI18n' |
| | | |
| | |
| | | |
| | | const { setupApp } = WujieVue |
| | | |
| | | import { micros, getUrl } from '@/utils/micors' |
| | | import hostMap from "@/utils/hostMap"; |
| | | |
| | | import { micros } from '@/utils/micors' |
| | | |
| | | import lifecycles from '@/utils/lifecycles' // 生命周期函数 |
| | | |
| | | // import credentialsFetch from "@/utils/fetch"; |
| | | |
| | | const isProduction = process.env.NODE_ENV === "production"; |
| | | |
| | | // 创建实例 |
| | | const setupAll = async () => { |
| | |
| | | |
| | | setupAll() |
| | | |
| | | const degrade = window.localStorage.getItem("degrade") === "true" || !window.Proxy || !window.CustomElementRegistry; |
| | | const props = { |
| | | jump: (name) => { |
| | | router.push({ name }); |
| | | }, |
| | | }; |
| | | |
| | | // 模拟接口查询,实现动动态子应用加载与动态路由添加 |
| | | const setMiro = () => |
| | | new Promise((resolve) => { |
| | |
| | | component: () => import(`@/views/micro/index.vue`) |
| | | } |
| | | router.addRoute('home', obj) |
| | | const attrs = isProduction ? { src: hostMap("//localhost/") } : {}; |
| | | setupApp({ |
| | | name: value.name, |
| | | url: getUrl(value.name, micros), |
| | | name: "fast", |
| | | url: hostMap("//localhost:90/"), |
| | | attrs, |
| | | exec: true, |
| | | ...lifecycles |
| | | }) |
| | | alive: true, |
| | | plugins: [{ cssExcludes: ["https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"] }], |
| | | props, |
| | | // 引入了的第三方样式不需要添加credentials |
| | | // fetch: (url, options) => |
| | | // url.includes(hostMap("//localhost:90/")) ? credentialsFetch(url, options) : window.fetch(url, options), |
| | | degrade, |
| | | ...lifecycles, |
| | | }); |
| | | // setupApp({ |
| | | // name: value.name, |
| | | // url: getUrl(value.name, micros), |
| | | // exec: true, |
| | | // ...lifecycles |
| | | // }) |
| | | } |
| | | resolve(true) |
| | | }) |