-
-
+
+
@@ -546,7 +544,6 @@ defineExpose({
refreshTaskList: loadTaskList // 刷新任务列表
});
-
+
+
\ No newline at end of file
diff --git a/src/components/index/StencilTabs.vue b/src/components/index/StencilTabs.vue
new file mode 100644
index 0000000..3b7c817
--- /dev/null
+++ b/src/components/index/StencilTabs.vue
@@ -0,0 +1,101 @@
+
+
+ 加载中...
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/index/Stencil.vue b/src/components/index/StencilWaterfall.vue
similarity index 65%
rename from src/components/index/Stencil.vue
rename to src/components/index/StencilWaterfall.vue
index 4feff5a..d3468a9 100644
--- a/src/components/index/Stencil.vue
+++ b/src/components/index/StencilWaterfall.vue
@@ -1,29 +1,6 @@
+
+
+
+
+ 推荐
+
+
+
+
+
+
+
+
+ 短片
+
+
+ 教程
+
-
-
-
-
-
-
-
- 推荐
-
-
-
-
-
-
-
-
- 短片
-
-
- 教程
-
+
-
-
+
+
\ No newline at end of file
diff --git a/src/views/index/index.vue b/src/views/index/index.vue
index eb4602c..81b8d9c 100644
--- a/src/views/index/index.vue
+++ b/src/views/index/index.vue
@@ -1,9 +1,18 @@
-
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+ console.log('做同款', item)
+}
+
+// ===== 吸顶逻辑(示例,可根据实际滚动容器调整)=====
+const indexContainer = ref()
+const isTabSticky = ref(false)
+const tabsOffsetTop = ref(0)
+
+const handleScroll = () => {
+ if (!indexContainer.value) return
+ const scrollTop = indexContainer.value.scrollTop
+ // 当滚动超过 Tab 栏原始位置时,添加 sticky 类
+ isTabSticky.value = scrollTop >= tabsOffsetTop.value
+}
+
+onMounted(() => {
+ const container = indexContainer.value
+ if (container) {
+ container.addEventListener('scroll', handleScroll)
+ // 获取 Tab 栏距离滚动容器顶部的初始偏移量
+ const tabsEl = container.querySelector('.sticky-tabs') as HTMLElement
+ if (tabsEl) {
+ tabsOffsetTop.value = tabsEl.offsetTop
+ }
+ }
+})
+
+onUnmounted(() => {
+ indexContainer.value?.removeEventListener('scroll', handleScroll)
+})
+
+
+
\ No newline at end of file