编译修正

This commit is contained in:
2026-01-02 15:50:20 +08:00
parent 97724c8c8d
commit 5d54ac1cd4
15 changed files with 456 additions and 27 deletions

View File

@@ -15,10 +15,12 @@
"element-plus": "^2.12.0",
"@element-plus/icons-vue": "^2.3.2",
"@vueuse/core": "^11.3.0",
"axios": "^1.7.9"
"axios": "^1.7.9",
"lucide-vue-next": "^0.561.0"
},
"devDependencies": {
"@types/node": "^22.0.0",
"@module-federation/vite": "^1.9.3",
"@types/node": "^20.10.0",
"@vitejs/plugin-vue": "^5.2.1",
"@vitejs/plugin-vue-jsx": "^4.1.1",
"typescript": "^5.7.2",

View File

@@ -17,6 +17,9 @@ dependencies:
element-plus:
specifier: ^2.12.0
version: 2.12.0(vue@3.5.25)
lucide-vue-next:
specifier: ^0.561.0
version: 0.561.0(vue@3.5.25)
pinia:
specifier: ^2.2.8
version: 2.3.1(typescript@5.9.3)(vue@3.5.25)
@@ -28,9 +31,12 @@ dependencies:
version: 4.6.3(vue@3.5.25)
devDependencies:
'@module-federation/vite':
specifier: ^1.9.3
version: 1.9.4
'@types/node':
specifier: ^22.0.0
version: 22.19.1
specifier: ^20.10.0
version: 20.19.27
'@vitejs/plugin-vue':
specifier: ^5.2.1
version: 5.2.4(vite@6.4.1)(vue@3.5.25)
@@ -42,7 +48,7 @@ devDependencies:
version: 5.9.3
vite:
specifier: ^6.0.3
version: 6.4.1(@types/node@22.19.1)
version: 6.4.1(@types/node@20.19.27)
vue-tsc:
specifier: ^2.2.0
version: 2.2.12(typescript@5.9.3)
@@ -596,10 +602,61 @@ packages:
'@jridgewell/sourcemap-codec': 1.5.5
dev: true
/@module-federation/error-codes@0.21.6:
resolution: {integrity: sha512-MLJUCQ05KnoVl8xd6xs9a5g2/8U+eWmVxg7xiBMeR0+7OjdWUbHwcwgVFatRIwSZvFgKHfWEiI7wsU1q1XbTRQ==}
dev: true
/@module-federation/runtime-core@0.21.6:
resolution: {integrity: sha512-5Hd1Y5qp5lU/aTiK66lidMlM/4ji2gr3EXAtJdreJzkY+bKcI5+21GRcliZ4RAkICmvdxQU5PHPL71XmNc7Lsw==}
dependencies:
'@module-federation/error-codes': 0.21.6
'@module-federation/sdk': 0.21.6
dev: true
/@module-federation/runtime@0.21.6:
resolution: {integrity: sha512-+caXwaQqwTNh+CQqyb4mZmXq7iEemRDrTZQGD+zyeH454JAYnJ3s/3oDFizdH6245pk+NiqDyOOkHzzFQorKhQ==}
dependencies:
'@module-federation/error-codes': 0.21.6
'@module-federation/runtime-core': 0.21.6
'@module-federation/sdk': 0.21.6
dev: true
/@module-federation/sdk@0.21.6:
resolution: {integrity: sha512-x6hARETb8iqHVhEsQBysuWpznNZViUh84qV2yE7AD+g7uIzHKiYdoWqj10posbo5XKf/147qgWDzKZoKoEP2dw==}
dev: true
/@module-federation/vite@1.9.4:
resolution: {integrity: sha512-7UckjGCqpN6mCRs8J9+T/we0s4msl4SFJERG1uVQslIQJvomuOeu/+keIAbK6M4vjgRwXxkHKyWPhr95uhdulg==}
dependencies:
'@module-federation/runtime': 0.21.6
'@module-federation/sdk': 0.21.6
'@rollup/pluginutils': 5.3.0
defu: 6.1.4
estree-walker: 2.0.2
magic-string: 0.30.21
pathe: 1.1.2
transitivePeerDependencies:
- rollup
dev: true
/@rolldown/pluginutils@1.0.0-beta.53:
resolution: {integrity: sha512-vENRlFU4YbrwVqNDZ7fLvy+JR1CRkyr01jhSiDpE1u6py3OMzQfztQU2jxykW3ALNxO4kSlqIDeYyD0Y9RcQeQ==}
dev: true
/@rollup/pluginutils@5.3.0:
resolution: {integrity: sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==}
engines: {node: '>=14.0.0'}
peerDependencies:
rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0
peerDependenciesMeta:
rollup:
optional: true
dependencies:
'@types/estree': 1.0.8
estree-walker: 2.0.2
picomatch: 4.0.3
dev: true
/@rollup/rollup-android-arm-eabi@4.53.3:
resolution: {integrity: sha512-mRSi+4cBjrRLoaal2PnqH82Wqyb+d3HsPUN/W+WslCXsZsyHa9ZeQQX/pQsZaVIWDkPcpV6jJ+3KLbTbgnwv8w==}
cpu: [arm]
@@ -805,8 +862,8 @@ packages:
resolution: {integrity: sha512-FOvQ0YPD5NOfPgMzJihoT+Za5pdkDJWcbpuj1DjaKZIr/gxodQjY/uWEFlTNqW2ugXHUiL8lRQgw63dzKHZdeQ==}
dev: false
/@types/node@22.19.1:
resolution: {integrity: sha512-LCCV0HdSZZZb34qifBsyWlUmok6W7ouER+oQIGBScS8EsZsQbrtFTUrDX4hOl+CS6p7cnNC4td+qrSVGSCTUfQ==}
/@types/node@20.19.27:
resolution: {integrity: sha512-N2clP5pJhB2YnZJ3PIHFk5RkygRX5WO/5f0WC08tp0wd+sv0rsJk3MqWn3CbNmT2J505a5336jaQj4ph1AdMug==}
dependencies:
undici-types: 6.21.0
dev: true
@@ -830,7 +887,7 @@ packages:
'@babel/plugin-transform-typescript': 7.28.5(@babel/core@7.28.5)
'@rolldown/pluginutils': 1.0.0-beta.53
'@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.28.5)
vite: 6.4.1(@types/node@22.19.1)
vite: 6.4.1(@types/node@20.19.27)
vue: 3.5.25(typescript@5.9.3)
transitivePeerDependencies:
- supports-color
@@ -843,7 +900,7 @@ packages:
vite: ^5.0.0 || ^6.0.0
vue: ^3.2.25
dependencies:
vite: 6.4.1(@types/node@22.19.1)
vite: 6.4.1(@types/node@20.19.27)
vue: 3.5.25(typescript@5.9.3)
dev: true
@@ -1146,6 +1203,10 @@ packages:
ms: 2.1.3
dev: true
/defu@6.1.4:
resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==}
dev: true
/delayed-stream@1.0.0:
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
engines: {node: '>=0.4.0'}
@@ -1406,6 +1467,14 @@ packages:
yallist: 3.1.1
dev: true
/lucide-vue-next@0.561.0(vue@3.5.25):
resolution: {integrity: sha512-c5HUckO0qHklVSOf/0vaSR3pEb8fYImRDCRDLde56uqS9js0D/e3RAvq0/YFWjkmyOBKCb0/IdskdoHZQEkT5g==}
peerDependencies:
vue: '>=3.0.1'
dependencies:
vue: 3.5.25(typescript@5.9.3)
dev: false
/magic-string@0.30.21:
resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==}
dependencies:
@@ -1464,6 +1533,10 @@ packages:
resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==}
dev: true
/pathe@1.1.2:
resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==}
dev: true
/picocolors@1.1.1:
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
@@ -1570,7 +1643,7 @@ packages:
picocolors: 1.1.1
dev: true
/vite@6.4.1(@types/node@22.19.1):
/vite@6.4.1(@types/node@20.19.27):
resolution: {integrity: sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==}
engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}
hasBin: true
@@ -1610,7 +1683,7 @@ packages:
yaml:
optional: true
dependencies:
'@types/node': 22.19.1
'@types/node': 20.19.27
esbuild: 0.25.12
fdir: 6.5.0(picomatch@4.0.3)
picomatch: 4.0.3

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -0,0 +1,21 @@
<template>
<router-view />
</template>
<script setup lang="ts">
// Bidding App 根组件
</script>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body, #app {
width: 100%;
height: 100%;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
</style>

View File

@@ -0,0 +1,191 @@
// ==================== 品牌色变量 ====================
$brand-color: #0055AA;
$brand-color-light: #EBF5FF;
$brand-color-hover: #004488;
.sidebar-layout {
display: flex;
width: 100%;
height: 100vh;
overflow: hidden;
background: #fff;
font-family: 'Inter', 'Noto Sans SC', sans-serif;
}
// ==================== 侧边栏 ====================
.sidebar {
width: 256px;
height: 100%;
background: #fff;
display: flex;
flex-direction: column;
color: #333;
flex-shrink: 0;
transition: width 0.3s ease;
border-right: 1px solid #f1f5f9;
z-index: 50;
&.collapsed {
width: 80px;
overflow: visible;
.sidebar-header {
padding: 16px 0;
justify-content: center;
}
.nav-item {
justify-content: center;
padding: 12px;
border-radius: 8px;
margin: 0 12px;
span {
display: none;
}
}
.user-section {
justify-content: center;
padding: 16px;
.user-name {
display: none;
}
}
}
}
.sidebar-header {
height: 64px;
padding: 0 16px;
margin-bottom: 8px;
display: flex;
align-items: center;
justify-content: space-between;
user-select: none;
}
.collapse-btn {
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
cursor: pointer;
color: #94a3b8;
background: transparent;
border: none;
transition: all 0.2s;
flex-shrink: 0;
&:hover {
background: #f1f5f9;
color: #64748b;
}
}
.logo {
display: flex;
align-items: center;
gap: 8px;
.logo-img {
height: 32px;
width: auto;
border-radius: 8px;
object-fit: contain;
}
.logo-text {
font-size: 16px;
font-weight: 600;
color: #1e293b;
letter-spacing: -0.02em;
}
}
// 导航菜单
.nav-menu {
flex: 1;
padding: 8px 12px;
}
.nav-section {
padding: 0;
}
.nav-item {
position: relative;
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
margin-bottom: 2px;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s ease;
color: #64748b;
font-size: 14px;
font-weight: 500;
&:hover {
background: $brand-color-light;
color: $brand-color;
}
&.active {
background: $brand-color;
color: #fff;
box-shadow: 0 4px 12px rgba($brand-color, 0.25);
}
span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
// 用户信息
.user-section {
padding: 16px;
border-top: 1px solid #f1f5f9;
background: #f8fafc;
cursor: pointer;
transition: background 0.2s;
&:hover {
background: #f1f5f9;
}
.user-info-wrapper {
display: flex;
align-items: center;
gap: 12px;
}
.user-avatar {
position: relative;
flex-shrink: 0;
}
.user-name {
font-size: 14px;
font-weight: 500;
color: #374151;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
// ==================== 主内容区 ====================
.main-content {
flex: 1;
height: 100%;
overflow: hidden;
background: #f8fafc;
position: relative;
}

View File

@@ -1 +0,0 @@
export { default as SidebarLayout } from './SidebarLayout.vue'

View File

@@ -1,3 +1,2 @@
export { default as SidebarLayout } from './SidebarLayout/SidebarLayout.vue'
// BlankLayoutSubSidebarLayout 从 shared 导入
export { BlankLayout, SubSidebarLayout } from 'shared/layouts'
export { BlankLayout, SubSidebarLayout } from 'shared/layouts';

View File

@@ -0,0 +1,79 @@
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router/'
import { AES_SECRET_KEY } from './config'
// 导入需要的 Lucide 图标
import {
LayoutGrid,
FileText,
Users,
User,
Settings,
Home,
ChevronDown,
ChevronRight,
ChevronLeft,
PanelLeftClose,
PanelLeftOpen,
RefreshCw,
LogOut,
Plus,
Trash2,
Search,
Menu
} from 'lucide-vue-next'
// Lucide 图标映射
const lucideIcons = {
LayoutGrid,
FileText,
Users,
User,
Settings,
Home,
ChevronDown,
ChevronRight,
ChevronLeft,
PanelLeftClose,
PanelLeftOpen,
RefreshCw,
LogOut,
Plus,
Trash2,
Search,
Menu
}
// 异步初始化应用
async function initApp() {
// 创建 Vue 应用
const app = createApp(App)
// 注册 Pinia
const pinia = createPinia()
app.use(pinia)
// 注册 Element Plus
app.use(ElementPlus)
// 注册 Lucide 图标
for (const [name, component] of Object.entries(lucideIcons)) {
app.component(name, component)
}
// 注册路由
app.use(router)
// 挂载应用
app.mount('#app')
console.log('✅ Bidding 应用启动成功')
}
// 启动应用
initApp()

View File

@@ -88,6 +88,7 @@ export default defineConfig(({ mode }) => {
},
build: {
target: 'esnext',
outDir: 'dist',
sourcemap: true,
rollupOptions: {