tab
This commit is contained in:
@@ -29,11 +29,11 @@ export default {
|
|||||||
current: 1,
|
current: 1,
|
||||||
categoryType: '0',
|
categoryType: '0',
|
||||||
list: [],
|
list: [],
|
||||||
parentName: '',
|
parentName: '产业振兴',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(o) {
|
onLoad(o) {
|
||||||
this.parentName = o.listName
|
// this.parentName = o.listName
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
document.title = this.parentName
|
document.title = this.parentName
|
||||||
|
|||||||
@@ -4,6 +4,12 @@
|
|||||||
<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">
|
||||||
|
<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>
|
</div>
|
||||||
<div class="news-list" v-if="tabList.length">
|
<div class="news-list" v-if="tabList.length">
|
||||||
@@ -44,7 +50,7 @@ export default {
|
|||||||
this.parentId = params.id
|
this.parentId = params.id
|
||||||
this.parentName = params.parentName
|
this.parentName = params.parentName
|
||||||
uni.$on('update', (tabIndex) => {
|
uni.$on('update', (tabIndex) => {
|
||||||
this.currIndex = tabIndex
|
this.currIndex = tabIndex
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -122,6 +128,7 @@ export default {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0 100px 0 0;
|
padding: 0 100px 0 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
.more-icon {
|
.more-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -131,12 +138,17 @@ export default {
|
|||||||
top: 20px;
|
top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ::v-deep .uni-scroll-view-content {
|
||||||
|
// display: flex;
|
||||||
|
// }
|
||||||
|
|
||||||
div {
|
div {
|
||||||
height: 80px;
|
height: 80px;
|
||||||
line-height: 80px;
|
line-height: 80px;
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
transition-duration: 1s;
|
transition-duration: 1s;
|
||||||
padding: 0px 30px;
|
padding: 0px 30px;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-item {
|
.tab-item {
|
||||||
@@ -147,7 +159,6 @@ export default {
|
|||||||
.active-item {
|
.active-item {
|
||||||
color: #3376FD;
|
color: #3376FD;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.active-line {
|
.active-line {
|
||||||
|
|||||||
Reference in New Issue
Block a user