webpackJsonp([17],{Oktt:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={name:"MonitorScroll",props:{length:{type:Number,required:!0},limit:{type:Number,default:6},duration:{type:Number,default:3e3},mode:{type:[Number,String],default:1},step:{type:Number}},data:function(){return{timer:null,index:0}},mounted:function(){this.$nextTick(this.start)},beforeDestroy:function(){this.clearTimer()},computed:{isShort:function(){return this.length<=this.limit},isTooLong:function(){return this.length>120}},methods:{clearTimer:function(){clearInterval(this.timer),this.timer=null},start:function(){this.isShort||("2"==this.mode?this.startMode2():this.startMode1())},startMode1:function(){var t=this,e=this.$refs,n=e.scrollContent,r=e.subContent,s=n.offsetHeight;this.timer=setInterval(function(){s<=0?s=n.offsetHeight:(t.index<s?t.index+=1:t.index=0,n.style.transform="translateY("+-t.index+"px)",r&&(r.style.transform="translateY("+-t.index+"px)"))},50)},startMode2:function(){var t=this,e=this.$refs,n=e.scrollContent,r=e.subContent,s=this.$com.confirm(n,"children.length",0);this.timer=setInterval(function(){t.index<s?(t.index+=1,n.style.transition="transform 0.5s",r&&(r.style.transition="transform 0.5s")):(t.index=0,n.style.transition="none",r&&(r.style.transition="none")),n.style.transform="translateY("+-t.step*t.index+"rem)",r&&(r.style.transform="translateY("+-t.step*t.index+"rem)")},this.duration)}},watch:{length:function(){this.clearTimer(),this.index=0;var t=this.$refs,e=t.scrollContent,n=t.subContent;e&&(e.style.transform="translateY(0)"),n&&(n.style.transform="translateY(0)"),this.$nextTick(this.start)}}},s={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"monitor-scroll",on:{mouseenter:t.clearTimer,mouseleave:t.start}},[n("div",{ref:"scrollContent"},[t._t("default")],2),t._v(" "),t.isShort||t.isTooLong?t._e():n("div",{ref:"subContent"},[t._t("default")],2)])},staticRenderFns:[]};var i=n("VU/8")(r,s,!1,function(t){n("VUXW")},"data-v-3acc30e3",null);e.default=i.exports},VUXW:function(t,e){}});
//# sourceMappingURL=17.e3f07004109b569194e6.js.map