Showing
1 changed file
with
16 additions
and
2 deletions
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <div class="image-carousel"> | 2 | <div class="image-carousel"> |
3 | <swipe :continuous="false" :auto="0" :show-indicators="goods && goods.length > 1"> | 3 | <swipe :continuous="false" :auto="0" :show-indicators="goods && goods.length > 1"> |
4 | <swipe-item v-for="item in goods"> | 4 | <swipe-item v-for="item in goods"> |
5 | - <a href="#" title="{{item.title}}"> | 5 | + <a href="javascript:void(0);" title="{{item.title}}" @click.prevent="showcase()"> |
6 | <img :src="item.colorImage | resize 750 1000" width="100%" alt=""> | 6 | <img :src="item.colorImage | resize 750 1000" width="100%" alt=""> |
7 | </a> | 7 | </a> |
8 | </swipe-item> | 8 | </swipe-item> |
@@ -41,6 +41,7 @@ | @@ -41,6 +41,7 @@ | ||
41 | </style> | 41 | </style> |
42 | <script> | 42 | <script> |
43 | const swipe = require('yoho-vue-swipe'); | 43 | const swipe = require('yoho-vue-swipe'); |
44 | + const yoho = require('yoho'); | ||
44 | 45 | ||
45 | require('common/vue-filter'); | 46 | require('common/vue-filter'); |
46 | 47 | ||
@@ -49,11 +50,24 @@ | @@ -49,11 +50,24 @@ | ||
49 | goods: [Object] | 50 | goods: [Object] |
50 | }, | 51 | }, |
51 | data() { | 52 | data() { |
52 | - return {}; | 53 | + return { |
54 | + }; | ||
53 | }, | 55 | }, |
54 | components: { | 56 | components: { |
55 | swipe: swipe.Swipe, | 57 | swipe: swipe.Swipe, |
56 | swipeItem: swipe.SwipeItem, | 58 | swipeItem: swipe.SwipeItem, |
59 | + }, | ||
60 | + methods: { | ||
61 | + showcase: function() { | ||
62 | + const opts = { | ||
63 | + images: this.goods.map((item)=> { | ||
64 | + return item.colorImage; | ||
65 | + }), | ||
66 | + index: 0 // TODO: 活动下标无法获取 | ||
67 | + }; | ||
68 | + | ||
69 | + yoho.goImageBrowser(opts); | ||
70 | + } | ||
57 | } | 71 | } |
58 | }; | 72 | }; |
59 | </script> | 73 | </script> |
-
Please register or login to post a comment