chore(admin): 优化构建配置并升级资源格式

- 新增构建插件:打包分析、压缩、自动部署、图片优化和PWA支持
- 将SVG资源转换为WebP格式以提升加载性能
- 添加新的背景图片资源用于用户界面优化
- 更新环境配置:调整基础URL和服务地址
- 优化用户界面组件以适配新的资源格式
- 更新package.json依赖以支持新的构建功能
- 改进构建流程以支持自动部署和性能监控
This commit is contained in:
2026-03-13 17:52:13 +08:00
parent 9d801ba6b4
commit 40a6850c3f
42 changed files with 2310 additions and 288 deletions

View File

@ -111,7 +111,7 @@ onMounted(() => {
:style="{ '--delay': `${index * 0.4}s` }" @click="selectTeam(item.id)"
>
<div class="icon-wrapper">
<img src="@/assets/imgs/user/team-title-icon.svg" alt="team-icon" class="h-full w-full object-cover">
<img src="@/assets/imgs/user/team-title-icon.webp" alt="team-icon" class="h-full w-full object-cover">
</div>
<div class="team-name">
{{ item.name }}
@ -175,10 +175,21 @@ onMounted(() => {
}
}
// 浮动动画关键帧
@keyframes float {
0%,
100% {
transform: translateY(0px);
}
50% {
transform: translateY(-15px);
}
}
.title-section {
position: absolute;
top: 18%; // 使用百分比定位,适应不同比例
left: 7%; // 微调位置,根据 1920x1080 下的视觉效果调整
top: 130px; // 使用固定像素值,确保在卷轴内部
left: 40px; // 距离左边缘的固定距离
z-index: 10;
.scroll-bg {
@ -193,6 +204,38 @@ onMounted(() => {
}
}
// 添加响应式适配
@media (max-width: 1920px) {
.title-section {
top: 70px;
left: 50px;
}
}
@media (max-width: 1440px) {
.title-section {
top: 60px;
left: 40px;
.scroll-bg .main-title {
font-size: 2.5rem;
letter-spacing: 15px;
}
}
}
@media (max-width: 1024px) {
.title-section {
top: 50px;
left: 30px;
.scroll-bg .main-title {
font-size: 2rem;
letter-spacing: 10px;
}
}
}
.competition-layout :deep(.main-content) {
display: flex;
align-items: center;
@ -217,10 +260,12 @@ onMounted(() => {
display: flex;
align-items: center;
justify-content: center;
background: url('@/assets/imgs/user/team-bg-animation.svg') no-repeat center center;
background: url('@/assets/imgs/user/team-bg-animation.webp') no-repeat center center;
background-size: 100% 100%;
transform-origin: center; // 确保从中心展开
will-change: clip-path; // 优化性能
will-change: clip-path, transform; // 优化性能
animation: float 3s ease-in-out infinite; // 添加浮动动画
padding: 60px 80px; // 添加内边距,确保内容在卷轴内部
&::before {
left: -15px;
@ -232,11 +277,12 @@ onMounted(() => {
}
.scroll-content {
width: 80%;
height: 80%;
width: 80%; // 减小宽度,为标题留出空间
height: 70%; // 调整高度
display: flex;
align-items: center;
justify-content: center;
// margin-left: 120px; // 为左侧标题留出空间
}
.teams-grid {