mqhe2007 / vue-module-loader Goto Github PK
View Code? Open in Web Editor NEWvue 微前端 Let you use the micro-frontends architecture to build Vue applications
Home Page: https://mqhe2007.github.io/vue-module-loader-doc/
vue 微前端 Let you use the micro-frontends architecture to build Vue applications
Home Page: https://mqhe2007.github.io/vue-module-loader-doc/
vm.$dynamicComponent
怎么用???使用场景,有没有demo
已上线的项目使用的是vue-module-loader版本为1.0.3,请问可以升级容器为最新版本使用vue3,而子应用不变还是使用老版本vue2+vue-module-loader(1.0.3)吗?
import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'
import Vuex from 'vuex'
import vueModuleLoader from 'vue-module-loader'
Vue.use(VueRouter)
Vue.use(Vuex)
const router = new VueRouter()
const store = new Vuex.Store()
Vue.use(vueModuleLoader, {
router, // 合并路由配置必传。
store // 合并状态配置必传。
})
let app = new Vue({
router,
store,
render: h => h(App, 'vue-module-loader'),
}).$mount('#app')
const moduleA = require('./admincraft-showcase.umd.js')
app.$moduleLoader(moduleA)
引用后打包后的模板 要怎么在页面上显示出来
你好,如何在模块包里面全局引入当前包公共插件?
我本地测试发现了一个问题,就是嵌套路由会丢失母版页
比如 有多个模块 主应用, 应用A 应用B 应用C。。。
如果模块越来越多,就需要 模块退出后,自动卸载模块
比如 有多个模块 主应用, 应用A 应用B 应用C。。。
如果模块越来越多,就需要 模块退出后,自动卸载模块
配置了一个全局的path: "*"跳转到404,每次在加载模块包之前就直接跳到404了
项目是用vue-module-creator创建的
module文件使用项目内builde:app命令打包,放在本项目public/module文件夹下面
app.$moduleLoader({
logo: 'http://192.168.31.86:8081/module/logo/myAsync.umd.min.js'
}).then(() => {
// 加载过程完毕
console.log('加载完成')
})
app.$mount('#app')
使用moduleLoader加载控制台输出加载完毕页面没有相关模块的加载
配置了一个全局的path: "*"跳转到404,每次在加载模块包之前就直接跳到404了
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.