From f8d274bad3fea98de397b43c8d00b1220c67fb3d Mon Sep 17 00:00:00 2001 From: hawk86104 Date: Thu, 3 Apr 2025 10:14:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=8C=B9=E9=85=8D=20=20?= =?UTF-8?q?=E5=BE=85=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .fes.js | 5 +- src/app.jsx | 11 +- .../floor/components/reflectorDUDV.vue | 108 +++++++++--------- src/plugins/qiankunTvt/config.js | 10 +- src/plugins/qiankunTvt/pages/other.vue | 40 +++++++ 5 files changed, 117 insertions(+), 57 deletions(-) create mode 100644 src/plugins/qiankunTvt/pages/other.vue diff --git a/.fes.js b/.fes.js index 06c2dc8f..f940f717 100644 --- a/.fes.js +++ b/.fes.js @@ -4,7 +4,7 @@ * @Autor: 地虎降天龙 * @Date: 2023-10-16 10:53:09 * @LastEditors: 地虎降天龙 - * @LastEditTime: 2025-04-02 18:44:16 + * @LastEditTime: 2025-04-03 09:09:30 */ // import { resolve } from 'path'; import { join } from 'path' @@ -52,7 +52,7 @@ export default defineBuildConfig({ }, }, viteOption: { - base: 'http://192.168.18.170:8899/', // './' 若在线部署用于生产环境 且 是使用qiankun微前端时,需要配置base为主应用地址 + base: './', // './' 若在线部署用于生产环境 且 是使用qiankun微前端时,需要配置base为主应用地址 plugins: [ UnoCSS({ /* options */ @@ -91,6 +91,7 @@ export default defineBuildConfig({ chunkFileNames: `js/[name].[hash]${timeStamp}.js`, entryFileNames: `js/[name].[hash]${timeStamp}.js`, assetFileNames: `[ext]/[name].[hash]${timeStamp}.[ext]`, + name: 'TvT.js', }, }, sourcemap: false, diff --git a/src/app.jsx b/src/app.jsx index 86decf75..1541d758 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -4,7 +4,7 @@ * @Autor: 地虎降天龙 * @Date: 2023-10-16 10:53:09 * @LastEditors: 地虎降天龙 - * @LastEditTime: 2025-04-02 11:00:19 + * @LastEditTime: 2025-04-03 09:57:29 */ import { defineRuntimeConfig, useModel } from '@fesjs/fes' import { FMenu } from '@fesjs/fes-design' @@ -25,7 +25,6 @@ import { qiankunWindow } from 'vite-plugin-qiankun/dist/helper' import UserCenter from '@/components/forPreview/userCenter.vue' import PageLoading from '@/components/pageLoading.vue' - addCollection(uimIcons) addCollection(lineMdIcons) addCollection(wiIcons) @@ -37,6 +36,13 @@ export default defineRuntimeConfig({ action () { if (qiankunWindow.__POWERED_BY_QIANKUN__) { qiankunTvtStore = useQiankunTvtStore() + // debugger + // const purl = qiankunWindow.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ + // globalThis.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ = purl + // window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ = purl + // window.__webpack_public_path__ = purl + // qiankunWindow.__webpack_public_path__ = purl + // Object.defineProperty(import.meta, 'url', { get: () => purl }) } const { signin, getMenu } = useModel('forPreview') signin() @@ -168,7 +174,6 @@ export const qiankun = { }, // 应用 render 之前触发 async mount (props) { - console.log('son TvT.js mount', props) if (props) { props.onGlobalStateChange((state, prev) => { diff --git a/src/plugins/floor/components/reflectorDUDV.vue b/src/plugins/floor/components/reflectorDUDV.vue index 70e82717..0dd20f6f 100644 --- a/src/plugins/floor/components/reflectorDUDV.vue +++ b/src/plugins/floor/components/reflectorDUDV.vue @@ -4,13 +4,13 @@ * @Autor: 地虎降天龙 * @Date: 2023-12-25 11:41:13 * @LastEditors: 地虎降天龙 - * @LastEditTime: 2024-09-25 08:33:30 + * @LastEditTime: 2025-04-03 10:13:40 --> diff --git a/src/plugins/qiankunTvt/config.js b/src/plugins/qiankunTvt/config.js index a59408d5..eca77a7c 100644 --- a/src/plugins/qiankunTvt/config.js +++ b/src/plugins/qiankunTvt/config.js @@ -4,7 +4,7 @@ * @Autor: 地虎降天龙 * @Date: 2025-04-01 15:50:33 * @LastEditors: 地虎降天龙 - * @LastEditTime: 2025-04-02 11:25:25 + * @LastEditTime: 2025-04-03 09:14:57 */ export default { name: 'qiankunTvt', @@ -34,5 +34,13 @@ export default { disableFPSGraph: false, disableSrcBtn: true, }, + { + src: 'plugins/medical/preview/yuriBrain.png', + type: 'img', + name: 'other', + title: '其他场景移植', + disableFPSGraph: false, + disableSrcBtn: true, + }, ], } diff --git a/src/plugins/qiankunTvt/pages/other.vue b/src/plugins/qiankunTvt/pages/other.vue new file mode 100644 index 00000000..35b2d539 --- /dev/null +++ b/src/plugins/qiankunTvt/pages/other.vue @@ -0,0 +1,40 @@ + + +