Commit a3f79466 authored by zhangyanni's avatar zhangyanni

样式

parent 0f87f3e3
......@@ -2,7 +2,7 @@
<div>
<div class="activity_top" ref="navBar" :style="{display:channelList.length>1&&!$route.query.id?'flex':'none'}">
<div v-for="(item,index) in channelList" @click="handleTab(item,index)"
:class="currentIndex==index?'activeChannel':''">
:class="currentIndex==index?'activeChannel':''" :id="'channel'+index">
<span>{{item.channelName}}</span>
</div>
<div style="width: .7rem;">
......@@ -138,9 +138,7 @@
this.$refs.navBar.scrollLeft = this.$refs.navBar.scrollLeft + window.document.body.clientWidth - 50;
}
}else{
if(index>= (this.channelList.length -1) / 2 && this.channelList.length>=5){
this.$refs.navBar.scrollLeft = this.$refs.navBar.scrollLeft + window.document.body.clientWidth - 50;
}
this.$refs.navBar.scrollLeft = document.getElementById("channel"+index).offsetLeft;
this.currentTab = data;
this.getInitFunc();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment