qiankun官方文档:https://qiankun.umijs.org/zh/guide/getting-started版本:"qiankun":"^2.4.0","vue":"^2.5.2"vue入口文件main.js普通Vue入口文件写法newVue({el:'#app',router,store,components:{App},apolloProvider,template:''})添加微前端后:letinstance=null;函数渲染(props={}){const{container}=props;instance=newVue({router,store,apolloProvider,render:h=>h(App),}).$mount(container?container.querySelector('#app'):'#app');}//webpack打包公共文件路径runtimerender();}//exportasyncfunctionbootstrap(){console.log('[vue]vueappbootstraped');}exportasyncfunctionmount(props){console.log('[vue]propsfrommainframework',道具);render(props);//props为微前端渲染的节点}exportasyncfunctionunmount(){//instance.$destroy();//瞬间ce.$el.innerHTML='';//实例=空;//router=null;}主应用注册微前端入口import{registerMicroApps,start}from'qiankun';registerMicroApps([{name:'subapp',container:'#subAppContainer',entry:'http://10.168.0.0:8080/console',//activeRule:'/govern',},],{//父组件向子组件传递数据beforeLoad:app=>{//window.qiankunroutebase='/microApp';}});//start()//在activeRule页面触发启动