Blame view

src/views/product/index.vue 1.88 KB
cadfb1c2   liuqimichale   产品中心 建立目录
1
  <template>
6bb29459   liuqimichale   产品中心banner
2
3
4
5
      <div>
        <commonProduct mainTitle="中兴智能交通" subTitle="构建绿色交通 享受安全便利出行"></commonProduct>
        <div class="tab-wrapper">
          <ul class="tab-main widthCommon">
3ed210e6   liuqimichale   面包导航
6
7
8
9
10
11
            <li
              v-for="(item, index) in tabData"
              :key="item"
              @click="changeTab(index)"
              :class="{tabActive:currentIndex==index}"
            >{{item}}</li>
6bb29459   liuqimichale   产品中心banner
12
13
          </ul>
        </div>
3ed210e6   liuqimichale   面包导航
14
15
16
17
18
19
20
21
22
  
        <div class="bread widthCommon">
          您所在位置: <span class="pointer" @click="$router.push({name:'home'})">首页</span> -> 产品中心 -> 智慧停车
        </div>
  
        <keep-alive>
          <component :is="tabView"></component>
        </keep-alive>
  
6bb29459   liuqimichale   产品中心banner
23
      </div>
cadfb1c2   liuqimichale   产品中心 建立目录
24
25
26
  </template>
  
  <script>
6bb29459   liuqimichale   产品中心banner
27
  import commonProduct from '@/components/commonBanner'
3ed210e6   liuqimichale   面包导航
28
29
30
  import selectTab0 from './components/selectTab0'
  import selectTab1 from './components/selectTab1'
  import selectTab2 from './components/selectTab2'
cadfb1c2   liuqimichale   产品中心 建立目录
31
  export default {
6bb29459   liuqimichale   产品中心banner
32
33
    name: 'index',
    components:{
3ed210e6   liuqimichale   面包导航
34
35
36
37
38
39
40
41
42
43
      commonProduct, selectTab0, selectTab1, selectTab2
    },
    data(){
      return{
        tabData:[
          '智慧停车','公安交通','公共交通'
        ],
        currentIndex:0,
        tabView:'selectTab0'
      }
6bb29459   liuqimichale   产品中心banner
44
    },
3ed210e6   liuqimichale   面包导航
45
46
47
48
49
50
51
    methods:{
      changeTab:function (index) {
        console.log(index)
        this.currentIndex = index
        this.tabView = 'selectTab'+index
      }
    }
6bb29459   liuqimichale   产品中心banner
52
  
cadfb1c2   liuqimichale   产品中心 建立目录
53
54
55
56
57
  }
  </script>
  
  <style scoped lang="scss">
  
6bb29459   liuqimichale   产品中心banner
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
    .tab-wrapper{
      height:50px;
      background:rgba(237,237,237,1);
      /*line-height: 50px;*/
      padding-top: 5px;
    }
    .tab-main{
      padding-left: 100px;
      height: 45px;
      line-height: 45px;
    }
    .tab-main li{
      float: left;
      margin-right: 50px;
      width: 125px;
3ed210e6   liuqimichale   面包导航
73
  
6bb29459   liuqimichale   产品中心banner
74
75
76
77
78
79
      border-radius: 5px;
      color: #333;
      font-size: 16px;
      text-align: center;
      cursor: pointer;
    }
3ed210e6   liuqimichale   面包导航
80
81
82
83
84
85
86
87
    .tabActive{
      background: #FFF;
    }
    .bread{
      padding: 35px 0;
      color: #333;
      font-size: 14px;
    }
cadfb1c2   liuqimichale   产品中心 建立目录
88
  </style>