| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 | <template name="vodShort">	<view>		<swiper class="swiper" autoplay="false" vertical="true" interval="990000" @change="changeVod">			<swiper-item v-for="(v, k) in item" :key="k">				<dever-video				:src="v.video" 				:pic="v.pic" 				:index="k" 				:vid="v.id" 				:position_item="v.text"				:position_save="v.is_button"				:load.sync="load"				ref="video"				>				</dever-video>			</swiper-item>		</swiper>	</view></template><script>import deverVideo from '@/lib/dever/components/video.nvue';var play = true;export default {	name: "vodShort",	props: {		control : {			type : Object,			value : null		},		item : {			type    : Array,			value	: null		},		index : {			type    : Number,			value	: null		},	},	data() {		return {			load : false,			current_index: 0,		};	},	created() {			},	mounted() {		this.control[this.index] = this;	},	methods:{		start : function() {			this.$refs.video[this.current_index].start();		},		stop : function() {			this.$refs.video[this.current_index].stop(true);		},		changeVod : function(e)  {			var self = this;			self.$nextTick(()=>{				this.$refs.video[this.current_index].stop(false);				this.current_index = e.detail.current;				self.start();				/*				for (var i in this.$refs.video) {					if (i == e.detail.current) {						this.current_index = i;						this.$refs.video[i].start();					} else {						var j = i - e.detail.current;						if (j < 0) {							j = j*-1;						}						if (j > 20) {							this.$refs.video[i].stop(true);						} else {							this.$refs.video[i].stop(false);						}					}				}				*/			});							},	},	components:{		deverVideo	}}</script><style>.swiper{	width: 100vw;	height: 100vh;		/*position: fixed;*/	position: relative;	top: 0;	left: 0;}</style>
 |