react-lazyload-pic
Version:
a lazyload-pic component for React
3 lines (2 loc) • 21.6 kB
JavaScript
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var React=_interopDefault(require("react"));function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?_assertThisInitialized(e):t}function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}!function(){if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var e=window.document;n.prototype.THROTTLE_TIMEOUT=100,n.prototype.POLL_INTERVAL=null,n.prototype.USE_MUTATION_OBSERVER=!0,n.prototype.observe=function(e){if(!this._observationTargets.some(function(t){return t.element==e})){if(!e||1!=e.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},n.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter(function(t){return t.element!=e}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},n.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},n.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},n.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter(function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]})},n.prototype._parseRootMargin=function(e){var t=(e||"0px").split(/\s+/).map(function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}});return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},n.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(r(window,"resize",this._checkForIntersections,!0),r(e,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in window&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},n.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,o(window,"resize",this._checkForIntersections,!0),o(e,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},n.prototype._checkForIntersections=function(){var e=this._rootIsInDom(),n=e?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach(function(r){var o=r.element,s=i(o),a=this._rootContainsTarget(o),c=r.entry,p=e&&a&&this._computeTargetAndRootIntersection(o,n),l=r.entry=new t({time:window.performance&&performance.now&&performance.now(),target:o,boundingClientRect:s,rootBounds:n,intersectionRect:p});c?e&&a?this._hasCrossedThreshold(c,l)&&this._queuedEntries.push(l):c&&c.isIntersecting&&this._queuedEntries.push(l):this._queuedEntries.push(l)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},n.prototype._computeTargetAndRootIntersection=function(t,n){if("none"!=window.getComputedStyle(t).display){for(var r,o,s,c,p,l,u,d,_=i(t),m=a(t),f=!1;!f;){var h=null,y=1==m.nodeType?window.getComputedStyle(m):{};if("none"==y.display)return;if(m==this.root||m==e?(f=!0,h=n):m!=e.body&&m!=e.documentElement&&"visible"!=y.overflow&&(h=i(m)),h&&(r=h,o=_,s=void 0,c=void 0,p=void 0,l=void 0,u=void 0,d=void 0,s=Math.max(r.top,o.top),c=Math.min(r.bottom,o.bottom),p=Math.max(r.left,o.left),l=Math.min(r.right,o.right),d=c-s,!(_=(u=l-p)>=0&&d>=0&&{top:s,bottom:c,left:p,right:l,width:u,height:d})))break;m=a(m)}return _}},n.prototype._getRootRect=function(){var t;if(this.root)t=i(this.root);else{var n=e.documentElement,r=e.body;t={top:0,left:0,right:n.clientWidth||r.clientWidth,width:n.clientWidth||r.clientWidth,bottom:n.clientHeight||r.clientHeight,height:n.clientHeight||r.clientHeight}}return this._expandRectByRootMargin(t)},n.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map(function(t,n){return"px"==t.unit?t.value:t.value*(n%2?e.width:e.height)/100}),n={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},n.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,r=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==r)for(var o=0;o<this.thresholds.length;o++){var i=this.thresholds[o];if(i==n||i==r||i<n!=i<r)return!0}},n.prototype._rootIsInDom=function(){return!this.root||s(e,this.root)},n.prototype._rootContainsTarget=function(t){return s(this.root||e,t)},n.prototype._registerInstance=function(){},n.prototype._unregisterInstance=function(){},window.IntersectionObserver=n,window.IntersectionObserverEntry=t}function t(e){this.time=e.time,this.target=e.target,this.rootBounds=e.rootBounds,this.boundingClientRect=e.boundingClientRect,this.intersectionRect=e.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0},this.isIntersecting=!!e.intersectionRect;var t=this.boundingClientRect,n=t.width*t.height,r=this.intersectionRect,o=r.width*r.height;this.intersectionRatio=n?Number((o/n).toFixed(4)):this.isIntersecting?1:0}function n(e,t){var n,r,o,i=t||{};if("function"!=typeof e)throw new Error("callback must be a function");if(i.root&&1!=i.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),r=this.THROTTLE_TIMEOUT,o=null,function(){o||(o=setTimeout(function(){n(),o=null},r))}),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(i.rootMargin),this.thresholds=this._initThresholds(i.threshold),this.root=i.root||null,this.rootMargin=this._rootMarginValues.map(function(e){return e.value+e.unit}).join(" ")}function r(e,t,n,r){"function"==typeof e.addEventListener?e.addEventListener(t,n,r||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,n)}function o(e,t,n,r){"function"==typeof e.removeEventListener?e.removeEventListener(t,n,r||!1):"function"==typeof e.detatchEvent&&e.detatchEvent("on"+t,n)}function i(e){var t;try{t=e.getBoundingClientRect()}catch(e){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function s(e,t){for(var n=t;n;){if(n==e)return!0;n=a(n)}return!1}function a(e){var t=e.parentNode;return t&&11==t.nodeType&&t.host?t.host:t&&t.assignedSlot?t.assignedSlot.parentNode:t}}();var classnames=createCommonjsModule(function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)&&o.length){var s=n.apply(null,o);s&&e.push(s)}else if("object"===i)for(var a in o)t.call(o,a)&&o[a]&&e.push(a)}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}),reactIs_production_min=createCommonjsModule(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,c=n?Symbol.for("react.provider"):60109,p=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,_=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,f=n?Symbol.for("react.memo"):60115,h=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.fundamental"):60117,g=n?Symbol.for("react.responder"):60118,v=n?Symbol.for("react.scope"):60119;function I(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case l:case u:case i:case a:case s:case _:return e;default:switch(e=e&&e.$$typeof){case p:case d:case h:case f:case c:return e;default:return t}}case o:return t}}}function b(e){return I(e)===u}t.typeOf=I,t.AsyncMode=l,t.ConcurrentMode=u,t.ContextConsumer=p,t.ContextProvider=c,t.Element=r,t.ForwardRef=d,t.Fragment=i,t.Lazy=h,t.Memo=f,t.Portal=o,t.Profiler=a,t.StrictMode=s,t.Suspense=_,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===u||e===a||e===s||e===_||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===f||e.$$typeof===c||e.$$typeof===p||e.$$typeof===d||e.$$typeof===y||e.$$typeof===g||e.$$typeof===v)},t.isAsyncMode=function(e){return b(e)||I(e)===l},t.isConcurrentMode=b,t.isContextConsumer=function(e){return I(e)===p},t.isContextProvider=function(e){return I(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return I(e)===d},t.isFragment=function(e){return I(e)===i},t.isLazy=function(e){return I(e)===h},t.isMemo=function(e){return I(e)===f},t.isPortal=function(e){return I(e)===o},t.isProfiler=function(e){return I(e)===a},t.isStrictMode=function(e){return I(e)===s},t.isSuspense=function(e){return I(e)===_}});unwrapExports(reactIs_production_min);var reactIs_production_min_1=reactIs_production_min.typeOf,reactIs_production_min_2=reactIs_production_min.AsyncMode,reactIs_production_min_3=reactIs_production_min.ConcurrentMode,reactIs_production_min_4=reactIs_production_min.ContextConsumer,reactIs_production_min_5=reactIs_production_min.ContextProvider,reactIs_production_min_6=reactIs_production_min.Element,reactIs_production_min_7=reactIs_production_min.ForwardRef,reactIs_production_min_8=reactIs_production_min.Fragment,reactIs_production_min_9=reactIs_production_min.Lazy,reactIs_production_min_10=reactIs_production_min.Memo,reactIs_production_min_11=reactIs_production_min.Portal,reactIs_production_min_12=reactIs_production_min.Profiler,reactIs_production_min_13=reactIs_production_min.StrictMode,reactIs_production_min_14=reactIs_production_min.Suspense,reactIs_production_min_15=reactIs_production_min.isValidElementType,reactIs_production_min_16=reactIs_production_min.isAsyncMode,reactIs_production_min_17=reactIs_production_min.isConcurrentMode,reactIs_production_min_18=reactIs_production_min.isContextConsumer,reactIs_production_min_19=reactIs_production_min.isContextProvider,reactIs_production_min_20=reactIs_production_min.isElement,reactIs_production_min_21=reactIs_production_min.isForwardRef,reactIs_production_min_22=reactIs_production_min.isFragment,reactIs_production_min_23=reactIs_production_min.isLazy,reactIs_production_min_24=reactIs_production_min.isMemo,reactIs_production_min_25=reactIs_production_min.isPortal,reactIs_production_min_26=reactIs_production_min.isProfiler,reactIs_production_min_27=reactIs_production_min.isStrictMode,reactIs_production_min_28=reactIs_production_min.isSuspense,reactIs_development=createCommonjsModule(function(e,t){});unwrapExports(reactIs_development);var reactIs_development_1=reactIs_development.typeOf,reactIs_development_2=reactIs_development.AsyncMode,reactIs_development_3=reactIs_development.ConcurrentMode,reactIs_development_4=reactIs_development.ContextConsumer,reactIs_development_5=reactIs_development.ContextProvider,reactIs_development_6=reactIs_development.Element,reactIs_development_7=reactIs_development.ForwardRef,reactIs_development_8=reactIs_development.Fragment,reactIs_development_9=reactIs_development.Lazy,reactIs_development_10=reactIs_development.Memo,reactIs_development_11=reactIs_development.Portal,reactIs_development_12=reactIs_development.Profiler,reactIs_development_13=reactIs_development.StrictMode,reactIs_development_14=reactIs_development.Suspense,reactIs_development_15=reactIs_development.isValidElementType,reactIs_development_16=reactIs_development.isAsyncMode,reactIs_development_17=reactIs_development.isConcurrentMode,reactIs_development_18=reactIs_development.isContextConsumer,reactIs_development_19=reactIs_development.isContextProvider,reactIs_development_20=reactIs_development.isElement,reactIs_development_21=reactIs_development.isForwardRef,reactIs_development_22=reactIs_development.isFragment,reactIs_development_23=reactIs_development.isLazy,reactIs_development_24=reactIs_development.isMemo,reactIs_development_25=reactIs_development.isPortal,reactIs_development_26=reactIs_development.isProfiler,reactIs_development_27=reactIs_development.isStrictMode,reactIs_development_28=reactIs_development.isSuspense,reactIs=createCommonjsModule(function(e){e.exports=reactIs_production_min}),getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function shouldUseNative(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}var objectAssign=shouldUseNative()?Object.assign:function(e,t){for(var n,r,o=toObject(e),i=1;i<arguments.length;i++){for(var s in n=Object(arguments[i]))hasOwnProperty.call(n,s)&&(o[s]=n[s]);if(getOwnPropertySymbols){r=getOwnPropertySymbols(n);for(var a=0;a<r.length;a++)propIsEnumerable.call(n,r[a])&&(o[r[a]]=n[r[a]])}}return o},ReactPropTypesSecret="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ReactPropTypesSecret_1=ReactPropTypesSecret,has=Function.call.bind(Object.prototype.hasOwnProperty);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction;var factoryWithThrowingShims=function(){function e(e,t,n,r,o,i){if(i!==ReactPropTypesSecret_1){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return n.PropTypes=n,n},propTypes=createCommonjsModule(function(e){e.exports=factoryWithThrowingShims()});function styleInject(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var css=".container {\n background: #fff;\n}\n\n.skeleton {\n width: 100%;\n height: 20px;\n background: linear-gradient(90deg, #496eaa, #944fa8, #a8804f, #496eaa);\n background-size: 1400% 300%;\n position: absolute;\n top: 10px;\n left: 10px;\n animation: colorMove 20s ease infinite;\n}\n\n.skeleton1 {\n width: 300px;\n height: 200px;\n background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%);\n background-size: 400% 100%;\n animation: ant-skeleton-loading 1.4s ease infinite;\n}\n\n.L-skeleton1 {\n width: 300px;\n height: 200px;\n background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%);\n background-size: 400% 100%;\n animation: ant-skeleton-loading 1.4s ease infinite;\n}\n\n.defaultImg {\n width: 300px;\n height: 200px;\n}\n\n.noShow {\n display: none;\n}\n\n.L-container {\n display: flex;\n justify-content: center;\n width: 100%;\n}\n\n.box {\n height: 400px;\n overflow-y: scroll;\n}\n\n.defaultImageBox {\n display: flex;\n justify-content: center;\n width: 500px;\n height: 200px;\n margin: 20px auto;\n}\n\n@keyframes colorMove {\n 0% {\n background-position: 0% 0%;\n }\n 50% {\n background-position: 50% 100%;\n }\n 100% {\n background-position: 100% 0%;\n }\n}\n\n@keyframes ant-skeleton-loading {\n 0% {\n background-position: 100% 50%;\n }\n\n 100% {\n background-position: 0 50%;\n }\n}\n";styleInject(css);var PicLazyLoad=function(e){function t(){var e,n;_classCallCheck(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return _defineProperty(_assertThisInitialized(n=_possibleConstructorReturn(this,(e=_getPrototypeOf(t)).call.apply(e,[this].concat(o)))),"state",{loaded:!1}),n}return _inherits(t,React.Component),_createClass(t,[{key:"render",value:function(){var e=this,t=e.state.loaded,n=e.props,r=n.img,o=n.alt,i=n.imgClassName,s=n.skeleton;return React.createElement("div",{className:"container"},t?React.createElement("img",{className:classnames("defaultImg",i),src:r,alt:o}):React.createElement("div",{className:classnames("skeleton1",s)}),React.createElement("img",{className:"noShow",src:r,alt:o,onLoad:function(){e.setState({loaded:!0})}}))}}]),t}();_defineProperty(PicLazyLoad,"propTypes",{onLoaded:propTypes.func.isRequired,loaded:propTypes.bool.isRequired,img:propTypes.string.isRequired,alt:propTypes.string.isRequired,imgClassName:propTypes.string,skeleton:propTypes.string}),_defineProperty(PicLazyLoad,"defaultProps",{alt:""});var LazyLoadPic=function(e){function t(){var e,n;_classCallCheck(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return _defineProperty(_assertThisInitialized(n=_possibleConstructorReturn(this,(e=_getPrototypeOf(t)).call.apply(e,[this].concat(o)))),"state",{imgBlob:[]}),_defineProperty(_assertThisInitialized(n),"getBase64",function(e,t){var n=new XMLHttpRequest;n.open("get",e,!0),n.responseType="blob",n.onload=function(e){if(200===e.target.status){var n=e.target.response,r=new FileReader;r.onloadend=function(e){t(e.target.result)},r.readAsDataURL(n)}},n.send()}),_defineProperty(_assertThisInitialized(n),"callback",function(e){var t=_assertThisInitialized(n),r=t.state.imgBlob;t.setState({imgBlob:r.concat(e)})}),_defineProperty(_assertThisInitialized(n),"onload",function(e){var t=_assertThisInitialized(n),r=new IntersectionObserver(function(e){e.forEach(function(e){var n=e.target;if(e.intersectionRatio<=0)return null;console.log(n.dataset.src),t.getBase64(n.dataset.src,t.callback),r.unobserve(n)})},{threshold:[.02]});e.map(function(e){return r.observe(e.current)})}),n}return _inherits(t,React.Component),_createClass(t,[{key:"render",value:function(){var e=this,t=e.state.imgBlob,n=e.props,r=n.alt,o=n.imgClassName,i=n.imgBoxClassName,s=n.boxClassName,a=n.imgArr,c=[],p=[];a.map(function(e,n){var r=React.createRef();return p.push(r),c.push(React.createElement("div",{className:classnames("defaultImageBox",i),key:n},React.createElement("img",{key:n,className:classnames(t.length>0?"":"L-skeleton1",o),ref:r,src:t.length>0?t[n]:"",alt:"","data-src":e.url})))});var l=React.createElement("div",{className:classnames("box",s)},c,React.createElement("img",{onError:function(){return e.onload(p)},src:"",alt:r}));return React.createElement("div",{className:"L-container"},l)}}]),t}();_defineProperty(LazyLoadPic,"propTypes",{imgClassName:propTypes.string,imgBoxClassName:propTypes.string,alt:propTypes.string}),_defineProperty(LazyLoadPic,"defaultProps",{alt:""}),exports.LazyLoadPic=LazyLoadPic,exports.PicLazyLoad=PicLazyLoad;
//# sourceMappingURL=index.min.js.map