|
|
@ -3,7 +3,8 @@ |
|
|
<div class="brand-content"> |
|
|
<div class="brand-content"> |
|
|
<div class="groups" v-for="item of list" v-show="item.shopList.length" :key="item.name"> |
|
|
<div class="groups" v-for="item of list" v-show="item.shopList.length" :key="item.name"> |
|
|
<h1 class="info"> |
|
|
<h1 class="info"> |
|
|
{{ item.name }}<span class="meta">/ {{ item.shopList.length }}个</span> <span v-if="item.name === currentFloor.floor" class="current">您在本层</span> |
|
|
|
|
|
|
|
|
{{ item.name }}<span class="meta">/ {{ item.shopList.length }}个</span> |
|
|
|
|
|
<span v-if="item.name === currentFloor.floor" class="current" id="current">您在本层</span> |
|
|
</h1> |
|
|
</h1> |
|
|
<TransitionGroup name="zoom" mode="out-in" tag="div" :class="{ group: true, isRow }"> |
|
|
<TransitionGroup name="zoom" mode="out-in" tag="div" :class="{ group: true, isRow }"> |
|
|
<ShopItem |
|
|
<ShopItem |
|
|
@ -65,6 +66,12 @@ watch( |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
|
scroll.value.scrollToElement(el, 500, 0, -100) |
|
|
scroll.value.scrollToElement(el, 500, 0, -100) |
|
|
}) |
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
const el = document.getElementById('current') |
|
|
|
|
|
if (!el) return |
|
|
|
|
|
nextTick(() => { |
|
|
|
|
|
scroll.value.scrollToElement(el, 500, 0, -100) |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
) |
|
|
) |
|
|
|