diff --git a/pages/category/index.vue b/pages/category/index.vue index 7446932..1c490fa 100644 --- a/pages/category/index.vue +++ b/pages/category/index.vue @@ -16,14 +16,16 @@ - - - {{item.name}} - - - - - {{item1.name}} + + + + {{item1.name}} + + + + + {{item2.name}} + @@ -160,7 +162,7 @@ } rects.forEach((rect) => { // 这里减去rects[0].top,是因为第一项顶部可能不是贴到导航栏(比如有个搜索框的情况) - this.arr.push(rect.top - rects[0].top); + this.arr.push(rect.top - rects[0].top + 5); resolve(); }) }).exec() @@ -285,7 +287,12 @@ .class-item:last-child { min-height: 100vh; } - + .item-box{ + margin-top: 30rpx; + &:first-child{ + margin-top: 0; + } + } .item-title { font-size: 28rpx; color: $u-main-color;