swiper.js 2.7 KB

12345678910
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/page-component/app-swiper/swiper"],{"08c4":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"u-swiper",props:{list:{type:Array,default:function(){return[]}},imgMode:{type:String,default:"aspectFill"},name:{type:String,default:"image"},height:{type:[Number,String],default:250},duration:{type:[Number,String],default:500},interval:{type:[String,Number],default:3e3},mode:{type:String,default:"round"},indicatorPos:{type:String,default:"bottomCenter"},autoplay:{type:Boolean,default:!0}},data:function(){return{num:0,zIndex:0,showpic:null,hidepic:null,setTime:0,touchDot:0}},methods:{touchstart:function(t){this.touchDot=t.touches[0].pageX},touchend:function(t){var e=this,n=t.changedTouches[0].pageX;n-this.touchDot<=-40&&(this.num=this.num-1,this.num<0&&(this.num=this.list.length-1),setTimeout((function(){e.zIndex=e.num}),1e3)),n-this.touchDot>=40&&(this.num=this.num+1,this.num>=this.list.length&&(this.num=0),setTimeout((function(){e.zIndex=e.num}),1e3))}},destroyed:function(){clearInterval(this.setTime)},watch:{list:{handler:function(e){var n=this;if(0!==e.length){var i=t.createAnimation({});i.opacity(1).step({duration:this.duration}),this.showpic=i.export(),i.opacity(0).step({duration:this.duration}),this.hidepic=i.export(),this.autoplay&&(this.setTime=setInterval((function(){n.num=n.num+1,n.num>=n.list.length&&(n.num=0),setTimeout((function(){n.zIndex=n.num}),n.interval+1e3)}),this.interval))}},immediate:!0}}};e.default=n}).call(this,n("543d")["default"])},"19ab":function(t,e,n){"use strict";n.r(e);var i=n("08c4"),u=n.n(i);for(var a in i)"default"!==a&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=u.a},"4e9c":function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return u})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return i}));var u=function(){var t=this,e=t.$createElement;t._self._c},a=[]},7026:function(t,e,n){"use strict";var i=n("cf6f"),u=n.n(i);u.a},"99f5":function(t,e,n){"use strict";n.r(e);var i=n("4e9c"),u=n("19ab");for(var a in u)"default"!==a&&function(t){n.d(e,t,(function(){return u[t]}))}(a);n("7026");var o,r=n("f0c5"),s=Object(r["a"])(u["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],o);e["default"]=s.exports},cf6f:function(t,e,n){}}]);
  2. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  3. 'components/page-component/app-swiper/swiper-create-component',
  4. {
  5. 'components/page-component/app-swiper/swiper-create-component':(function(module, exports, __webpack_require__){
  6. __webpack_require__('543d')['createComponent'](__webpack_require__("99f5"))
  7. })
  8. },
  9. [['components/page-component/app-swiper/swiper-create-component']]
  10. ]);