chore(all): 开发环境用qiankun启动时可使用vue-tools

This commit is contained in:
RubyLiu 2023-06-25 14:44:05 +08:00 committed by 刘瑞斌
parent 4bf6204cba
commit cf885b8e76
7 changed files with 48 additions and 0 deletions

View File

@ -61,6 +61,13 @@ function render(props = {}) {
pinia,
render: (h) => h(App),
}).$mount(container ? container.querySelector('#app') : '#app');
// 解决qiankun下vue-devtools不显示的问题
if (process.env.NODE_ENV === 'development') {
const instanceDiv = document.createElement('div')
instanceDiv.__vue__ = instance
document.body.appendChild(instanceDiv)
}
// 微服务过来的路由
if (defaultPath || routeName) {
microRouter.push({

View File

@ -54,6 +54,12 @@ function render(props = {}) {
pinia,
render: h => h(App),
}).$mount(container ? container.querySelector('#app') : '#app');
// 解决qiankun下vue-devtools不显示的问题
if (process.env.NODE_ENV === 'development') {
const instanceDiv = document.createElement('div')
instanceDiv.__vue__ = instance
document.body.appendChild(instanceDiv)
}
// 微服务过来的路由
if (defaultPath || routeName) {
microRouter.push({path: defaultPath, params: routeParams, name: routeName});

View File

@ -52,6 +52,13 @@ function render(props = {}) {
pinia,
render: (h) => h(App),
}).$mount(container ? container.querySelector("#app") : "#app");
// 解决qiankun下vue-devtools不显示的问题
if (process.env.NODE_ENV === 'development') {
const instanceDiv = document.createElement('div')
instanceDiv.__vue__ = instance
document.body.appendChild(instanceDiv)
}
}
// 独立运行时

View File

@ -53,6 +53,13 @@ function render(props = {}) {
pinia,
render: h => h(App),
}).$mount(container ? container.querySelector('#app') : '#app');
// 解决qiankun下vue-devtools不显示的问题
if (process.env.NODE_ENV === 'development') {
const instanceDiv = document.createElement('div')
instanceDiv.__vue__ = instance
document.body.appendChild(instanceDiv)
}
}
// 独立运行时

View File

@ -50,6 +50,13 @@ function render(props = {}) {
pinia,
render: h => h(App),
}).$mount(container ? container.querySelector('#app') : '#app');
// 解决qiankun下vue-devtools不显示的问题
if (process.env.NODE_ENV === 'development') {
const instanceDiv = document.createElement('div')
instanceDiv.__vue__ = instance
document.body.appendChild(instanceDiv)
}
}
// 独立运行时

View File

@ -68,6 +68,13 @@ function render(props = {}) {
pinia,
render: h => h(App),
}).$mount(container ? container.querySelector('#app') : '#app');
// 解决qiankun下vue-devtools不显示的问题
if (process.env.NODE_ENV === 'development') {
const instanceDiv = document.createElement('div')
instanceDiv.__vue__ = instance
document.body.appendChild(instanceDiv)
}
}
// 独立运行时

View File

@ -54,6 +54,13 @@ function render(props = {}) {
pinia,
render: h => h(App),
}).$mount(container ? container.querySelector('#app') : '#app');
// 解决qiankun下vue-devtools不显示的问题
if (process.env.NODE_ENV === 'development') {
const instanceDiv = document.createElement('div')
instanceDiv.__vue__ = instance
document.body.appendChild(instanceDiv)
}
}
// 独立运行时