[IMP]电投优化-导航栏样式调整

This commit is contained in:
yuweiqi
2020-03-19 14:50:55 +08:00
parent 936f056a6f
commit fc53a6df3a

View File

@@ -1,10 +1,10 @@
<template>
<div class="ml6 mr6 pt5 pb5">
<ul class="index-bar">
<li @click="changePage(Number(index) + 1)" v-for="(item, index) in pageTitle" :key="index" :class="item.tabClass">
<div :class="[{ activeline: item.tabClass }, { 'bg-gray': !item.tabClass }, 'w20', 'h2']"></div>
<li @click="changePage(Number(index) + 1)" v-for="(item, index) in pageTitle" :key="index" :class="item.tabClass" :id="item.tabClass">
<div :class="[{ activeline: item.tabClass }, { 'bg-gray': !item.tabClass }, 'w15', 'h2', 'mr8']" v-if="index != 0"></div>
<span>{{ item.pageNo }}.{{ item.pageItem }}</span>
<div :class="[{ activeline: item.tabClass }, { 'bg-gray': !item.tabClass }, 'w20', 'h2']"></div>
<div :class="[{ activeline: item.tabClass }, { 'bg-gray': !item.tabClass }, 'w15', 'h2', 'ml8']" v-if="index != 7"></div>
<van-icon name="arrow" size="12" v-if="index != 7" />
</li>
</ul>
@@ -106,6 +106,9 @@ export default {
v.tabClass = 'active'
}
})
this.$nextTick(() => {
this.$el.querySelector('#active').scrollIntoView(true)
})
}
}
}