You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
111 lines
2.4 KiB
111 lines
2.4 KiB
<template>
|
|
<view class="header">
|
|
<view class="tabs-nav-warp">
|
|
<scroll-view class="tabs-nav" scroll-x="true">
|
|
<view class="ul">
|
|
<view class="li" :class="{'on':activeTab===0}" @click="tabChange(0)">{{$t('common.own')}}</view>
|
|
<view class="li" :class="{'on':activeTab===index+1}" v-for="(item,index) in classifyData" :key="index" @click="tabChange(index+1,item.id)">
|
|
{{item.categoryName}}
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {commonMixin} from '../mixin'
|
|
export default {
|
|
mixins: [commonMixin],
|
|
data () {
|
|
return {
|
|
activeTab: 0
|
|
}
|
|
},
|
|
computed: {
|
|
|
|
},
|
|
methods:{
|
|
tabChange (index, id) {
|
|
this.activeTab = index
|
|
this.$emit('tabChange', index, id)
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.header {
|
|
.top-box {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding-left: 30upx;
|
|
width: 100%;
|
|
.logo {
|
|
// width: 280upx;
|
|
height: 70upx;
|
|
margin-top: 0upx;
|
|
}
|
|
|
|
.search-btn {
|
|
height: 66upx;
|
|
background: rgba(255, 255, 255, 1);
|
|
border-radius: 33upx;
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
margin-right: 30upx;
|
|
.search-icon {
|
|
width: 60upx;
|
|
height: 60upx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.tabs-nav-warp{
|
|
margin-top: 20upx;
|
|
padding:0 30upx;
|
|
overflow: hidden;
|
|
.tabs-nav{
|
|
.ul{
|
|
display: flex;
|
|
flex-wrap: nowrap;
|
|
justify-content: space-between;
|
|
padding-left: 20upx;
|
|
padding-right: 20upx;
|
|
.li{
|
|
flex: 1 0 auto;
|
|
margin-left: 5upx;
|
|
margin-right: 5upx;
|
|
font-size: 30upx;
|
|
color: #252744;
|
|
position: relative;
|
|
padding-bottom: 15upx;
|
|
padding-left: 27upx;
|
|
padding-right: 27upx;
|
|
padding-top: 15upx;
|
|
text-align: center;
|
|
&:first-child{
|
|
margin-left: 0;
|
|
}
|
|
&.on{
|
|
// &:after{
|
|
// content: '';
|
|
// width: 100%;
|
|
// height: 4upx;
|
|
// background: #252744;
|
|
// position: absolute;
|
|
// left: 0;
|
|
// bottom: 0;
|
|
// }
|
|
background: #252744;
|
|
box-shadow: 0upx 7upx 14upx 0upx #C5C8ED;
|
|
border-radius: 40upx;
|
|
color: white;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|