浏览代码

fix: timeline 节点

Lee 1 周之前
父节点
当前提交
d80089870c
共有 1 个文件被更改,包括 10 次插入8 次删除
  1. 10 8
      app/pages/index/index.vue

+ 10 - 8
app/pages/index/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: LiZhiWei
  * @LastEditors: LiZhiWei
- * @LastEditTime: 2026-01-15 16:55:19
+ * @LastEditTime: 2026-01-15 17:43:24
  * @Description: 
 -->
 <template>
@@ -378,19 +378,21 @@
               >
                 <!-- 圆点 -->
                 <div
-                  class="w-16px h-16px rounded-full transition-all duration-300 relative bg-white"
+                  class="rounded-full transition-all duration-300 relative bg-white"
                   :class="[
                     index < currentYearIndex
-                      ? 'hidden'
-                      : 'border-#0F67F8 group-hover:border-[#2563EB]  border-1',
+                      ? 'wh-13px'
+                      : 'wh-16px border-#0F67F8 group-hover:border-[#2563EB]  border-1',
                     index === currentYearIndex
-                      ? 'scale-150 outline-6px outline-#CEE0FF outline-solid border-none'
+                      ? 'wh-16px scale-150 outline-6px outline-#CEE0FF outline-solid border-none'
                       : '',
                   ]"
                   :style="
-                    index <= currentYearIndex
+                    index === currentYearIndex
                       ? { background: 'linear-gradient(90deg, #779EFF 0%, #0A50FF 100%)' }
-                      : {}
+                      : index < currentYearIndex
+                        ? { background: '#FFFFFF' }
+                        : {}
                   "
                 ></div>
                 <!-- 年份文字 -->
@@ -472,7 +474,7 @@
   const isTimelineVisible = ref(false)
 
   // 发展历程状态
-  const currentYearIndex = ref(0)
+  const currentYearIndex = ref(historyYears.length - 1)
   const currentEventIndex = ref(0)
 
   const currentYearData = computed(() => {