index.vue
2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<template>
<div class="header">
<div class="top-box">
<img v-if="componentContent.logoType === 1" class="logo"
:src="componentContent.imageUrl"
mode="heightFix">
<h3 v-else class="h3" :style="{fontSize:componentContent.fontSizeNum+'px',fontWeight:componentContent.textFontW,color:componentContent.titColor}">{{componentContent.title}}</h3>
<div class="search-btn">
<img class="search-icon"
src=""
mode="widthFix">
</div>
</div>
<div class="tabs-nav-warp">
<div class="tabs-nav" scroll-x="true">
<div class="ul">
<div class="li" :class="{'on':activeTab===0}" @click="tabChange(0)">首页</div>
<div class="li" :class="{'on':activeTab===index+1}" v-for="(item,index) in classifyData" :key="index">
{{item.categoryName}}
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import {commonMixin} from '../mixin'
export default {
mixins: [commonMixin],
data () {
return {
activeTab: 0
}
},
computed: {
},
}
</script>
<style lang="scss" scoped>
.header {
.top-box {
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 30px;
width: 100%;
.logo {
// width: 280px;
height: 70px;
margin-top: 0px;
}
.search-btn {
height: 66px;
background: rgba(255, 255, 255, 1);
border-radius: 33px;
display: flex;
flex-direction: row;
align-items: center;
margin-right: 30px;
.search-icon {
width: 60px;
height: 60px;
}
}
}
}
.tabs-nav-warp{
margin-top: 20px;
padding:0 30px;
overflow: hidden;
.tabs-nav{
.ul{
display: flex;
.li{
flex: 1 0 auto;
margin-left: 36px;
font-size: 30px;
color: #999999;
position: relative;
padding-bottom: 18px;
&:first-child{
margin-left: 0;
}
&.on{
&:after{
content: '';
width: 100%;
height: 4px;
background: #C5AA7B;
position: absolute;
left: 0;
bottom: 0;
}
font-weight:bold;
}
}
}
}
}
</style>