This commit is contained in:
shijingjing
2022-05-07 10:57:22 +08:00
parent 7c7be137cc
commit 7cdf054155
2 changed files with 15 additions and 4 deletions

View File

@@ -29,11 +29,11 @@ export default {
current: 1,
categoryType: '0',
list: [],
parentName: '',
parentName: '产业振兴',
}
},
onLoad(o) {
this.parentName = o.listName
// this.parentName = o.listName
},
onShow() {
document.title = this.parentName

View File

@@ -4,6 +4,12 @@
<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">
<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>
</div>
</scroll-view> -->
</div>
</div>
<div class="news-list" v-if="tabList.length">
@@ -44,7 +50,7 @@ export default {
this.parentId = params.id
this.parentName = params.parentName
uni.$on('update', (tabIndex) => {
this.currIndex = tabIndex
this.currIndex = tabIndex
})
},
onShow() {
@@ -122,6 +128,7 @@ export default {
background-color: #fff;
position: relative;
padding: 0 100px 0 0;
box-sizing: border-box;
.more-icon {
position: absolute;
@@ -131,12 +138,17 @@ export default {
top: 20px;
}
// ::v-deep .uni-scroll-view-content {
// display: flex;
// }
div {
height: 80px;
line-height: 80px;
font-size: 26px;
transition-duration: 1s;
padding: 0px 30px;
width: 100%;
}
.tab-item {
@@ -147,7 +159,6 @@ export default {
.active-item {
color: #3376FD;
font-weight: 600;
}
.active-line {