1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-d500d246"],{"1abe":function(t,e,i){},"6db4":function(t,e,i){!function(t,e){"use strict";function i(t,e,i){document.addEventListener?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function n(t,e,i){document.addEventListener?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}function o(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function r(t,e){return t(e={exports:{}},e.exports),e.exports}function s(){var t={},e=0,i=0,n=0;return{add:function(o,r){r||(r=o,o=0),o>i?i=o:o<n&&(n=o),t[o]||(t[o]=[]),t[o].push(r),e++},process:function(){for(var e=n;e<=i;e++)for(var o=t[e],r=0;r<o.length;r++)(0,o[r])()},size:function(){return e}}}function a(t){return t[b]}function l(t){return Array.isArray(t)||void 0!==t.length}function c(t){if(Array.isArray(t))return t;var e=[];return x(t,(function(t){e.push(t)})),e}function d(t){return t&&1===t.nodeType}function h(t,e,i){var n=t[e];return void 0!==n&&null!==n||void 0===i?n:i}e=e&&e.hasOwnProperty("default")?e.default:e;var u=function(t){var e=Date.now();return function(i){if(i-e>(t||14))return e=i,!0}},f={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"stripContainer",staticClass:"happy-scroll-strip",class:[t.horizontal?"happy-scroll-strip--horizontal":"happy-scroll-strip--vertical"],style:[t.initLocation],on:{"!wheel":function(e){return e.stopPropagation(),t.handlerWheel(e)}}},[i("div",{ref:"strip",staticClass:"happy-scroll-bar",style:[t.translate,o({},t.config.sizeAttr,t.length+"px"),t.initSize,{background:t.color},{opacity:t.isOpacity}],on:{mousedown:function(e){return e.stopPropagation(),t.handlerMouseDown(e)}}})])},staticRenderFns:[],name:"happy-scroll-strip",props:{horizontal:Boolean,left:Boolean,top:Boolean,move:{type:Number,default:0},size:{type:[Number,String],default:4},minLengthV:{type:Number,default:40},minLengthH:{type:Number,default:40},color:{type:String,default:"rgba(51,51,51,0.2)"},throttle:{type:Number,default:14}},data:function(){return{config:{},startMove:!1,binded:!1,length:0,percentage:0,maxOffset:0,currentOffset:0,moveThrottle:u(this.throttle)}},watch:{currentOffset:function(t){0===t?this.emitLocationEvent("start",0):t===this.maxOffset&&this.emitLocationEvent("end",t/this.percentage)}},computed:{initSize:function(){return o({},this.horizontal?"height":"width",this.size+"px")},isOpacity:function(){return this.percentage<1?1:0},translate:function(){var t=this.move*this.percentage;if(this.$refs.stripContainer)return t<0&&(t=0),t>this.maxOffset&&(t=this.maxOffset),this.currentOffset=t,{transform:this.config.translate+"("+t+"px)"}},initLocation:function(){return this.horizontal?this.top?{top:0,bottom:"auto"}:"":this.left?{left:0,right:"auto"}:""}},methods:{emitLocationEvent:function(t,e){var i=this.horizontal?"horizontal":"vertical";this.$emit(i+"-"+t,e)},computeStrip:function(t,e){var i=this.$refs.stripContainer[this.config.client];this.length=i*(e/t);var n=this.horizontal?this.minLengthH:this.minLengthV;n<1&&(n*=i),this.length=this.length<n?n:this.length;var o=this.maxOffset=i-this.length;this.percentage=o/(t-e)},bindEvents:function(){this.binded||(i(document,"mouseup",this.handlerMouseUp),i(document,"mousemove",this.handlerMove),this.binded=!0)},handlerMouseDown:function(t){if(0===t.button)return t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this.startMove=!0,this.axis=t[this.config.clientAxis],this.bindEvents(),!1},handlerMouseUp:function(){this.startMove=!1},handlerMove:function(t){if(this.startMove&&this.moveThrottle(Date.now())){t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation();var e=this.$refs.stripContainer.getBoundingClientRect(),i=this.$refs.strip.getBoundingClientRect()[this.config.direction]-e[this.config.direction],n=t[this.config.clientAxis]-this.axis+i;this.axis=t[this.config.clientAxis],this.changeOffset(n)}},handlerWheel:function(t){var e=this.$refs.stripContainer.getBoundingClientRect(),i=this.$refs.strip.getBoundingClientRect()[this.config.direction]-e[this.config.direction]+t[this.config.wheelDelta];this.changeOffset(i,t)},changeOffset:function(t,e){t<0&&(t=0),t>this.maxOffset&&(t=this.maxOffset),e&&t>0&&t<this.maxOffset&&(e.preventDefault(),e.stopImmediatePropagation()),this.currentOffset=t,this.$refs.strip.style.transform=this.config.translate+"("+t+"px)",this.$emit("change",t/this.percentage)}},created:function(){var t={h:{sizeAttr:"width",client:"clientWidth",clientAxis:"clientX",translate:"translateX",direction:"left",wheelDelta:"deltaX"},v:{sizeAttr:"height",client:"clientHeight",clientAxis:"clientY",translate:"translateY",direction:"top",wheelDelta:"deltaY"}};this.config=this.horizontal?t.h:t.v},destroyed:function(){n(document,"mouseup",this.handlerClickUp),n(document,"mousemove",this.handlerMove)}},p=r((function(t){(t.exports={}).forEach=function(t,e){for(var i=0;i<t.length;i++){var n=e(t[i]);if(n)return n}}})),g=r((function(t){var e=t.exports={};e.isIE=function(t){return!(!function(){var t=navigator.userAgent.toLowerCase();return-1!==t.indexOf("msie")||-1!==t.indexOf("trident")||-1!==t.indexOf(" edge/")}()||t&&t!==function(){var t=3,e=document.createElement("div"),i=e.getElementsByTagName("i");do{e.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e"}while(i[0]);return t>4?t:void 0}())},e.isLegacyOpera=function(){return!!window.opera}})),v=r((function(t){(t.exports={}).getOption=function(t,e,i){var n=t[e];return void 0!==n&&null!==n||void 0===i?n:i}})),m=function(t){function e(){for(c=!0;l.size();){var t=l;l=s(),t.process()}c=!1}function i(){a=function(t){return setTimeout(t,0)}(e)}var n=(t=t||{}).reporter,o=v.getOption(t,"async",!0),r=v.getOption(t,"auto",!0);r&&!o&&(n&&n.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),o=!0);var a,l=s(),c=!1;return{add:function(t,e){!c&&r&&o&&0===l.size()&&i(),l.add(t,e)},force:function(t){c||(void 0===t&&(t=o),a&&(function(t){clearTimeout(t)}(a),a=null),t?i():e())}}},b="_erd",y={initState:function(t){return t[b]={},a(t)},getState:a,cleanState:function(t){delete t[b]}},w=p.forEach,S=function(t){function e(t,e,i){if(t.addEventListener)t.addEventListener(e,i);else{if(!t.attachEvent)return r.error("[scroll] Don't know how to add event listeners.");t.attachEvent("on"+e,i)}}function i(t,e,i){if(t.removeEventListener)t.removeEventListener(e,i);else{if(!t.detachEvent)return r.error("[scroll] Don't know how to remove event listeners.");t.detachEvent("on"+e,i)}}function n(t){return a(t).container.childNodes[0].childNodes[0].childNodes[0]}function o(t){return a(t).container.childNodes[0].childNodes[0].childNodes[1]}var r=(t=t||{}).reporter,s=t.batchProcessor,a=t.stateHandler.getState,l=t.idHandler;if(!s)throw new Error("Missing required dependency: batchProcessor");if(!r)throw new Error("Missing required dependency: reporter.");var c=function(){var t=document.createElement("div");t.style.cssText="position: absolute; width: 1000px; height: 1000px; visibility: hidden; margin: 0; padding: 0;";var e=document.createElement("div");e.style.cssText="position: absolute; width: 500px; height: 500px; overflow: scroll; visibility: none; top: -1500px; left: -1500px; visibility: hidden; margin: 0; padding: 0;",e.appendChild(t),document.body.insertBefore(e,document.body.firstChild);var i=500-e.clientWidth,n=500-e.clientHeight;return document.body.removeChild(e),{width:i,height:n}}(),d="erd_scroll_detection_container";return function(t,e){if(!document.getElementById(t)){var i=e+"_animation",n="/* Created by the element-resize-detector library. */\n";n+="."+e+" > div::-webkit-scrollbar { display: none; }\n\n",n+="."+e+"_animation_active { -webkit-animation-duration: 0.1s; animation-duration: 0.1s; -webkit-animation-name: "+i+"; animation-name: "+i+"; }\n",n+="@-webkit-keyframes "+i+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",function(e,i){i=i||function(t){document.head.appendChild(t)};var n=document.createElement("style");n.innerHTML=e,n.id=t,i(n)}(n+="@keyframes "+i+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}}("erd_scroll_detection_scrollbar_style",d),{makeDetectable:function(t,i,h){function u(){if(t.debug){var e=Array.prototype.slice.call(arguments);if(e.unshift(l.get(i),"Scroll: "),r.log.apply)r.log.apply(null,e);else for(var n=0;n<e.length;n++)r.log(e[n])}}function f(t){var e=a(t).container.childNodes[0],i=getComputedStyle(e);return!i.width||-1===i.width.indexOf("px")}function p(){var t=getComputedStyle(i),e={};return e.position=t.position,e.width=i.offsetWidth,e.height=i.offsetHeight,e.top=t.top,e.right=t.right,e.bottom=t.bottom,e.left=t.left,e.widthCSS=t.width,e.heightCSS=t.height,e}function g(){if(u("storeStyle invoked."),a(i)){var t=p();a(i).style=t}else u("Aborting because element has been uninstalled")}function v(t,e,i){a(t).lastWidth=e,a(t).lastHeight=i}function m(t){return n(t).childNodes[0]}function b(){return 2*c.width+1}function y(){return 2*c.height+1}function S(t){return t+10+b()}function x(t){return t+10+y()}function z(t,e,i){var r=n(t),s=o(t),a=S(e),l=x(i),c=function(t){return 2*t+b()}(e),d=function(t){return 2*t+y()}(i);r.scrollLeft=a,r.scrollTop=l,s.scrollLeft=c,s.scrollTop=d}function A(){var t=a(i).container;if(!t){(t=document.createElement("div")).className=d,t.style.cssText="visibility: hidden; display: inline; width: 0px; height: 0px; z-index: -1; overflow: hidden; margin: 0; padding: 0;",a(i).container=t,function(t){t.className+=" "+d+"_animation_active"}(t),i.appendChild(t);var n=function(){a(i).onRendered&&a(i).onRendered()};e(t,"animationstart",n),a(i).onAnimationStart=n}return t}function E(){function t(){a(i).onExpand&&a(i).onExpand()}function n(){a(i).onShrink&&a(i).onShrink()}if(u("Injecting elements"),a(i)){!function(){var t=a(i).style;if("static"===t.position){i.style.position="relative";var e=function(t,e,i,n){var o=i[n];"auto"!==o&&"0"!==function(t){return t.replace(/[^-\d\.]/g,"")}(o)&&(t.warn("An element that is positioned static has style."+n+"="+o+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+n+" will be set to 0. Element: ",e),e.style[n]=0)};e(r,i,t,"top"),e(r,i,t,"right"),e(r,i,t,"bottom"),e(r,i,t,"left")}}();var o=a(i).container;o||(o=A());var s=c.width,l=c.height,h="position: absolute; flex: none; overflow: hidden; z-index: -1; visibility: hidden; "+function(t,e,i,n){return t=t?t+"px":"0",e=e?e+"px":"0",i=i?i+"px":"0","left: "+t+"; top: "+e+"; right: "+(n=n?n+"px":"0")+"; bottom: "+i+";"}(-(1+s),-(1+l),-l,-s),f=document.createElement("div"),p=document.createElement("div"),g=document.createElement("div"),v=document.createElement("div"),m=document.createElement("div"),b=document.createElement("div");f.dir="ltr",f.style.cssText="position: absolute; flex: none; overflow: hidden; z-index: -1; visibility: hidden; width: 100%; height: 100%; left: 0px; top: 0px;",f.className=d,p.className=d,p.style.cssText=h,g.style.cssText="position: absolute; flex: none; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;",v.style.cssText="position: absolute; left: 0; top: 0;",m.style.cssText="position: absolute; flex: none; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;",b.style.cssText="position: absolute; width: 200%; height: 200%;",g.appendChild(v),m.appendChild(b),p.appendChild(g),p.appendChild(m),f.appendChild(p),o.appendChild(f),e(g,"scroll",t),e(m,"scroll",n),a(i).onExpandScroll=t,a(i).onShrinkScroll=n}else u("Aborting because element has been uninstalled")}function L(){function e(t,e,i){var n=m(t),o=S(e),r=x(i);n.style.width=o+"px",n.style.height=r+"px"}function c(n){var o=i.offsetWidth,c=i.offsetHeight;u("Storing current size",o,c),v(i,o,c),s.add(0,(function(){if(a(i))if(d()){if(t.debug){var n=i.offsetWidth,s=i.offsetHeight;n===o&&s===c||r.warn(l.get(i),"Scroll: Size changed before updating detector elements.")}e(i,o,c)}else u("Aborting because element container has not been initialized");else u("Aborting because element has been uninstalled")})),s.add(1,(function(){a(i)?d()?z(i,o,c):u("Aborting because element container has not been initialized"):u("Aborting because element has been uninstalled")})),n&&s.add(2,(function(){a(i)?d()?n():u("Aborting because element container has not been initialized"):u("Aborting because element has been uninstalled")}))}function d(){return!!a(i).container}function h(){u("notifyListenersIfNeeded invoked");var t=a(i);return void 0===a(i).lastNotifiedWidth&&t.lastWidth===t.startSize.width&&t.lastHeight===t.startSize.height?u("Not notifying: Size is the same as the start size, and there has been no notification yet."):t.lastWidth===t.lastNotifiedWidth&&t.lastHeight===t.lastNotifiedHeight?u("Not notifying: Size already notified"):(u("Current size not notified, notifying..."),t.lastNotifiedWidth=t.lastWidth,t.lastNotifiedHeight=t.lastHeight,void w(a(i).listeners,(function(t){t(i)})))}function p(){if(u("Scroll detected."),f(i))u("Scroll event fired while unrendered. Ignoring...");else{var t=i.offsetWidth,e=i.offsetHeight;t!==i.lastWidth||e!==i.lastHeight?(u("Element size changed."),c(h)):u("Element size has not changed ("+t+"x"+e+").")}}if(u("registerListenersAndPositionElements invoked."),a(i)){a(i).onRendered=function(){if(u("startanimation triggered."),f(i))u("Ignoring since element is still unrendered...");else{u("Element rendered.");var t=n(i),e=o(i);0!==t.scrollLeft&&0!==t.scrollTop&&0!==e.scrollLeft&&0!==e.scrollTop||(u("Scrollbars out of sync. Updating detector elements..."),c(h))}},a(i).onExpand=p,a(i).onShrink=p;var g=a(i).style;e(i,g.width,g.height)}else u("Aborting because element has been uninstalled")}function I(){if(u("finalizeDomMutation invoked."),a(i)){var t=a(i).style;v(i,t.width,t.height),z(i,t.width,t.height)}else u("Aborting because element has been uninstalled")}function T(){h(i)}function C(){var t;u("Installing..."),a(i).listeners=[],t=p(),a(i).startSize={width:t.width,height:t.height},u("Element start size",a(i).startSize),s.add(0,g),s.add(1,E),s.add(2,L),s.add(3,I),s.add(4,T)}h||(h=i,i=t,t=null),t=t||{},u("Making detectable..."),function(t){return!function(t){return t===t.ownerDocument.body||t.ownerDocument.body.contains(t)}(t)||null===getComputedStyle(t)}(i)?(u("Element is detached"),A(),u("Waiting until element is attached..."),a(i).onRendered=function(){u("Element is now attached"),C()}):C()},addListener:function(t,e){if(!a(t).listeners.push)throw new Error("Cannot add listener to an element that is not detectable.");a(t).listeners.push(e)},uninstall:function(t){var e=a(t);e&&(e.onExpandScroll&&i(n(t),"scroll",e.onExpandScroll),e.onShrinkScroll&&i(o(t),"scroll",e.onShrinkScroll),e.onAnimationStart&&i(e.container,"animationstart",e.onAnimationStart),e.container&&t.removeChild(e.container))}}},x=p.forEach,z=function(t){var e;if((t=t||{}).idHandler)e={get:function(e){return t.idHandler.get(e,!0)},set:t.idHandler.set};else{var i=function(){var t=1;return{generate:function(){return t++}}}(),n=function(t){var e=t.idGenerator,i=t.stateHandler.getState;return{get:function(t){var e=i(t);return e&&void 0!==e.id?e.id:null},set:function(t){var n=i(t);if(!n)throw new Error("setId required the element to have a resize detection state.");var o=e.generate();return n.id=o,o}}}({idGenerator:i,stateHandler:y});e=n}var o=t.reporter;o||(o=function(t){function e(){}var i={log:e,warn:e,error:e};if(!t&&window.console){var n=function(t,e){t[e]=function(){var t=console[e];if(t.apply)t.apply(console,arguments);else for(var i=0;i<arguments.length;i++)t(arguments[i])}};n(i,"log"),n(i,"warn"),n(i,"error")}return i}(!1===o));var r=h(t,"batchProcessor",m({reporter:o})),s={};s.callOnAdd=!!h(t,"callOnAdd",!0),s.debug=!!h(t,"debug",!1);var a,u=function(t){function e(e){var n=t.get(e);return void 0===n?[]:i[n]||[]}var i={};return{get:e,add:function(e,n){var o=t.get(e);i[o]||(i[o]=[]),i[o].push(n)},removeListener:function(t,i){for(var n=e(t),o=0,r=n.length;o<r;++o)if(n[o]===i){n.splice(o,1);break}},removeAllListeners:function(t){var i=e(t);i&&(i.length=0)}}}(e),f=function(t){var e=t.stateHandler.getState;return{isDetectable:function(t){var i=e(t);return i&&!!i.isDetectable},markAsDetectable:function(t){e(t).isDetectable=!0},isBusy:function(t){return!!e(t).busy},markBusy:function(t,i){e(t).busy=!!i}}}({stateHandler:y}),p=h(t,"strategy","object"),v={reporter:o,batchProcessor:r,stateHandler:y,idHandler:e};if("scroll"===p&&(g.isLegacyOpera()?(o.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),p="object"):g.isIE(9)&&(o.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),p="object")),"scroll"===p)a=S(v);else{if("object"!==p)throw new Error("Invalid strategy name: "+p);a=function(t){function e(t){return o(t).object}var i=(t=t||{}).reporter,n=t.batchProcessor,o=t.stateHandler.getState;if(!i)throw new Error("Missing required dependency: reporter.");return{makeDetectable:function(t,e,r){r||(r=e,e=t,t=null),t=t||{},g.isIE(8)?r(e):function(t,e){function r(){function n(){if("static"===l.position){t.style.position="relative";var e=function(t,e,i,n){var o=i[n];"auto"!==o&&"0"!==function(t){return t.replace(/[^-\d\.]/g,"")}(o)&&(t.warn("An element that is positioned static has style."+n+"="+o+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+n+" will be set to 0. Element: ",e),e.style[n]=0)};e(i,t,l,"top"),e(i,t,l,"right"),e(i,t,l,"bottom"),e(i,t,l,"left")}}""!==l.position&&(n(),a=!0);var r=document.createElement("object");r.style.cssText=s,r.tabIndex=-1,r.type="text/html",r.onload=function(){a||n(),function t(e,i){e.contentDocument?i(e.contentDocument):setTimeout((function(){t(e,i)}),100)}(this,(function(i){e(t)}))},g.isIE()||(r.data="about:blank"),t.appendChild(r),o(t).object=r,g.isIE()&&(r.data="about:blank")}var s="display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; opacity: 0; z-index: -1000; pointer-events: none;",a=!1,l=window.getComputedStyle(t),c=t.offsetWidth,d=t.offsetHeight;o(t).startSize={width:c,height:d},n?n.add(r):r()}(e,r)},addListener:function(t,i){function n(){i(t)}if(!e(t))throw new Error("Element is not detectable by this strategy.");g.isIE(8)?(o(t).object={proxy:n},t.attachEvent("onresize",n)):e(t).contentDocument.defaultView.addEventListener("resize",n)},uninstall:function(t){g.isIE(8)?t.detachEvent("onresize",o(t).object.proxy):t.removeChild(e(t)),delete o(t).object}}}(v)}var b={};return{listenTo:function(t,i,n){function r(t){var e=u.get(t);x(e,(function(e){e(t)}))}function p(t,e,i){u.add(e,i),t&&i(e)}if(n||(n=i,i=t,t={}),!i)throw new Error("At least one element required.");if(!n)throw new Error("Listener required.");if(d(i))i=[i];else{if(!l(i))return o.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");i=c(i)}var g=0,v=h(t,"callOnAdd",s.callOnAdd),m=h(t,"onReady",(function(){})),w=h(t,"debug",s.debug);x(i,(function(t){y.getState(t)||(y.initState(t),e.set(t));var s=e.get(t);if(w&&o.log("Attaching listener to element",s,t),!f.isDetectable(t))return w&&o.log(s,"Not detectable."),f.isBusy(t)?(w&&o.log(s,"System busy making it detectable"),p(v,t,n),b[s]=b[s]||[],void b[s].push((function(){++g===i.length&&m()}))):(w&&o.log(s,"Making detectable..."),f.markBusy(t,!0),a.makeDetectable({debug:w},t,(function(t){if(w&&o.log(s,"onElementDetectable"),y.getState(t)){f.markAsDetectable(t),f.markBusy(t,!1),a.addListener(t,r),p(v,t,n);var e=y.getState(t);if(e&&e.startSize){var l=t.offsetWidth,c=t.offsetHeight;e.startSize.width===l&&e.startSize.height===c||r(t)}b[s]&&x(b[s],(function(t){t()}))}else w&&o.log(s,"Element uninstalled before being detectable.");delete b[s],++g===i.length&&m()})));w&&o.log(s,"Already detecable, adding listener."),p(v,t,n),g++})),g===i.length&&m()},removeListener:u.removeListener,removeAllListeners:u.removeAllListeners,uninstall:function(t){if(!t)return o.error("At least one element is required.");if(d(t))t=[t];else{if(!l(t))return o.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");t=c(t)}x(t,(function(t){u.removeAllListeners(t),a.uninstall(t),y.cleanState(t)}))}}},A=e;"undefined"!=typeof window&&window.Vue&&(A=window.Vue);var E={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"happy-scroll",staticClass:"happy-scroll"},[i("div",{ref:"container",staticClass:"happy-scroll-container",style:[t.initSize],on:{scroll:function(e){return e.stopPropagation(),t.onScroll(e)}}},[i("div",{ref:"content",staticClass:"happy-scroll-content",style:[t.contentBorderStyle]},[t._t("default")],2)]),t.hideVertical?t._e():i("happy-scroll-strip",t._g(t._b({ref:"stripY",attrs:{throttle:t.throttle,move:t.moveY},on:{change:t.slideYChange}},"happy-scroll-strip",t.$attrs,!1),t.$listeners)),t.hideHorizontal?t._e():i("happy-scroll-strip",t._g(t._b({ref:"stripX",attrs:{horizontal:"",throttle:t.throttle,move:t.moveX},on:{change:t.slideXChange}},"happy-scroll-strip",t.$attrs,!1),t.$listeners))],1)},staticRenderFns:[],name:"happy-scroll",inheritAttrs:!1,components:{HappyScrollStrip:f},props:{scrollTop:{type:[Number,String],default:0},scrollLeft:{type:[Number,String],default:0},hideVertical:Boolean,hideHorizontal:Boolean,throttle:{type:Number,default:14},resize:Boolean,smallerMoveH:{type:String,default:""},smallerMoveV:{type:String,default:""},biggerMoveH:{type:String,default:""},biggerMoveV:{type:String,default:""}},data:function(){return{initSize:{},moveX:+this.scrollLeft,moveY:+this.scrollTop,scrollThrottle:u(this.throttle),browserHSize:0,browserVSize:0,isScrollNotUseSpace:void 0}},watch:{scrollTop:function(t){this.$refs.container.scrollTop=this.moveY=+t},scrollLeft:function(t){this.$refs.container.scrollLeft=this.moveX=+t},hideVertical:function(t){t||this.$nextTick(this.computeStripY)},hideHorizontal:function(t){t||this.$nextTick(this.computeStripX)}},computed:{contentBorderStyle:function(){return void 0===this.isScrollNotUseSpace?{}:{"border-right":20-this.browserHSize+"px solid transparent","border-bottom":20-this.browserVSize+"px solid transparent"}}},methods:{slideYChange:function(t){this.$refs.container.scrollTop=t,this.$emit("update:scrollTop",this.$refs.container.scrollTop)},slideXChange:function(t){this.$refs.container.scrollLeft=t,this.$emit("update:scrollLeft",this.$refs.container.scrollLeft)},onScroll:function(t){if(!this.scrollThrottle(Date.now()))return!1;this.moveY=t.target.scrollTop,this.moveX=t.target.scrollLeft,this.updateSyncScroll()},initBrowserSize:function(){void 0!==this.isScrollNotUseSpace&&(!0===this.isScrollNotUseSpace?(this.browserHSize=0,this.browserVSize=0):(this.browserHSize=this.$refs.container.offsetWidth-this.$refs.container.clientWidth,this.browserVSize=this.$refs.container.offsetHeight-this.$refs.container.clientHeight))},computeStripX:function(){if(!this.hideHorizontal){var t=this.$refs["happy-scroll"],e=this.$slots.default[0].elm;this.$refs.stripX.computeStrip(e.scrollWidth,t.clientWidth)}},computeStripY:function(){if(!this.hideVertical){var t=this.$refs["happy-scroll"],e=this.$slots.default[0].elm;this.$refs.stripY.computeStrip(e.scrollHeight,t.clientHeight)}},resizeListener:function(){var t=this;if(this.resize){var e=z({strategy:"scroll",callOnAdd:!1}),i=this.$slots.default[0].elm,n=i.clientHeight,o=i.clientWidth;e.listenTo(i,(function(e){t.computeStripX(),t.computeStripY(),t.initBrowserSize();var i=void 0;e.clientHeight<n&&(i=t.smallerMoveH.toLocaleLowerCase()),e.clientHeight>n&&(i=t.biggerMoveH.toLocaleLowerCase()),"start"===i&&(t.moveY=0,t.slideYChange(t.moveY)),"end"===i&&(t.moveY=e.clientHeight,t.slideYChange(t.moveY)),n=e.clientHeight,i="",e.clientWidth<o&&(i=t.smallerMoveV.toLocaleLowerCase()),e.clientWidth>o&&(i=t.biggerMoveV.toLocaleLowerCase()),"start"===i&&(t.moveX=0,t.slideXChange(t.moveX)),"end"===i&&(t.moveX=e.clientWidth,t.slideXChange(t.moveX)),o=e.clientWidth}))}},setContainerSize:function(){this.initSize={width:this.$refs["happy-scroll"].clientWidth+20+"px",height:this.$refs["happy-scroll"].clientHeight+20+"px"}},checkScrollMode:function(){if(void 0===A._happyJS._isScrollNotUseSpace){var t=this.$slots.default[0].elm,e=this.$refs.container;(t.offsetHeight>e.clientHeight||t.offsetWidth>e.clientWidth)&&(e.offsetWidth>e.clientWidth||e.offsetHeight>e.clientHeight?A._happyJS._isScrollNotUseSpace=!1:A._happyJS._isScrollNotUseSpace=!0,this.isScrollNotUseSpace=A._happyJS._isScrollNotUseSpace)}}},beforeCreate:function(){var t=A._happyJS=A._happyJS||{};this.isScrollNotUseSpace=t._isScrollNotUseSpace},created:function(){var t,e,i,n,o,r,s,a,l;this.updateSyncScroll=(t=function(){this.$emit("update:scrollTop",this.moveY),this.$emit("update:scrollLeft",this.moveX)},e=this.throttle,l=function l(){var c=(new Date).getTime()-s;c<e&&c>=0?n=setTimeout(l,e-c):(n=null,i||(a=t.apply(r,o),n||(r=o=null)))},function(){r=this,o=arguments,s=(new Date).getTime();var c=i&&!n;return n||(n=setTimeout(l,e)),c&&(a=t.apply(r,o),r=o=null),a})},mounted:function(){var t=this;this.setContainerSize(),this.$nextTick((function(){t.computeStripX(),t.computeStripY(),t.checkScrollMode(),t.initBrowserSize(),t.$nextTick((function(){t.scrollTop&&(t.$refs.container.scrollTop=+t.scrollTop),t.scrollLeft&&(t.$refs.container.scrollLeft=+t.scrollLeft)}))})),this.resizeListener(),this.$watch("browserHSize",this.setContainerSize),this.$watch("browserVSize",this.setContainerSize)}};"undefined"!=typeof window&&window.Vue&&Vue.component("happy-scroll",E);var L={install:function(t){t.component("happy-scroll",E)},version:"2.1.1"};t.default=L,t.HappyScroll=E,t.version="2.1.1",Object.defineProperty(t,"__esModule",{value:!0})}(e,i("a026"))},"8a35":function(t,e,i){"use strict";var n=i("1abe");i.n(n).a},a254:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAAWCAYAAACL6W/rAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFGmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgNzkuMTY0NDYwLCAyMDIwLzA1LzEyLTE2OjA0OjE3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zO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DoJ3v4OxOlYMXi8PSmz1XcmqDx+iLL1lVkpCkmJ2rOnHeXMHhxD4GKXwwKnhnHA/dJcrIUTz3qcKFJ8HWFyaelJk2toWl18bKg8rjJqmzJvpKQiNxsSWOr4Hj10LGdnAg5WaHARUdpkqdo8lZIGpoNPit1D8yIhAE0tgiKii2KiiElSZGVqbl/qcO6fIdt70RxqDx0oddn8OZWm5QkTX2DIDoali2UfOT97+tnJCkK19n/ftsONLcJDh42KS4x6el1PxexsNgYiI/TNLaEslLfYFDfAHsOmmx5wuHlzTY1pwzOng/aHPnZ5NLfNjlZkqJiiyULFDfHMKwyPPrbwKk4HETcY2mzFV+8GyB5qnvT7thrIqUIm1a2DWUVFrlZwT7LyXKoqhv6gf2/iFhYVa2BVPDQCum6P3ECWKamvTN83eszmTZZsyhdco9HjXhoDBcRl2JXN2zfY/HsBgfDCBJu7RCkTFPMm6PIXyk512Bw9Ndw4tW/C+r/FLxU6KAUlP0wooE8bIxoeOz93MKRsD4/+Ppfhe1A6RGTHXst179QX35jsmmtQ1mFyZWu61eGAEJrjRADL/F4PO5NdO1hAYkJmkkT4fKV4MPd13ddeEaMEY97AK2hrUPQ1jFadEYP17fQxxA3rLB/AInulg8syJa/AAAAAElFTkSuQmCC"},adde:function(t,e,i){"use strict";var n=i("a34a"),o=i.n(n),r=i("6db4"),s=i("42e3"),a=i("c4c8");function l(t,e,i,n,o,r,s){try{var a=t[r](s),l=a.value}catch(t){return void i(t)}a.done?e(l):Promise.resolve(l).then(n,o)}var c={name:"goods_detail",props:{goodsId:{type:String|Number,default:""},product:{type:String|Number,default:""}},components:{HappyScroll:r.HappyScroll},data:function(){return{value2:0,goodsInfo:{}}},mounted:function(){this.product?this.getInfoApi():this.getInfo()},methods:{getInfo:function(){var t=this;Object(s.D)(this.goodsId).then((function(e){t.goodsInfo=e.data}))},getInfoApi:function(){var t=this;Object(a.O)(this.goodsId).then(function(){var e,i=(e=o.a.mark((function e(i){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.goodsInfo=i.data.productInfo;case 1:case"end":return e.stop()}}),e)})),function(){var t=this,i=arguments;return new Promise((function(n,o){var r=e.apply(t,i);function s(t){l(r,n,o,s,a,"next",t)}function a(t){l(r,n,o,s,a,"throw",t)}s(void 0)}))});return function(t){return i.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg)}))}}},d=(i("8a35"),i("2877")),h=Object(d.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"goods_detail"},[n("div",{staticClass:"goods_detail_wrapper",class:t.product?"on":"",staticStyle:{height:"640px"}},[n("HappyScroll",{attrs:{size:"5",resize:"","hide-horizontal":""}},[n("div",{staticStyle:{width:"375px"}},[n("div",{staticClass:"title-box"},[t._v("商品详情")]),n("div",{staticClass:"swiper-box"},[n("Carousel",{attrs:{autoplay:"",arrow:"never"},model:{value:t.value2,callback:function(e){t.value2=e},expression:"value2"}},t._l(t.goodsInfo.slider_image,(function(t,e){return n("CarouselItem",{key:e},[n("div",{staticClass:"demo-carousel"},[n("img",{attrs:{src:t,alt:""}})])])})),1)],1),n("div",{staticClass:"goods_info"},[n("div",{staticClass:"number-wrapper"},[n("div",{staticClass:"price"},[n("span",[t._v("¥")]),t._v(t._s(t.goodsInfo.price))]),t.goodsInfo.vip_price>0?n("div",{staticClass:"old-price"},[t._v("\n ¥"+t._s(t.goodsInfo.vip_price)+"\n "),n("img",{attrs:{src:i("a254"),alt:"",width:"28"}})]):t._e()]),n("div",{staticClass:"name"},[t._v(t._s(t.goodsInfo.store_name))]),n("div",{staticClass:"msg"},[n("div",{staticClass:"item"},[t._v("原价:¥"+t._s(t.goodsInfo.ot_price))]),n("div",{staticClass:"item"},[t._v("销量:"+t._s(t.goodsInfo.sales))]),n("div",{staticClass:"item"},[t._v("库存:"+t._s(t.goodsInfo.stock))])])]),n("div",{staticClass:"con-box"},[n("div",{staticClass:"title-box"},[t._v("商品介绍")]),n("div",{staticClass:"content",domProps:{innerHTML:t._s(t.goodsInfo.description)}})])])])],1)])}),[],!1,null,"7eb7eab6",null);e.a=h.exports}}]);
|