Commit 8f40443b by crushh

Merge branch 'feature/微前端' into dev

parents 07bb1c2e 81da83fd
......@@ -37,35 +37,29 @@ Vue.prototype.$tips = function({ message = '提示', type = 'success' }) {
let instance = null;
function render(props = {}) {
const { container } = props;
instance = new Vue({
router,
store,
render: h => h(App)
}).$mount(container ? container.querySelector('#app') : '#app');
}
// 独立运行时
if (!window.__POWERED_BY_QIANKUN__) {
console.log('独立运行');
limit({
createApp() {
window.getLimit(router, 'marketing').then(() => {
render();
window.getLimit(router, 'marketing', '/marketing/').then(() => {
instance = new Vue({
router,
store,
render: h => h(App)
}).$mount(container ? container.querySelector('#app') : '#app');
});
}
});
}
// 独立运行时
if (!window.__POWERED_BY_QIANKUN__) {
console.log('独立运行');
render();
}
export async function bootstrap() {
console.log('[vue] vue app bootstraped');
}
export async function mount(props) {
limit({
createApp() {
window.getLimit(router, 'marketing').then(() => {
render();
});
}
});
render();
}
export async function unmount() {
instance.$destroy();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment