Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DC-TOM
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘照晖
DC-TOM
Commits
50951bcc
Commit
50951bcc
authored
May 28, 2025
by
liuzhaoh
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://app.bmetech.com/liuzhaohui/dctomproject
into dev
parents
c7e2ad29
64353761
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
3 deletions
+35
-3
menuCom.vue
src/layout/menuCom.vue
+2
-2
vite.config.js
vite.config.js
+33
-1
No files found.
src/layout/menuCom.vue
View file @
50951bcc
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
>
>
<template
#
title
>
<template
#
title
>
<!--
<el-icon><location
/></el-icon>
-->
<!--
<el-icon><location
/></el-icon>
-->
<img
class=
"menu-icon"
:src=
"`
/src
/assets/menu/$
{item.meta.icon}.png`" alt="">
<img
class=
"menu-icon"
:src=
"`
@
/assets/menu/$
{item.meta.icon}.png`" alt="">
<span>
{{
getMenuTitle
(
item
)
}}
</span>
<span>
{{
getMenuTitle
(
item
)
}}
</span>
</
template
>
</
template
>
<el-menu-item
<el-menu-item
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
class=
"submenu-box"
class=
"submenu-box"
>
>
<!-- <el-icon><setting /></el-icon> -->
<!-- <el-icon><setting /></el-icon> -->
<img
class=
"menu-icon"
:src=
"`
/src
/assets/menu/${item.meta.icon}.png`"
alt=
""
>
<img
class=
"menu-icon"
:src=
"`
@
/assets/menu/${item.meta.icon}.png`"
alt=
""
>
<span>
{{getMenuTitle(item)}}
</span>
<span>
{{getMenuTitle(item)}}
</span>
</el-menu-item>
</el-menu-item>
</template>
</template>
...
...
vite.config.js
View file @
50951bcc
import
{
defineConfig
,
loadEnv
}
from
'vite'
import
{
defineConfig
,
loadEnv
}
from
'vite'
import
vue
from
'@vitejs/plugin-vue'
import
vue
from
'@vitejs/plugin-vue'
import
path
from
"path"
// 需安装此模块
import
path
from
"path"
// 需安装此模块
import
{
fileURLToPath
,
URL
}
from
'node:url'
// https://vite.dev/config/
// https://vite.dev/config/
export
default
defineConfig
(({
mode
})
=>
{
export
default
defineConfig
(({
mode
})
=>
{
const
ENV
=
loadEnv
(
mode
,
process
.
cwd
())
const
ENV
=
loadEnv
(
mode
,
process
.
cwd
())
...
@@ -10,9 +12,39 @@ export default defineConfig(({mode}) => {
...
@@ -10,9 +12,39 @@ export default defineConfig(({mode}) => {
resolve
:
{
resolve
:
{
alias
:
{
alias
:
{
// 这里就是需要配置resolve里的别名
// 这里就是需要配置resolve里的别名
"@"
:
path
.
resolve
(
__dirname
,
"./src"
)
// path记得引入
"@"
:
fileURLToPath
(
new
URL
(
'./src'
,
import
.
meta
.
url
))
}
}
},
},
build
:
{
outDir
:
'dist'
,
assetsInlineLimit
:
4096
,
// 小于4kb的资源将被内联为base64
emptyOutDir
:
true
,
// 构建前清空输出目录
rollupOptions
:
{
output
:
{
manualChunks
:
{
vendor
:
[
'vue'
,
'vue-router'
,
'pinia'
],
ui
:
[
'element-plus'
,
'@element-plus/icons-vue'
]
},
chunkFileNames
:
'static/js/[name]-[hash].js'
,
entryFileNames
:
'static/js/[name]-[hash].js'
,
assetFileNames
:
(
assetInfo
)
=>
{
const
info
=
assetInfo
.
name
.
split
(
'.'
);
let
extType
=
info
[
info
.
length
-
1
];
if
(
/
\.(
png|jpe
?
g|gif|svg|webp|ico
)(\?
.*
)?
$/
.
test
(
assetInfo
.
name
))
{
extType
=
'img'
;
}
else
if
(
/
\.(
woff2
?
|eot|ttf|otf
)(\?
.*
)?
$/i
.
test
(
assetInfo
.
name
))
{
extType
=
'fonts'
;
}
else
if
(
/
\.(
mp4|webm|ogg|mp3|wav|flac|aac
)(\?
.*
)?
$/
.
test
(
assetInfo
.
name
))
{
extType
=
'media'
;
}
return
`static/
${
extType
}
/[name]-[hash][extname]`
;
}
}
},
// 确保 assets 目录下的资源被复制到构建目录
assetsDir
:
'static'
,
copyPublicDir
:
true
},
server
:
{
server
:
{
host
:
'0.0.0.0'
,
// 指定服务器主机名
host
:
'0.0.0.0'
,
// 指定服务器主机名
port
:
3000
,
// 指定服务器端口
port
:
3000
,
// 指定服务器端口
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment