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