diff --git a/.fes.js b/.fes.js index 21bf58d0..94ba5dfe 100644 --- a/.fes.js +++ b/.fes.js @@ -4,7 +4,7 @@ * @Autor: 地虎降天龙 * @Date: 2023-10-16 10:53:09 * @LastEditors: 地虎降天龙 - * @LastEditTime: 2025-03-18 19:03:02 + * @LastEditTime: 2025-04-01 15:43:12 */ // import { resolve } from 'path'; import { join } from 'path' @@ -20,6 +20,7 @@ const timeStamp = new Date().getTime() const combinedIsCustomElement = (tag) => tag.startsWith('iconify-icon') || templateCompilerOptions.template.compilerOptions.isCustomElement(tag) export default defineBuildConfig({ + mountElementId: 'tvt-app', title: 'TvT.js', publicPath: './', access: { @@ -37,6 +38,11 @@ export default defineBuildConfig({ ['1', '有效的'], ], }, + qiankun: { + micro: { + useDevMode: true, + }, + }, //add by 地虎降天龙 viteVuePlugin: { template: { @@ -46,7 +52,7 @@ export default defineBuildConfig({ }, }, viteOption: { - base: './', // ./ /icegl-three-vue-tres/ + base: './', plugins: [ UnoCSS({ /* options */ diff --git a/package.json b/package.json index 46894018..fb4a7828 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "@fesjs/plugin-layout": "5.4.6", "@fesjs/plugin-model": "3.0.3", "@fesjs/plugin-pinia": "^3.0.3", + "@fesjs/plugin-qiankun": "^3.1.6", "@fesjs/plugin-request": "^4.0.0-beta.6", "@fesjs/plugin-sass": "^3.0.0", "@here/quantized-mesh-decoder": "^1.2.8", diff --git a/src/app.jsx b/src/app.jsx index 9575480a..fce8aa5b 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -4,7 +4,7 @@ * @Autor: 地虎降天龙 * @Date: 2023-10-16 10:53:09 * @LastEditors: 地虎降天龙 - * @LastEditTime: 2025-03-18 10:49:19 + * @LastEditTime: 2025-04-01 10:43:48 */ import { defineRuntimeConfig, useModel } from '@fesjs/fes' import { FMenu } from '@fesjs/fes-design' @@ -36,20 +36,8 @@ export default defineRuntimeConfig({ if ((process.env.FES_APP_PLUGINS === 'true' && process.env.NODE_ENV === 'development') || process.env.FES_APP_ONLINE_API) { getMenu() } - // return new Promise((resolve) => { - // setTimeout(() => { - // setRole('admin'); - // // 初始化应用的全局状态,可以通过 useModel('@@initialState') 获取,具体用法看@/components/UserCenter 文件 - // resolve({ - // userName: '李雷', - // }); - // }, 1000); - // }); }, }, - // layout: { - // renderCustom: () => , - // }, }) export function layout (layoutConfig) { @@ -162,4 +150,23 @@ export function modifyRoute (memo) { ...memo.routes ] } +} + +export const qiankun = { + // 应用加载之前 + async bootstrap (props) { + console.log('son TvT.js bootstrap', props) + }, + // 应用 render 之前触发 + async mount (props) { + console.log('son TvT.js mount', props) + }, + // 当 props 更新时触发 + async update (props) { + console.log('son TvT.js update', props) + }, + // 应用卸载之后触发 + async unmount (props) { + console.log('son TvT.js unmount', props) + }, } \ No newline at end of file diff --git a/src/plugins/eCommerce/pages/electricFan.vue b/src/plugins/eCommerce/pages/electricFan.vue index 83b8106e..2863d5de 100644 --- a/src/plugins/eCommerce/pages/electricFan.vue +++ b/src/plugins/eCommerce/pages/electricFan.vue @@ -4,7 +4,7 @@ * @Autor: 地虎降天龙 * @Date: 2024-01-16 08:58:24 * @LastEditors: 地虎降天龙 - * @LastEditTime: 2024-03-22 11:15:02 + * @LastEditTime: 2025-04-01 11:13:52 -->