From cf885b8e76867a0f0bf28dc9c5acea668656f357 Mon Sep 17 00:00:00 2001 From: RubyLiu Date: Sun, 25 Jun 2023 14:44:05 +0800 Subject: [PATCH] =?UTF-8?q?chore(all):=20=E5=BC=80=E5=8F=91=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E7=94=A8qiankun=E5=90=AF=E5=8A=A8=E6=97=B6=E5=8F=AF?= =?UTF-8?q?=E4=BD=BF=E7=94=A8vue-tools?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api-test/frontend/src/main.js | 7 +++++++ performance-test/frontend/src/main.js | 6 ++++++ project-management/frontend/src/main.js | 7 +++++++ report-stat/frontend/src/main.js | 7 +++++++ system-setting/frontend/src/main.js | 7 +++++++ test-track/frontend/src/main.js | 7 +++++++ workstation/frontend/src/main.js | 7 +++++++ 7 files changed, 48 insertions(+) diff --git a/api-test/frontend/src/main.js b/api-test/frontend/src/main.js index 015e6a2483..c669dca8fe 100644 --- a/api-test/frontend/src/main.js +++ b/api-test/frontend/src/main.js @@ -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({ diff --git a/performance-test/frontend/src/main.js b/performance-test/frontend/src/main.js index 5816cc5be0..a1a25dce5e 100644 --- a/performance-test/frontend/src/main.js +++ b/performance-test/frontend/src/main.js @@ -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}); diff --git a/project-management/frontend/src/main.js b/project-management/frontend/src/main.js index 970fd12625..568725a37e 100644 --- a/project-management/frontend/src/main.js +++ b/project-management/frontend/src/main.js @@ -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) + } } // 独立运行时 diff --git a/report-stat/frontend/src/main.js b/report-stat/frontend/src/main.js index ea8d943e76..478a403d12 100644 --- a/report-stat/frontend/src/main.js +++ b/report-stat/frontend/src/main.js @@ -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) + } } // 独立运行时 diff --git a/system-setting/frontend/src/main.js b/system-setting/frontend/src/main.js index 43bc267bb0..41a6927fd7 100644 --- a/system-setting/frontend/src/main.js +++ b/system-setting/frontend/src/main.js @@ -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) + } } // 独立运行时 diff --git a/test-track/frontend/src/main.js b/test-track/frontend/src/main.js index 30c4d2bb96..c4adb0814a 100644 --- a/test-track/frontend/src/main.js +++ b/test-track/frontend/src/main.js @@ -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) + } } // 独立运行时 diff --git a/workstation/frontend/src/main.js b/workstation/frontend/src/main.js index 839d441a7b..be87f845fa 100644 --- a/workstation/frontend/src/main.js +++ b/workstation/frontend/src/main.js @@ -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) + } } // 独立运行时