u-tab
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<div class="header-tab">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/live/dh.png" alt="" class="more-icon" @click="toSelect()">
|
||||
<u-tabs :list="tabList" :current="currIndex" @change="changeTab" :font-size="26"></u-tabs>
|
||||
<!-- <scroll-view :scroll-x="true">
|
||||
<!-- <scroll-view :scroll-x="true" :scroll-with-animation="true" @scroll="scroll" :scroll-left="left" upper-threshold="60">
|
||||
<div v-for="(item, index) in tabList" :key="index" @click="changeTab(index)" :class="currIndex == index ? 'tab-item active-item' : 'tab-item'">
|
||||
{{ item.name }}
|
||||
<span class="active-line" v-if="currIndex == index"></span>
|
||||
@@ -71,6 +71,10 @@ export default {
|
||||
this.getListInit()
|
||||
},
|
||||
|
||||
// scroll(e) {
|
||||
// console.log(e);
|
||||
// },
|
||||
|
||||
// 获取新闻分类
|
||||
getList() {
|
||||
return this.$http.post('/app/apppublicitycategory/list', null, {
|
||||
@@ -148,7 +152,7 @@ export default {
|
||||
font-size: 26px;
|
||||
transition-duration: 1s;
|
||||
padding: 0px 30px;
|
||||
width: 100%;
|
||||
white-space:nowrap;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
this.tabIndex = index
|
||||
uni.navigateBack({
|
||||
success: ()=>{
|
||||
uni.$emit('update',index)
|
||||
uni.$emit('update',this.tabIndex)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user