tab
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user