chunk-3fbf094e.234270ac.js 1.1 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3fbf094e"],{4204:function(t,e,l){"use strict";l("d3fb")},b407:function(t,e,l){"use strict";l.r(e);var s=function(){var t=this,e=t._self._c;return e("div",{ref:"container",staticClass:"cl-scroll",on:{wheel:function(e){return e.preventDefault(),t.handleScroll.apply(null,arguments)}}},[e("div",{ref:"wrapper",staticClass:"scroll-wrapper",style:{left:t.left+"px"}},[t._t("default")],2)])},f=[];const i=15;var n={name:"cl-scroll",data(){return{left:0}},methods:{handleScroll(t){const e=t.wheelDelta||3*-t.deltaY,l=this.$refs.container,s=l.offsetWidth,f=this.$refs.wrapper,n=f.offsetWidth;e>0?this.left=Math.min(0,this.left+e):s-i<n?this.left<-(n-s+i)?this.left=this.left:this.left=Math.max(this.left+e,s-n-i):this.left=0},moveToTarget(t){const e=this.$refs.container,l=e.offsetWidth,s=t.offsetLeft,f=t.offsetWidth;s<-this.left?this.left=-s+i:s+i>-this.left&&s+f<-this.left+l-i||(this.left=-(s-(l-f)+i))}}},r=n,a=(l("4204"),l("1805")),h=Object(a["a"])(r,s,f,!1,null,"2d7c0d59",null);e["default"]=h.exports},d3fb:function(t,e,l){}}]);