|
@@ -15,9 +15,9 @@
|
|
|
</view>
|
|
|
<!--多张图片-->
|
|
|
<view v-else-if="item.type == 11">
|
|
|
- <swiper class="swiper" autoplay="false" vertical="true" interval="990000">
|
|
|
+ <swiper class="swiper" autoplay="false" vertical="true" interval="990000" :previous-margin="previous_margin" :next-margin="next_margin" @change="changes" circular="true">
|
|
|
<swiper-item v-for="(v, k) in item.data" :key="k">
|
|
|
- <pic :index="index" :item="v" :control="control" :bottom="bottom"></pic>
|
|
|
+ <pic @setHeight="setHeight" :index="index" :pic_index="k" :item="v" :control="control" :bottom="bottom"></pic>
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
</view>
|
|
@@ -132,14 +132,26 @@ export default {
|
|
|
type : Object,
|
|
|
value : null
|
|
|
},
|
|
|
- index : 0
|
|
|
+ index : {
|
|
|
+ type : Number,
|
|
|
+ value : 0
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
-
|
|
|
+ next_margin : '0px',
|
|
|
+ previous_margin : '0px',
|
|
|
}
|
|
|
},
|
|
|
- methods:{
|
|
|
+ methods:{
|
|
|
+ setHeight : function(index, height) {
|
|
|
+
|
|
|
+ if (index == 0) {
|
|
|
+ height = height + 20;
|
|
|
+ //this.next_margin = height + 'px';
|
|
|
+ }
|
|
|
+ console.info(index, height, this.next_margin);
|
|
|
+ },
|
|
|
getData : function(page) {
|
|
|
|
|
|
},
|
|
@@ -152,7 +164,13 @@ export default {
|
|
|
},
|
|
|
handle : function(e) {
|
|
|
this.showDrawer(this.button[e.index].key);
|
|
|
- }
|
|
|
+ },
|
|
|
+ changes : function(e) {
|
|
|
+ return;
|
|
|
+ var i = parseInt(e.detail.current);
|
|
|
+ this.next_margin = i*50;
|
|
|
+ this.next_margin = this.next_margin + 'px';
|
|
|
+ },
|
|
|
},
|
|
|
components:{
|
|
|
cover,news,pic,picGrid,vod,vodComment,vodShort,audioList,audioComment,liveComment,dialogue,linkView,webView,product,moment
|