feat 完善注释

This commit is contained in:
Ironsp
2026-10-01 17:24:57 +08:00
parent 2b59f68fd7
commit 9f4a5c7cda
183 changed files with 485 additions and 3615 deletions

View File

@@ -12,7 +12,6 @@ const router = useRouter()
const activeIndex = ref(0)
let timer: ReturnType<typeof setInterval> | null = null
/** 接口无图时用设计稿插画兜底,保证头图始终有一层视觉 */
const slides = computed(() => {
if (props.banners.length > 0) {
return props.banners.map((item) => item.imageUrl)
@@ -58,7 +57,6 @@ onBeforeUnmount(stopAutoplay)
<template>
<section class="home-banner">
<!-- 底层:图片轮播(文案层始终叠在其上) -->
<div class="home-banner__carousel" aria-hidden="true">
<div
v-for="(src, index) in slides"
@@ -70,7 +68,6 @@ onBeforeUnmount(stopAutoplay)
</div>
</div>
<!-- 顶层:标题 / 副标题 / 按钮,轮播切换时位置不变 -->
<div class="home-banner__inner">
<h1 class="home-banner__title">虫子智造研发一体化平台</h1>
<p class="home-banner__subtitle">一站式智能软硬件研发与量产综合服务商</p>
@@ -109,7 +106,6 @@ onBeforeUnmount(stopAutoplay)
width: 100%;
flex: 0 0 auto;
// 底层轮播:通栏铺满,文案层叠在上面
&__carousel {
position: absolute;
inset: 0;
@@ -134,7 +130,6 @@ onBeforeUnmount(stopAutoplay)
object-fit: cover;
}
// 顶层文案:相对内容区定位,不随轮播切换
&__inner {
position: relative;
z-index: 1;
@@ -145,7 +140,6 @@ onBeforeUnmount(stopAutoplay)
pointer-events: none;
}
// 设计稿标题 x150 y257(画板绝对)→ banner 内 y257−73=184
&__title {
position: absolute;
top: 184px;
@@ -158,7 +152,6 @@ onBeforeUnmount(stopAutoplay)
white-space: nowrap;
}
// 设计稿副标题 x150 y360 → banner 内 y287
&__subtitle {
position: absolute;
top: 287px;
@@ -171,7 +164,6 @@ onBeforeUnmount(stopAutoplay)
white-space: nowrap;
}
// 设计稿按钮组 x150 y465 → banner 内 y392;两钮 183×55,间距 20
&__actions {
position: absolute;
top: 392px;