修改
This commit is contained in:
@@ -6,26 +6,12 @@
|
|||||||
<link rel="icon" href="/favicon.ico">
|
<link rel="icon" href="/favicon.ico">
|
||||||
<title>招标管理系统</title>
|
<title>招标管理系统</title>
|
||||||
|
|
||||||
|
<!-- 引入 shared 模块的样式(Module Federation 远程模块样式) -->
|
||||||
|
<link rel="stylesheet" href="/shared/assets/shared-styles.css">
|
||||||
|
|
||||||
<!-- 加载运行时配置(必须在其他脚本之前加载) -->
|
<!-- 加载运行时配置(必须在其他脚本之前加载) -->
|
||||||
<script src="/app-config.js"></script>
|
<script src="/app-config.js"></script>
|
||||||
<!-- <script src="/app-config.local.js"></script> -->
|
<!-- <script src="/app-config.local.js"></script> -->
|
||||||
|
|
||||||
<!-- Import Maps 配置 - 引用共享模块 -->
|
|
||||||
<script type="importmap">
|
|
||||||
{
|
|
||||||
"imports": {
|
|
||||||
"@shared/components": "http://localhost:7000/shared/components.js",
|
|
||||||
"@shared/utils": "http://localhost:7000/shared/utils.js",
|
|
||||||
"@shared/api": "http://localhost:7000/shared/api.js",
|
|
||||||
"@shared/composables": "http://localhost:7000/shared/composables.js",
|
|
||||||
"@shared/types": "http://localhost:7000/shared/types.js"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- 预加载关键模块 -->
|
|
||||||
<link rel="modulepreload" href="http://localhost:7000/shared/components.js">
|
|
||||||
<link rel="modulepreload" href="http://localhost:7000/shared/utils.js">
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ import { createPinia } from 'pinia'
|
|||||||
import ElementPlus from 'element-plus'
|
import ElementPlus from 'element-plus'
|
||||||
import 'element-plus/dist/index.css'
|
import 'element-plus/dist/index.css'
|
||||||
|
|
||||||
// 导入 shared 的全局样式(Module Federation 远程模块样式)
|
// 注意:shared 的样式现在通过 index.html 中的 <link> 标签加载
|
||||||
import 'shared/styles'
|
// 不再需要在这里导入:import 'shared/styles'
|
||||||
|
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import router from './router/'
|
import router from './router/'
|
||||||
|
|||||||
@@ -6,6 +6,9 @@
|
|||||||
<link rel="icon" href="/favicon.ico">
|
<link rel="icon" href="/favicon.ico">
|
||||||
<title>泰豪电源 AI 数智化平台</title>
|
<title>泰豪电源 AI 数智化平台</title>
|
||||||
|
|
||||||
|
<!-- 引入 shared 模块的样式(Module Federation 远程模块样式) -->
|
||||||
|
<link rel="stylesheet" href="/shared/assets/shared-styles.css">
|
||||||
|
|
||||||
<!-- 加载运行时配置(必须在其他脚本之前加载) -->
|
<!-- 加载运行时配置(必须在其他脚本之前加载) -->
|
||||||
<script src="/app-config.js"></script>
|
<script src="/app-config.js"></script>
|
||||||
<!-- <script src="/app-config.local.js"></script> -->
|
<!-- <script src="/app-config.local.js"></script> -->
|
||||||
|
|||||||
@@ -250,6 +250,6 @@ watch(
|
|||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
@import "./AdminSidebarLayout.scss";
|
@import "./AdminSidebarLayout.scss";
|
||||||
</style>
|
</style>
|
||||||
@@ -268,6 +268,6 @@ watch(
|
|||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
@import "./SidebarLayout.scss";
|
@import "./SidebarLayout.scss";
|
||||||
</style>
|
</style>
|
||||||
@@ -5,8 +5,8 @@ import { createPinia } from 'pinia'
|
|||||||
import ElementPlus from 'element-plus'
|
import ElementPlus from 'element-plus'
|
||||||
import 'element-plus/dist/index.css'
|
import 'element-plus/dist/index.css'
|
||||||
|
|
||||||
// 导入 shared 的全局样式(Module Federation 远程模块样式)
|
// 注意:shared 的样式现在通过 index.html 中的 <link> 标签加载
|
||||||
import 'shared/styles'
|
// 不再需要在这里导入:import 'shared/styles'
|
||||||
|
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import router from './router/'
|
import router from './router/'
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ const componentGroups = computed(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style lang="scss">
|
||||||
.app-layout {
|
.app-layout {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -110,10 +110,11 @@ export default defineConfig({
|
|||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
output: {
|
output: {
|
||||||
format: 'es',
|
format: 'es',
|
||||||
// 确保 CSS 文件名可预测
|
// 确保 CSS 文件名固定,不带 hash
|
||||||
assetFileNames: (assetInfo) => {
|
assetFileNames: (assetInfo) => {
|
||||||
if (assetInfo.name === 'style.css') {
|
// CSS 文件使用固定名称,便于在 index.html 中引用
|
||||||
return 'assets/style.css'
|
if (assetInfo.name?.endsWith('.css')) {
|
||||||
|
return 'assets/shared-styles.css'
|
||||||
}
|
}
|
||||||
return 'assets/[name]-[hash][extname]'
|
return 'assets/[name]-[hash][extname]'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,9 @@
|
|||||||
<link rel="icon" href="/favicon.ico">
|
<link rel="icon" href="/favicon.ico">
|
||||||
<title>案例管理系统</title>
|
<title>案例管理系统</title>
|
||||||
|
|
||||||
|
<!-- 引入 shared 模块的样式(Module Federation 远程模块样式) -->
|
||||||
|
<link rel="stylesheet" href="/shared/assets/shared-styles.css">
|
||||||
|
|
||||||
<!-- 加载运行时配置(必须在其他脚本之前加载) -->
|
<!-- 加载运行时配置(必须在其他脚本之前加载) -->
|
||||||
<script src="/app-config.js"></script>
|
<script src="/app-config.js"></script>
|
||||||
<!-- <script src="/app-config.local.js"></script> -->
|
<!-- <script src="/app-config.local.js"></script> -->
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import 'element-plus/dist/index.css'
|
|||||||
|
|
||||||
import './assets/css/common.scss'
|
import './assets/css/common.scss'
|
||||||
|
|
||||||
// 导入 shared 的全局样式(Module Federation 远程模块样式)
|
// 注意:shared 的样式现在通过 index.html 中的 <link> 标签加载
|
||||||
import 'shared/styles'
|
// 不再需要在这里导入:import 'shared/styles'
|
||||||
|
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import router from './router/'
|
import router from './router/'
|
||||||
|
|||||||
Reference in New Issue
Block a user