0

我在一个项目中使用single-spa,它由一个root-config和多个vue微前端组成,我需要从vuetify overlay中显示overlay ,有没有办法从mount功能中实现?

根-config.js

import * as singleSpa from "single-spa";
let appUrl = ["/app1", "/app2"];

appUrl.forEach(url => {
  singleSpa.registerApplication({
    name: "@test" + url,
    app: () => System.import("@test" + url),
    activeWhen: [url],
  });
})
/* here need to set loader */

main.js

import Vue from 'vue'
import singleSpaVue from 'single-spa-vue'

import App from './App.vue'
import router from './router'
import vuetify from './plugins/vuetify'

Vue.config.productionTip = false

const vueLifecycles = singleSpaVue({
  Vue,
  appOptions: {
    render (h) {
      return h(App, {
        props: {
          
        }
      })
    },
    router,
    vuetify
  }
})

export const bootstrap = [vueLifecycles.bootstrap,doneBootstrap]
export const mount = vueLifecycles.mount
export const unmount = vueLifecycles.unmount

function doneBootstrap() {
  /* here need to unset loader */
  return Promise.resolve();
}
4

0 回答 0