Blame view

ceres-uniapp-master/components/canvasShow/basics/header/app/index.vue 2.9 KB
3f535f30   杨鑫   '初始'
1
2
3
4
5
6
7
8
9
  <template>
    <view class="header">
      <view class="top-box">
        <image v-if="componentContent.logoType === 1" class="logo"
               :src="componentContent.imageUrl"
               mode="heightFix"></image>
        <view v-else class="h3" :style="{fontSize:componentContent.fontSizeNum+'px',fontWeight:componentContent.textFontW,color:componentContent.titColor}">{{componentContent.title}}</view>
        <view class="search-btn" @click="searchPro">
          <image class="search-icon"
726bc80b   杨鑫   最新
10
                 src="https://zhgw-uat.028wlkj.com/cdwlMall/zsfwzxt/file/static/img//search.png"
3f535f30   杨鑫   '初始'
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
                 mode="widthFix"></image>
        </view>
      </view>
      <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)">首页</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)
      },
      searchPro(key, type) {
        uni.navigateTo({
          url: `/pages_category_page1/search/index/index`
        })
      }
    }
  }
  </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;
          .li{
            flex: 1 0 auto;
            margin-left: 36upx;
            font-size: 30upx;
            color: #999999;
            position: relative;
            padding-bottom: 18upx;
            text-align: center;
            &:first-child{
              margin-left: 0;
            }
            &.on{
              &:after{
                content: '';
                width: 100%;
                height: 4upx;
                background: #C5AA7B;
                position: absolute;
                left: 0;
                bottom: 0;
              }
              font-weight:bold;
            }
          }
        }
      }
    }
  </style>