diff --git a/src/components/BrandScroll/BrandScroll.vue b/src/components/BrandScroll/BrandScroll.vue index 3452306..195001f 100644 --- a/src/components/BrandScroll/BrandScroll.vue +++ b/src/components/BrandScroll/BrandScroll.vue @@ -3,7 +3,8 @@

- {{ item.name }}/ {{ item.shopList.length }}个 您在本层 + {{ item.name }}/ {{ item.shopList.length }}个 + 您在本层

{ scroll.value.scrollToElement(el, 500, 0, -100) }) + } else { + const el = document.getElementById('current') + if (!el) return + nextTick(() => { + scroll.value.scrollToElement(el, 500, 0, -100) + }) } }) ) diff --git a/src/components/SearchResultList/SearchResultList.vue b/src/components/SearchResultList/SearchResultList.vue index b1a0dcb..4b0c595 100644 --- a/src/components/SearchResultList/SearchResultList.vue +++ b/src/components/SearchResultList/SearchResultList.vue @@ -118,7 +118,6 @@ function handleShop(item) { position: absolute; content: ''; left: 0; - top: 120px; margin: auto; width: 48px;