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