@nutui/nutui 2.3.10 → 2.3.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/dist/nutui.css +38 -38
  2. package/dist/nutui.css.map +1 -1
  3. package/dist/nutui.js +1712 -5049
  4. package/dist/nutui.js.map +1 -1
  5. package/dist/nutui.min.css +2 -2
  6. package/dist/nutui.min.js +11 -5
  7. package/dist/nutui.min.js.map +1 -1
  8. package/dist/packages/actionsheet/actionsheet.css +1 -1
  9. package/dist/packages/actionsheet/actionsheet.js +2 -2
  10. package/dist/packages/actionsheet/actionsheet.js.map +1 -1
  11. package/dist/packages/address/address.css +2 -2
  12. package/dist/packages/address/address.js +2 -2
  13. package/dist/packages/address/address.js.map +1 -1
  14. package/dist/packages/avatar/avatar.css +2 -2
  15. package/dist/packages/avatar/avatar.js +2 -2
  16. package/dist/packages/avatar/avatar.js.map +1 -1
  17. package/dist/packages/backtop/backtop.css +2 -2
  18. package/dist/packages/backtop/backtop.js +2 -2
  19. package/dist/packages/backtop/backtop.js.map +1 -1
  20. package/dist/packages/badge/badge.css +2 -2
  21. package/dist/packages/badge/badge.js +2 -2
  22. package/dist/packages/badge/badge.js.map +1 -1
  23. package/dist/packages/button/button.css +2 -2
  24. package/dist/packages/button/button.js +2 -2
  25. package/dist/packages/button/button.js.map +1 -1
  26. package/dist/packages/buttongroup/buttongroup.css +2 -2
  27. package/dist/packages/buttongroup/buttongroup.js +2 -2
  28. package/dist/packages/buttongroup/buttongroup.js.map +1 -1
  29. package/dist/packages/calendar/calendar.css +1 -1
  30. package/dist/packages/calendar/calendar.js +2 -2
  31. package/dist/packages/calendar/calendar.js.map +1 -1
  32. package/dist/packages/cell/cell.css +1 -1
  33. package/dist/packages/cell/cell.js +2 -2
  34. package/dist/packages/cell/cell.js.map +1 -1
  35. package/dist/packages/checkbox/checkbox.css +2 -2
  36. package/dist/packages/checkbox/checkbox.js +2 -2
  37. package/dist/packages/checkbox/checkbox.js.map +1 -1
  38. package/dist/packages/checkboxgroup/checkboxgroup.css +2 -2
  39. package/dist/packages/checkboxgroup/checkboxgroup.js +2 -2
  40. package/dist/packages/checkboxgroup/checkboxgroup.js.map +1 -1
  41. package/dist/packages/circleprogress/circleprogress.css +1 -1
  42. package/dist/packages/circleprogress/circleprogress.js +2 -2
  43. package/dist/packages/circleprogress/circleprogress.js.map +1 -1
  44. package/dist/packages/col/col.css +1 -1
  45. package/dist/packages/col/col.js +2 -2
  46. package/dist/packages/col/col.js.map +1 -1
  47. package/dist/packages/collapse/collapse.css +1 -1
  48. package/dist/packages/collapse/collapse.js +2 -2
  49. package/dist/packages/collapse/collapse.js.map +1 -1
  50. package/dist/packages/collapseitem/collapseitem.css +1 -1
  51. package/dist/packages/collapseitem/collapseitem.js +2 -2
  52. package/dist/packages/collapseitem/collapseitem.js.map +1 -1
  53. package/dist/packages/countdown/countdown.css +1 -1
  54. package/dist/packages/countdown/countdown.js +2 -2
  55. package/dist/packages/countdown/countdown.js.map +1 -1
  56. package/dist/packages/countup/countup.css +1 -1
  57. package/dist/packages/countup/countup.js +2 -2
  58. package/dist/packages/countup/countup.js.map +1 -1
  59. package/dist/packages/coupon/coupon.css +2 -2
  60. package/dist/packages/coupon/coupon.js +2 -2
  61. package/dist/packages/coupon/coupon.js.map +1 -1
  62. package/dist/packages/datepicker/datepicker.css +1 -1
  63. package/dist/packages/datepicker/datepicker.js +2 -2
  64. package/dist/packages/datepicker/datepicker.js.map +1 -1
  65. package/dist/packages/dialog/dialog.css +2 -2
  66. package/dist/packages/dialog/dialog.js +2 -2
  67. package/dist/packages/dialog/dialog.js.map +1 -1
  68. package/dist/packages/drag/drag.css +1 -1
  69. package/dist/packages/drag/drag.js +2 -2
  70. package/dist/packages/drag/drag.js.map +1 -1
  71. package/dist/packages/elevator/elevator.css +1 -1
  72. package/dist/packages/elevator/elevator.js +2 -2
  73. package/dist/packages/elevator/elevator.js.map +1 -1
  74. package/dist/packages/fixednav/fixednav.css +2 -2
  75. package/dist/packages/fixednav/fixednav.js +2 -2
  76. package/dist/packages/fixednav/fixednav.js.map +1 -1
  77. package/dist/packages/flex/flex.css +1 -1
  78. package/dist/packages/flex/flex.js +2 -2
  79. package/dist/packages/flex/flex.js.map +1 -1
  80. package/dist/packages/icon/icon.css +1 -1
  81. package/dist/packages/icon/icon.js +2 -2
  82. package/dist/packages/icon/icon.js.map +1 -1
  83. package/dist/packages/imagepicker/imagepicker.css +2 -2
  84. package/dist/packages/imagepicker/imagepicker.js +2 -2
  85. package/dist/packages/imagepicker/imagepicker.js.map +1 -1
  86. package/dist/packages/infiniteloading/infiniteloading.css +1 -1
  87. package/dist/packages/infiniteloading/infiniteloading.js +2 -2
  88. package/dist/packages/infiniteloading/infiniteloading.js.map +1 -1
  89. package/dist/packages/lazyload/lazyload.css +1 -1
  90. package/dist/packages/lazyload/lazyload.js +11 -5
  91. package/dist/packages/lazyload/lazyload.js.map +1 -1
  92. package/dist/packages/leftslip/leftslip.css +1 -1
  93. package/dist/packages/leftslip/leftslip.js +2 -2
  94. package/dist/packages/leftslip/leftslip.js.map +1 -1
  95. package/dist/packages/luckdraw/luckdraw.css +2 -2
  96. package/dist/packages/luckdraw/luckdraw.js +2 -2
  97. package/dist/packages/luckdraw/luckdraw.js.map +1 -1
  98. package/dist/packages/luckycard/luckycard.css +1 -1
  99. package/dist/packages/luckycard/luckycard.js +2 -2
  100. package/dist/packages/luckycard/luckycard.js.map +1 -1
  101. package/dist/packages/magic/magic.css +2 -2
  102. package/dist/packages/magic/magic.js +2 -2
  103. package/dist/packages/magic/magic.js.map +1 -1
  104. package/dist/packages/menu/menu.css +2 -2
  105. package/dist/packages/menu/menu.js +2 -2
  106. package/dist/packages/menu/menu.js.map +1 -1
  107. package/dist/packages/navbar/navbar.css +1 -1
  108. package/dist/packages/navbar/navbar.js +2 -2
  109. package/dist/packages/navbar/navbar.js.map +1 -1
  110. package/dist/packages/ninegrid/ninegrid.css +2 -2
  111. package/dist/packages/ninegrid/ninegrid.js +2 -2
  112. package/dist/packages/ninegrid/ninegrid.js.map +1 -1
  113. package/dist/packages/noticebar/noticebar.css +2 -2
  114. package/dist/packages/noticebar/noticebar.js +2 -2
  115. package/dist/packages/noticebar/noticebar.js.map +1 -1
  116. package/dist/packages/notify/notify.css +2 -2
  117. package/dist/packages/notify/notify.js +2 -2
  118. package/dist/packages/notify/notify.js.map +1 -1
  119. package/dist/packages/numberkeyboard/numberkeyboard.css +2 -2
  120. package/dist/packages/numberkeyboard/numberkeyboard.js +2 -2
  121. package/dist/packages/numberkeyboard/numberkeyboard.js.map +1 -1
  122. package/dist/packages/picker/picker-slot.vue +63 -31
  123. package/dist/packages/picker/picker.css +1 -1
  124. package/dist/packages/picker/picker.js +2 -2
  125. package/dist/packages/picker/picker.js.map +1 -1
  126. package/dist/packages/picker/picker.vue +23 -13
  127. package/dist/packages/popup/popup.css +2 -2
  128. package/dist/packages/popup/popup.js +2 -2
  129. package/dist/packages/popup/popup.js.map +1 -1
  130. package/dist/packages/price/price.css +1 -1
  131. package/dist/packages/price/price.js +2 -2
  132. package/dist/packages/price/price.js.map +1 -1
  133. package/dist/packages/progress/progress.css +2 -2
  134. package/dist/packages/progress/progress.js +2 -2
  135. package/dist/packages/progress/progress.js.map +1 -1
  136. package/dist/packages/radio/radio.css +2 -2
  137. package/dist/packages/radio/radio.js +2 -2
  138. package/dist/packages/radio/radio.js.map +1 -1
  139. package/dist/packages/radiogroup/radiogroup.css +1 -1
  140. package/dist/packages/radiogroup/radiogroup.js +2 -2
  141. package/dist/packages/radiogroup/radiogroup.js.map +1 -1
  142. package/dist/packages/range/range.css +2 -2
  143. package/dist/packages/range/range.js +2 -2
  144. package/dist/packages/range/range.js.map +1 -1
  145. package/dist/packages/rate/rate.css +1 -1
  146. package/dist/packages/rate/rate.js +2 -2
  147. package/dist/packages/rate/rate.js.map +1 -1
  148. package/dist/packages/row/row.css +1 -1
  149. package/dist/packages/row/row.js +2 -2
  150. package/dist/packages/row/row.js.map +1 -1
  151. package/dist/packages/scroller/scroller.css +1 -1
  152. package/dist/packages/scroller/scroller.js +2 -2
  153. package/dist/packages/scroller/scroller.js.map +1 -1
  154. package/dist/packages/searchbar/searchbar.css +2 -2
  155. package/dist/packages/searchbar/searchbar.js +2 -2
  156. package/dist/packages/searchbar/searchbar.js.map +1 -1
  157. package/dist/packages/shortpassword/shortpassword.css +2 -2
  158. package/dist/packages/shortpassword/shortpassword.js +2 -2
  159. package/dist/packages/shortpassword/shortpassword.js.map +1 -1
  160. package/dist/packages/sidenavbar/sidenavbar.css +1 -1
  161. package/dist/packages/sidenavbar/sidenavbar.js +2 -2
  162. package/dist/packages/sidenavbar/sidenavbar.js.map +1 -1
  163. package/dist/packages/sidenavbaritem/sidenavbaritem.css +1 -1
  164. package/dist/packages/sidenavbaritem/sidenavbaritem.js +2 -2
  165. package/dist/packages/sidenavbaritem/sidenavbaritem.js.map +1 -1
  166. package/dist/packages/signature/signature.css +2 -2
  167. package/dist/packages/signature/signature.js +2 -2
  168. package/dist/packages/signature/signature.js.map +1 -1
  169. package/dist/packages/skeleton/skeleton.css +2 -2
  170. package/dist/packages/skeleton/skeleton.js +2 -2
  171. package/dist/packages/skeleton/skeleton.js.map +1 -1
  172. package/dist/packages/slider/slider.css +2 -2
  173. package/dist/packages/slider/slider.js +2 -2
  174. package/dist/packages/slider/slider.js.map +1 -1
  175. package/dist/packages/stepper/stepper.css +2 -2
  176. package/dist/packages/stepper/stepper.js +2 -2
  177. package/dist/packages/stepper/stepper.js.map +1 -1
  178. package/dist/packages/steps/steps.css +2 -2
  179. package/dist/packages/steps/steps.js +2 -2
  180. package/dist/packages/steps/steps.js.map +1 -1
  181. package/dist/packages/subsidenavbar/subsidenavbar.css +1 -1
  182. package/dist/packages/subsidenavbar/subsidenavbar.js +2 -2
  183. package/dist/packages/subsidenavbar/subsidenavbar.js.map +1 -1
  184. package/dist/packages/swiper/swiper.css +2 -2
  185. package/dist/packages/swiper/swiper.js +2 -2
  186. package/dist/packages/swiper/swiper.js.map +1 -1
  187. package/dist/packages/switch/switch.css +2 -2
  188. package/dist/packages/switch/switch.js +2 -2
  189. package/dist/packages/switch/switch.js.map +1 -1
  190. package/dist/packages/tab/tab.css +2 -2
  191. package/dist/packages/tab/tab.js +2 -2
  192. package/dist/packages/tab/tab.js.map +1 -1
  193. package/dist/packages/tabbar/tabbar.css +2 -2
  194. package/dist/packages/tabbar/tabbar.js +2 -2
  195. package/dist/packages/tabbar/tabbar.js.map +1 -1
  196. package/dist/packages/tabpanel/tabpanel.css +1 -1
  197. package/dist/packages/tabpanel/tabpanel.js +2 -2
  198. package/dist/packages/tabpanel/tabpanel.js.map +1 -1
  199. package/dist/packages/tabselect/tabselect.css +2 -2
  200. package/dist/packages/tabselect/tabselect.js +2 -2
  201. package/dist/packages/tabselect/tabselect.js.map +1 -1
  202. package/dist/packages/textbox/textbox.css +1 -1
  203. package/dist/packages/textbox/textbox.js +2 -2
  204. package/dist/packages/textbox/textbox.js.map +1 -1
  205. package/dist/packages/textinput/textinput.css +2 -2
  206. package/dist/packages/textinput/textinput.js +2 -2
  207. package/dist/packages/textinput/textinput.js.map +1 -1
  208. package/dist/packages/timeline/timeline.css +2 -2
  209. package/dist/packages/timeline/timeline.js +2 -2
  210. package/dist/packages/timeline/timeline.js.map +1 -1
  211. package/dist/packages/timelineitem/timelineitem.css +1 -1
  212. package/dist/packages/timelineitem/timelineitem.js +2 -2
  213. package/dist/packages/timelineitem/timelineitem.js.map +1 -1
  214. package/dist/packages/toast/toast.css +2 -2
  215. package/dist/packages/toast/toast.js +2 -2
  216. package/dist/packages/toast/toast.js.map +1 -1
  217. package/dist/packages/uploader/uploader.css +1 -1
  218. package/dist/packages/uploader/uploader.js +2 -2
  219. package/dist/packages/uploader/uploader.js.map +1 -1
  220. package/dist/packages/video/video.css +2 -2
  221. package/dist/packages/video/video.js +2 -2
  222. package/dist/packages/video/video.js.map +1 -1
  223. package/package.json +1 -1
  224. package/dist/.DS_Store +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://[name]/webpack/universalModuleDefinition","webpack://[name]/webpack/bootstrap","webpack://[name]/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://[name]/./src/packages/infiniteloading/infiniteloading.vue?e064","webpack://[name]/./src/packages/infiniteloading/infiniteloading.vue?4076","webpack://[name]/src/packages/infiniteloading/infiniteloading.vue","webpack://[name]/./src/packages/infiniteloading/infiniteloading.vue","webpack://[name]/./src/packages/infiniteloading/index.js"],"names":["root","factory","exports","module","define","amd","self","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","normalizeComponent","scriptExports","render","staticRenderFns","functionalTemplate","injectStyles","scopeId","moduleIdentifier","shadowMode","hook","options","_compiled","functional","_scopeId","context","$vnode","ssrContext","parent","__VUE_SSR_CONTEXT__","_registeredComponents","add","_ssrRegister","$root","$options","shadowRoot","_injectStyles","originalRender","h","existing","beforeCreate","concat","props","hasMore","type","Boolean","default","isLoading","threshold","Number","useWindow","useCapture","isShowMod","isShowBottomTips","unloadMoreTxt","String","loadingTxt","scrollChange","Function","containerId","data","startX","startY","diffX","diffY","beforeScrollTop","slotUnloadMore","slotLoading","mounted","scrollEl","parentElement","scrollListener","$slots","unloadMore","loading","methods","touchStartHandle","e","changedTouches","pageX","pageY","console","log","message","touchMoveHandle","endX","endY","getParentElement","document","querySelector","el","parentNode","addEventListener","handleScroll","window","requestAniFrame","calculateTopPosition","offsetTop","offsetParent","getWindowScrollTop","undefined","pageYOffset","isScrollAtBottom","offsetDistance","$refs","scroller","offsetHeight","windowScrollTop","innerHeight","scrollHeight","clientHeight","scrollTop","resScrollTop","$emit","activated","keepAlive","deactivated","removeEventListener","destroyed","_vm","_h","$createElement","_c","_self","ref","staticClass","on","$event","_t","_v","_s","_e","InfiniteLoading","install","Vue","component"],"m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ActH,KAAK4E,aAG/DmE,UAzKF,WA0KI/I,KAAK8F,SAASgD,oBAAoB,SAAU9I,KAAKsH,aAActH,KAAK4E,YACpE2C,OAAOuB,oBAAoB,SAAU9I,KAAKsH,aAActH,KAAK4E,c,OC5KlD,EAXC,YACd,GHRW,WAAa,IAAIoE,EAAIhJ,KAASiJ,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,IAAI,WAAWC,YAAY,sBAAsBC,GAAG,CAAC,WAAa,SAASC,GAAQ,OAAOR,EAAI3C,iBAAiBmD,IAAS,UAAY,SAASA,GAAQ,OAAOR,EAAInC,gBAAgB2C,MAAW,CAACR,EAAIS,GAAG,WAAWT,EAAIU,GAAG,KAAKP,EAAG,MAAM,CAACG,YAAY,aAAa,CAAEN,EAAoB,iBAAEG,EAAG,MAAM,CAACG,YAAY,eAAe,CAAEN,EAAa,UAAE,CAAGA,EAAIpD,YAA4HoD,EAAIS,GAAG,WAAtH,CAACN,EAAG,IAAI,CAACG,YAAY,iBAAiBH,EAAG,OAAO,CAACG,YAAY,eAAe,CAACN,EAAIU,GAAGV,EAAIW,GAAGX,EAAI/D,iBAAqC+D,EAAI5E,QAA8H4E,EAAIY,KAAzH,CAAGZ,EAAIrD,eAAwFqD,EAAIS,GAAG,cAA/EN,EAAG,OAAO,CAACG,YAAY,YAAY,CAACN,EAAIU,GAAGV,EAAIW,GAAGX,EAAIjE,oBAAkD,GAAGiE,EAAIY,QAAQ,KACltB,IGUpB,EACA,KACA,KACA,M,eCXFC,EAAgBC,QAAU,SAASC,GACjCA,EAAIC,UAAUH,EAAgBlJ,KAAMkJ,IAGvBA","file":"infiniteloading/infiniteloading.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"infiniteloading\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"infiniteloading\"] = factory();\n\telse\n\t\troot[\"infiniteloading\"] = factory();\n})((typeof self !== 'undefined' ? self : this), function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 191);\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:\"scroller\",staticClass:\"nut-infiniteloading\",on:{\"touchstart\":function($event){return _vm.touchStartHandle($event)},\"touchmove\":function($event){return _vm.touchMoveHandle($event)}}},[_vm._t(\"default\"),_vm._v(\" \"),_c('div',{staticClass:\"load-more\"},[(_vm.isShowBottomTips)?_c('div',{staticClass:\"bottom-tips\"},[(_vm.isLoading)?[(!_vm.slotLoading)?[_c('i',{staticClass:\"loading-hint\"}),_c('span',{staticClass:\"loading-txt\"},[_vm._v(_vm._s(_vm.loadingTxt))])]:_vm._t(\"loading\")]:(!_vm.hasMore)?[(!_vm.slotUnloadMore)?_c('span',{staticClass:\"tips-txt\"},[_vm._v(_vm._s(_vm.unloadMoreTxt))]):_vm._t(\"unloadMore\")]:_vm._e()],2):_vm._e()])],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./infiniteloading.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./infiniteloading.vue?vue&type=script&lang=js&\"","<template>\n <div class=\"nut-infiniteloading\" ref=\"scroller\" @touchstart=\"touchStartHandle($event)\" @touchmove=\"touchMoveHandle($event)\">\n <slot></slot>\n <div class=\"load-more\">\n <div class=\"bottom-tips\" v-if=\"isShowBottomTips\">\n <template v-if=\"isLoading\">\n <template v-if=\"!slotLoading\"> <i class=\"loading-hint\"></i><span class=\"loading-txt\">{{loadingTxt}}</span> </template>\n <slot name=\"loading\" v-else></slot>\n </template>\n\n <template v-else-if=\"!hasMore\">\n <span class=\"tips-txt\" v-if=\"!slotUnloadMore\">{{ unloadMoreTxt }}</span>\n <slot name=\"unloadMore\" v-else></slot>\n </template>\n </div>\n </div>\n </div>\n</template>\n<script>\nexport default {\n name: 'nut-infiniteloading',\n props: {\n hasMore: {\n type: Boolean,\n default: true\n },\n isLoading: {\n type: Boolean,\n default: false\n },\n threshold: {\n type: Number,\n default: 200\n },\n useWindow: {\n type: Boolean,\n default: true\n },\n useCapture: {\n type: Boolean,\n default: false\n },\n isShowMod: {\n type: Boolean,\n default: false\n },\n isShowBottomTips: {\n type: Boolean,\n default: true\n },\n unloadMoreTxt: {\n type: String,\n default: '哎呀,这里是底部了啦'\n },\n loadingTxt: {\n type: String,\n default: '加载中...'\n },\n scrollChange: {\n type: Function\n },\n containerId: {\n type: String,\n default: ''\n }\n },\n data() {\n return {\n startX: 0,\n startY: 0,\n diffX: 0,\n diffY: 0,\n beforeScrollTop: 0,\n slotUnloadMore: false,\n slotLoading: false\n };\n },\n\n mounted: function() {\n const parentElement = this.getParentElement(this.$el);\n let scrollEl = window;\n if (this.useWindow === false) {\n scrollEl = parentElement;\n }\n this.scrollEl = scrollEl;\n this.scrollListener();\n\n this.slotUnloadMore = this.$slots.unloadMore ? true : false;\n this.slotLoading = this.$slots.loading ? true : false;\n },\n\n methods: {\n touchStartHandle(e) {\n try {\n this.startX = Number(e.changedTouches[0].pageX);\n this.startY = Number(e.changedTouches[0].pageY);\n } catch (e) {\n console.log(e.message);\n }\n },\n touchMoveHandle(e) {\n let endX = Number(e.changedTouches[0].pageX);\n let endY = Number(e.changedTouches[0].pageY);\n this.diffX = endX - this.startX;\n this.diffY = endY - this.startY;\n },\n getParentElement(el) {\n if (this.containerId) {\n return document.querySelector(`#${this.containerId}`);\n }\n return el && el.parentNode;\n },\n scrollListener() {\n this.scrollEl.addEventListener('scroll', this.handleScroll, this.useCapture);\n window.addEventListener('resize', this.handleScroll, this.useCapture);\n },\n\n requestAniFrame() {\n return (\n window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n function(callback) {\n window.setTimeout(callback, 1000 / 60);\n }\n );\n },\n\n handleScroll() {\n this.requestAniFrame()(() => {\n if (!this.isScrollAtBottom() || !this.hasMore || this.isLoading || !this.isShowMod) {\n return false;\n } else {\n this.$emit('loadmore');\n }\n });\n },\n\n calculateTopPosition(el) {\n if (!el) {\n return 0;\n }\n return el.offsetTop + this.calculateTopPosition(el.offsetParent);\n },\n\n getWindowScrollTop() {\n return window.pageYOffset !== undefined\n ? window.pageYOffset\n : (document.documentElement || document.body.parentNode || document.body).scrollTop;\n },\n\n isScrollAtBottom() {\n let offsetDistance;\n\n let resScrollTop = 0;\n\n const windowScrollTop = this.getWindowScrollTop();\n\n if (this.useWindow) {\n offsetDistance = this.calculateTopPosition(this.$refs.scroller) + this.$refs.scroller.offsetHeight - windowScrollTop - window.innerHeight;\n } else {\n const { scrollHeight, clientHeight, scrollTop } = this.scrollEl;\n\n offsetDistance = scrollHeight - clientHeight - scrollTop;\n resScrollTop = scrollTop;\n }\n this.$emit('scrollChange', this.useWindow ? windowScrollTop : resScrollTop);\n // 保证是往下滑动的\n let beforeScrollTop = this.beforeScrollTop;\n this.beforeScrollTop = windowScrollTop;\n\n return offsetDistance <= this.threshold && windowScrollTop >= this.beforeScrollTop;\n }\n },\n\n activated() {\n if (this.keepAlive) {\n this.keepAlive = false;\n this.scrollListener();\n }\n },\n\n deactivated() {\n this.keepAlive = true;\n this.scrollEl.removeEventListener('scroll', this.handleScroll, this.useCapture);\n window.removeEventListener('resize', this.handleScroll, this.useCapture);\n },\n\n destroyed() {\n this.scrollEl.removeEventListener('scroll', this.handleScroll, this.useCapture);\n window.removeEventListener('resize', this.handleScroll, this.useCapture);\n }\n};\n</script>\n","import { render, staticRenderFns } from \"./infiniteloading.vue?vue&type=template&id=48fb25f8&\"\nimport script from \"./infiniteloading.vue?vue&type=script&lang=js&\"\nexport * from \"./infiniteloading.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import InfiniteLoading from './infiniteloading.vue';\nimport './infiniteloading.scss';\n\nInfiniteLoading.install = function(Vue) {\n Vue.component(InfiniteLoading.name, InfiniteLoading);\n};\n\nexport default InfiniteLoading;\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://[name]/webpack/universalModuleDefinition","webpack://[name]/webpack/bootstrap","webpack://[name]/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://[name]/./src/packages/infiniteloading/infiniteloading.vue?5e38","webpack://[name]/./src/packages/infiniteloading/infiniteloading.vue?4076","webpack://[name]/src/packages/infiniteloading/infiniteloading.vue","webpack://[name]/./src/packages/infiniteloading/infiniteloading.vue","webpack://[name]/./src/packages/infiniteloading/index.js"],"names":["root","factory","exports","module","define","amd","self","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","normalizeComponent","scriptExports","render","staticRenderFns","functionalTemplate","injectStyles","scopeId","moduleIdentifier","shadowMode","hook","options","_compiled","functional","_scopeId","context","$vnode","ssrContext","parent","__VUE_SSR_CONTEXT__","_registeredComponents","add","_ssrRegister","$root","$options","shadowRoot","_injectStyles","originalRender","h","existing","beforeCreate","concat","props","hasMore","type","default","isLoading","threshold","useWindow","useCapture","isShowMod","isShowBottomTips","unloadMoreTxt","loadingTxt","scrollChange","containerId","data","startX","startY","diffX","diffY","beforeScrollTop","slotUnloadMore","slotLoading","mounted","scrollEl","methods","touchStartHandle","console","touchMoveHandle","getParentElement","scrollListener","window","requestAniFrame","handleScroll","calculateTopPosition","getWindowScrollTop","isScrollAtBottom","offsetDistance","scrollHeight","clientHeight","scrollTop","resScrollTop","activated","deactivated","destroyed","_vm","_c","_self","ref","staticClass","on","$event","_t","_v","_s","_e","InfiniteLoading","install","Vue","component"],"mappings":";;;;;CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,kBAAmB,GAAIH,GACJ,iBAAZC,QACdA,QAAyB,gBAAID,IAE7BD,EAAsB,gBAAIC,IAR5B,CASoB,oBAATK,KAAuBA,KAAOC,MAAO,WAChD,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUR,QAGnC,IAAIC,EAASK,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHV,QAAS,IAUV,OANAW,EAAQH,GAAUI,KAAKX,EAAOD,QAASC,EAAQA,EAAOD,QAASO,GAG/DN,EAAOS,GAAI,EAGJT,EAAOD,QA0Df,OArDAO,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASf,EAASgB,EAAMC,GAC3CV,EAAoBW,EAAElB,EAASgB,IAClCG,OAAOC,eAAepB,EAASgB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,EAAoBgB,EAAI,SAASvB,GACX,oB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YACAA,8BAKAE,wBAAA,WACA,mCACA,gEACA,SAEA,wBAKAC,iCACA,SAGA,sDAFA,GAKAC,8BACA,mCACAJ,oBACA,8EAGAK,4BACA,MAEA,IAEA,4BAEA,kBACAC,2GACA,CACA,oBAAAC,iBAAAC,iBAAAC,cAEAH,QACAI,IAEA,8CAEA,qBAGA,OAFA,uBAEA,6CAIAC,qBACA,iBACA,kBACA,wBAIAC,uBACA,kBACA,8EACAZ,wEAGAa,qBACA,8EACAb,yE,OC5Ke,EAXC,YACd,GHRW,WAAkB,IAAIc,EAAI/G,KAAKgH,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,IAAI,WAAWC,YAAY,sBAAsBC,GAAG,CAAC,WAAa,SAASC,GAAQ,OAAON,EAAInB,iBAAiByB,IAAS,UAAY,SAASA,GAAQ,OAAON,EAAIjB,gBAAgBuB,MAAW,CAACN,EAAIO,GAAG,WAAWP,EAAIQ,GAAG,KAAKP,EAAG,MAAM,CAACG,YAAY,aAAa,CAAEJ,EAAoB,iBAAEC,EAAG,MAAM,CAACG,YAAY,eAAe,CAAEJ,EAAa,UAAE,CAAGA,EAAIvB,YAA4HuB,EAAIO,GAAG,WAAtH,CAACN,EAAG,IAAI,CAACG,YAAY,iBAAiBH,EAAG,OAAO,CAACG,YAAY,eAAe,CAACJ,EAAIQ,GAAGR,EAAIS,GAAGT,EAAIjC,iBAAqCiC,EAAI3C,QAA8H2C,EAAIU,KAAzH,CAAGV,EAAIxB,eAAwFwB,EAAIO,GAAG,cAA/EN,EAAG,OAAO,CAACG,YAAY,YAAY,CAACJ,EAAIQ,GAAGR,EAAIS,GAAGT,EAAIlC,oBAAkD,GAAGkC,EAAIU,QAAQ,KAErrB,IGSpB,EACA,KACA,KACA,M,eCXFC,EAAgBC,QAAU,SAASC,GACjCA,EAAIC,UAAUH,EAAgB/G,KAAM+G,IAGvBA","file":"infiniteloading/infiniteloading.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"infiniteloading\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"infiniteloading\"] = factory();\n\telse\n\t\troot[\"infiniteloading\"] = factory();\n})((typeof self !== 'undefined' ? self : this), function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 191);\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent(\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier /* server only */,\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options =\n typeof scriptExports === 'function' ? scriptExports.options : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) {\n // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection(h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{ref:\"scroller\",staticClass:\"nut-infiniteloading\",on:{\"touchstart\":function($event){return _vm.touchStartHandle($event)},\"touchmove\":function($event){return _vm.touchMoveHandle($event)}}},[_vm._t(\"default\"),_vm._v(\" \"),_c('div',{staticClass:\"load-more\"},[(_vm.isShowBottomTips)?_c('div',{staticClass:\"bottom-tips\"},[(_vm.isLoading)?[(!_vm.slotLoading)?[_c('i',{staticClass:\"loading-hint\"}),_c('span',{staticClass:\"loading-txt\"},[_vm._v(_vm._s(_vm.loadingTxt))])]:_vm._t(\"loading\")]:(!_vm.hasMore)?[(!_vm.slotUnloadMore)?_c('span',{staticClass:\"tips-txt\"},[_vm._v(_vm._s(_vm.unloadMoreTxt))]):_vm._t(\"unloadMore\")]:_vm._e()],2):_vm._e()])],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./infiniteloading.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./infiniteloading.vue?vue&type=script&lang=js&\"","<template>\n <div class=\"nut-infiniteloading\" ref=\"scroller\" @touchstart=\"touchStartHandle($event)\" @touchmove=\"touchMoveHandle($event)\">\n <slot></slot>\n <div class=\"load-more\">\n <div class=\"bottom-tips\" v-if=\"isShowBottomTips\">\n <template v-if=\"isLoading\">\n <template v-if=\"!slotLoading\"> <i class=\"loading-hint\"></i><span class=\"loading-txt\">{{loadingTxt}}</span> </template>\n <slot name=\"loading\" v-else></slot>\n </template>\n\n <template v-else-if=\"!hasMore\">\n <span class=\"tips-txt\" v-if=\"!slotUnloadMore\">{{ unloadMoreTxt }}</span>\n <slot name=\"unloadMore\" v-else></slot>\n </template>\n </div>\n </div>\n </div>\n</template>\n<script>\nexport default {\n name: 'nut-infiniteloading',\n props: {\n hasMore: {\n type: Boolean,\n default: true\n },\n isLoading: {\n type: Boolean,\n default: false\n },\n threshold: {\n type: Number,\n default: 200\n },\n useWindow: {\n type: Boolean,\n default: true\n },\n useCapture: {\n type: Boolean,\n default: false\n },\n isShowMod: {\n type: Boolean,\n default: false\n },\n isShowBottomTips: {\n type: Boolean,\n default: true\n },\n unloadMoreTxt: {\n type: String,\n default: '哎呀,这里是底部了啦'\n },\n loadingTxt: {\n type: String,\n default: '加载中...'\n },\n scrollChange: {\n type: Function\n },\n containerId: {\n type: String,\n default: ''\n }\n },\n data() {\n return {\n startX: 0,\n startY: 0,\n diffX: 0,\n diffY: 0,\n beforeScrollTop: 0,\n slotUnloadMore: false,\n slotLoading: false\n };\n },\n\n mounted: function() {\n const parentElement = this.getParentElement(this.$el);\n let scrollEl = window;\n if (this.useWindow === false) {\n scrollEl = parentElement;\n }\n this.scrollEl = scrollEl;\n this.scrollListener();\n\n this.slotUnloadMore = this.$slots.unloadMore ? true : false;\n this.slotLoading = this.$slots.loading ? true : false;\n },\n\n methods: {\n touchStartHandle(e) {\n try {\n this.startX = Number(e.changedTouches[0].pageX);\n this.startY = Number(e.changedTouches[0].pageY);\n } catch (e) {\n console.log(e.message);\n }\n },\n touchMoveHandle(e) {\n let endX = Number(e.changedTouches[0].pageX);\n let endY = Number(e.changedTouches[0].pageY);\n this.diffX = endX - this.startX;\n this.diffY = endY - this.startY;\n },\n getParentElement(el) {\n if (this.containerId) {\n return document.querySelector(`#${this.containerId}`);\n }\n return el && el.parentNode;\n },\n scrollListener() {\n this.scrollEl.addEventListener('scroll', this.handleScroll, this.useCapture);\n window.addEventListener('resize', this.handleScroll, this.useCapture);\n },\n\n requestAniFrame() {\n return (\n window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n function(callback) {\n window.setTimeout(callback, 1000 / 60);\n }\n );\n },\n\n handleScroll() {\n this.requestAniFrame()(() => {\n if (!this.isScrollAtBottom() || !this.hasMore || this.isLoading || !this.isShowMod) {\n return false;\n } else {\n this.$emit('loadmore');\n }\n });\n },\n\n calculateTopPosition(el) {\n if (!el) {\n return 0;\n }\n return el.offsetTop + this.calculateTopPosition(el.offsetParent);\n },\n\n getWindowScrollTop() {\n return window.pageYOffset !== undefined\n ? window.pageYOffset\n : (document.documentElement || document.body.parentNode || document.body).scrollTop;\n },\n\n isScrollAtBottom() {\n let offsetDistance;\n\n let resScrollTop = 0;\n\n const windowScrollTop = this.getWindowScrollTop();\n\n if (this.useWindow) {\n offsetDistance = this.calculateTopPosition(this.$refs.scroller) + this.$refs.scroller.offsetHeight - windowScrollTop - window.innerHeight;\n } else {\n const { scrollHeight, clientHeight, scrollTop } = this.scrollEl;\n\n offsetDistance = scrollHeight - clientHeight - scrollTop;\n resScrollTop = scrollTop;\n }\n this.$emit('scrollChange', this.useWindow ? windowScrollTop : resScrollTop);\n // 保证是往下滑动的\n let beforeScrollTop = this.beforeScrollTop;\n this.beforeScrollTop = windowScrollTop;\n\n return offsetDistance <= this.threshold && windowScrollTop >= this.beforeScrollTop;\n }\n },\n\n activated() {\n if (this.keepAlive) {\n this.keepAlive = false;\n this.scrollListener();\n }\n },\n\n deactivated() {\n this.keepAlive = true;\n this.scrollEl.removeEventListener('scroll', this.handleScroll, this.useCapture);\n window.removeEventListener('resize', this.handleScroll, this.useCapture);\n },\n\n destroyed() {\n this.scrollEl.removeEventListener('scroll', this.handleScroll, this.useCapture);\n window.removeEventListener('resize', this.handleScroll, this.useCapture);\n }\n};\n</script>\n","import { render, staticRenderFns } from \"./infiniteloading.vue?vue&type=template&id=48fb25f8&\"\nimport script from \"./infiniteloading.vue?vue&type=script&lang=js&\"\nexport * from \"./infiniteloading.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import InfiniteLoading from './infiniteloading.vue';\nimport './infiniteloading.scss';\n\nInfiniteLoading.install = function(Vue) {\n Vue.component(InfiniteLoading.name, InfiniteLoading);\n};\n\nexport default InfiniteLoading;\n"],"sourceRoot":""}
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v2.3.10 - lazyload.css, 3102a4d590d4b4771a82, Mon Jun 13 2022 17:25:28 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v2.3.12 - lazyload.css, 4e7bf58d46c32d8aa0dc, Mon Oct 24 2022 16:30:36 GMT+0800 (中国标准时间)
3
3
  * (c) 2017-2020 JDC
4
4
  * Released under the MIT License.
5
5
  */.lazyloadDemo>div,.lazyloadDemo img{width:100%;background-color:#ddd}.lazyloadDemo>div{height:220px;overflow:hidden;background-size:100% 100%}
@@ -1,13 +1,19 @@
1
1
  /*!
2
- * @nutui/nutui v2.3.10 - lazyload.js, 3102a4d590d4b4771a82, Mon Jun 13 2022 17:25:28 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v2.3.12 - lazyload.js, 4e7bf58d46c32d8aa0dc, Mon Oct 24 2022 16:30:36 GMT+0800 (中国标准时间)
3
3
  * (c) 2017-2020 JDC
4
4
  * Released under the MIT License.
5
5
  */
6
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("lazyload",[],t):"object"==typeof exports?exports.lazyload=t():e.lazyload=t()}("undefined"!=typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="./",n(n.s=214)}({127:function(e,t,n){},214:function(e,t,n){"use strict";n.r(t);
6
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("lazyload",[],e):"object"==typeof exports?exports.lazyload=e():t.lazyload=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="./",r(r.s=214)}({127:function(t,e,r){},214:function(t,e,r){"use strict";r.r(e);
7
7
  /*!
8
- * Vue-Lazyload.js v1.3.3
9
- * (c) 2019 Awe <hilongjw@gmail.com>
8
+ * Vue-Lazyload.js v1.3.4
9
+ * (c) 2021 Awe <hilongjw@gmail.com>
10
10
  * Released under the MIT License.
11
11
  */
12
- var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},o=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e){return null==e||"function"!=typeof e&&"object"!==(void 0===e?"undefined":r(e))},s=Object.prototype.toString,u=function(e){var t=void 0===e?"undefined":r(e);return"undefined"===t?"undefined":null===e?"null":!0===e||!1===e||e instanceof Boolean?"boolean":"string"===t||e instanceof String?"string":"number"===t||e instanceof Number?"number":"function"===t||e instanceof Function?void 0!==e.constructor.name&&"Generator"===e.constructor.name.slice(0,9)?"generatorfunction":"function":void 0!==Array.isArray&&Array.isArray(e)?"array":e instanceof RegExp?"regexp":e instanceof Date?"date":"[object RegExp]"===(t=s.call(e))?"regexp":"[object Date]"===t?"date":"[object Arguments]"===t?"arguments":"[object Error]"===t?"error":"[object Promise]"===t?"promise":function(e){return e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}(e)?"buffer":"[object Set]"===t?"set":"[object WeakSet]"===t?"weakset":"[object Map]"===t?"map":"[object WeakMap]"===t?"weakmap":"[object Symbol]"===t?"symbol":"[object Map Iterator]"===t?"mapiterator":"[object Set Iterator]"===t?"setiterator":"[object String Iterator]"===t?"stringiterator":"[object Array Iterator]"===t?"arrayiterator":"[object Int8Array]"===t?"int8array":"[object Uint8Array]"===t?"uint8array":"[object Uint8ClampedArray]"===t?"uint8clampedarray":"[object Int16Array]"===t?"int16array":"[object Uint16Array]"===t?"uint16array":"[object Int32Array]"===t?"int32array":"[object Uint32Array]"===t?"uint32array":"[object Float32Array]"===t?"float32array":"[object Float64Array]"===t?"float64array":"object"};function l(e){e=e||{};var t=arguments.length,n=0;if(1===t)return e;for(;++n<t;){var r=arguments[n];a(e)&&(e=r),c(r)&&d(e,r)}return e}function d(e,t){for(var n in function(e,t){if(null==e)throw new TypeError("expected first argument to be an object.");if(void 0===t||"undefined"==typeof Symbol)return e;if("function"!=typeof Object.getOwnPropertySymbols)return e;for(var n=Object.prototype.propertyIsEnumerable,r=Object(e),i=arguments.length,o=0;++o<i;)for(var a=Object(arguments[o]),s=Object.getOwnPropertySymbols(a),u=0;u<s.length;u++){var l=s[u];n.call(a,l)&&(r[l]=a[l])}}(e,t),t)if("__proto__"!==n&&h(t,n)){var r=t[n];c(r)?("undefined"===u(e[n])&&"function"===u(r)&&(e[n]=r),e[n]=l(e[n]||{},r)):e[n]=r}return e}function c(e){return"object"===u(e)||"function"===u(e)}function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var f=l,p="undefined"!=typeof window,v=function(){if(p&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)return"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}}),!0;return!1}();var y="event",b="observer",g=function(){if(p)return"function"==typeof window.CustomEvent?window.CustomEvent:(e.prototype=window.Event.prototype,e);function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}}();function m(e,t){if(e.length){var n=e.indexOf(t);return n>-1?e.splice(n,1):void 0}}function w(e,t){if("IMG"===e.tagName&&e.getAttribute("data-srcset")){var n=e.getAttribute("data-srcset"),r=[],i=e.parentNode.offsetWidth*t,o=void 0,a=void 0,s=void 0;(n=n.trim().split(",")).map((function(e){e=e.trim(),-1===(o=e.lastIndexOf(" "))?(a=e,s=999998):(a=e.substr(0,o),s=parseInt(e.substr(o+1,e.length-o-2),10)),r.push([s,a])})),r.sort((function(e,t){if(e[0]<t[0])return 1;if(e[0]>t[0])return-1;if(e[0]===t[0]){if(-1!==t[1].indexOf(".webp",t[1].length-5))return 1;if(-1!==e[1].indexOf(".webp",e[1].length-5))return-1}return 0}));for(var u="",l=void 0,d=0;d<r.length;d++){u=(l=r[d])[1];var c=r[d+1];if(c&&c[0]<i){u=l[1];break}if(!c){u=l[1];break}}return u}}function L(e,t){for(var n=void 0,r=0,i=e.length;r<i;r++)if(t(e[r])){n=e[r];break}return n}var _=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return p&&window.devicePixelRatio||e};function E(){if(!p)return!1;var e=!0,t=document;try{var n=t.createElement("object");n.type="image/webp",n.style.visibility="hidden",n.innerHTML="!",t.body.appendChild(n),e=!n.offsetWidth,t.body.removeChild(n)}catch(t){e=!1}return e}var k=function(){if(p){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch(e){}return e}}(),j={on:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];k?e.addEventListener(t,n,{capture:r,passive:!0}):e.addEventListener(t,n,r)},off:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.removeEventListener(t,n,r)}},A=function(e,t,n){var r=new Image;if(!e||!e.src){var i=new Error("image src is required");return n(i)}r.src=e.src,r.onload=function(){t({naturalHeight:r.naturalHeight,naturalWidth:r.naturalWidth,src:r.src})},r.onerror=function(e){n(e)}},z=function(e,t){return"undefined"!=typeof getComputedStyle?getComputedStyle(e,null).getPropertyValue(t):e.style[t]},O=function(e){return z(e,"overflow")+z(e,"overflow-y")+z(e,"overflow-x")};function x(){}var T=function(){function e(t){var n=t.max;i(this,e),this.options={max:n||100},this._caches=[]}return o(e,[{key:"has",value:function(e){return this._caches.indexOf(e)>-1}},{key:"add",value:function(e){this.has(e)||(this._caches.push(e),this._caches.length>this.options.max&&this.free())}},{key:"free",value:function(){this._caches.shift()}}]),e}(),S=function(){function e(t){var n=t.el,r=t.src,o=t.error,a=t.loading,s=t.bindType,u=t.$parent,l=t.options,d=t.elRenderer,c=t.imageCache;i(this,e),this.el=n,this.src=r,this.error=o,this.loading=a,this.bindType=s,this.attempt=0,this.naturalHeight=0,this.naturalWidth=0,this.options=l,this.rect=null,this.$parent=u,this.elRenderer=d,this._imageCache=c,this.performanceData={init:Date.now(),loadStart:0,loadEnd:0},this.filter(),this.initState(),this.render("loading",!1)}return o(e,[{key:"initState",value:function(){"dataset"in this.el?this.el.dataset.src=this.src:this.el.setAttribute("data-src",this.src),this.state={loading:!1,error:!1,loaded:!1,rendered:!1}}},{key:"record",value:function(e){this.performanceData[e]=Date.now()}},{key:"update",value:function(e){var t=e.src,n=e.loading,r=e.error,i=this.src;this.src=t,this.loading=n,this.error=r,this.filter(),i!==this.src&&(this.attempt=0,this.initState())}},{key:"getRect",value:function(){this.rect=this.el.getBoundingClientRect()}},{key:"checkInView",value:function(){return this.getRect(),this.rect.top<window.innerHeight*this.options.preLoad&&this.rect.bottom>this.options.preLoadTop&&this.rect.left<window.innerWidth*this.options.preLoad&&this.rect.right>0}},{key:"filter",value:function(){var e=this;(function(e){if(!(e instanceof Object))return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t})(this.options.filter).map((function(t){e.options.filter[t](e,e.options)}))}},{key:"renderLoading",value:function(e){var t=this;this.state.loading=!0,A({src:this.loading},(function(n){t.render("loading",!1),t.state.loading=!1,e()}),(function(){e(),t.state.loading=!1,t.options.silent||console.warn("VueLazyload log: load failed with loading image("+t.loading+")")}))}},{key:"load",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x;return this.attempt>this.options.attempt-1&&this.state.error?(this.options.silent||console.log("VueLazyload log: "+this.src+" tried too more than "+this.options.attempt+" times"),void t()):this.state.rendered&&this.state.loaded?void 0:this._imageCache.has(this.src)?(this.state.loaded=!0,this.render("loaded",!0),this.state.rendered=!0,t()):void this.renderLoading((function(){e.attempt++,e.options.adapter.beforeLoad&&e.options.adapter.beforeLoad(e,e.options),e.record("loadStart"),A({src:e.src},(function(n){e.naturalHeight=n.naturalHeight,e.naturalWidth=n.naturalWidth,e.state.loaded=!0,e.state.error=!1,e.record("loadEnd"),e.render("loaded",!1),e.state.rendered=!0,e._imageCache.add(e.src),t()}),(function(t){!e.options.silent&&console.error(t),e.state.error=!0,e.state.loaded=!1,e.render("error",!1)}))}))}},{key:"render",value:function(e,t){this.elRenderer(this,e,t)}},{key:"performance",value:function(){var e="loading",t=0;return this.state.loaded&&(e="loaded",t=(this.performanceData.loadEnd-this.performanceData.loadStart)/1e3),this.state.error&&(e="error"),{src:this.src,state:e,time:t}}},{key:"$destroy",value:function(){this.el=null,this.src=null,this.error=null,this.loading=null,this.bindType=null,this.attempt=0}}]),e}(),I="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",$=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],C={rootMargin:"0px",threshold:0},H=function(e){return function(){function t(e){var n,r,o,a,s=e.preLoad,u=e.error,l=e.throttleWait,d=e.preLoadTop,c=e.dispatchEvent,h=e.loading,f=e.attempt,p=e.silent,v=void 0===p||p,g=e.scale,m=e.listenEvents,w=(e.hasbind,e.filter),L=e.adapter,k=e.observer,j=e.observerOptions;i(this,t),this.version="1.3.3",this.mode=y,this.ListenerQueue=[],this.TargetIndex=0,this.TargetQueue=[],this.options={silent:v,dispatchEvent:!!c,throttleWait:l||200,preLoad:s||1.3,preLoadTop:d||0,error:u||I,loading:h||I,attempt:f||3,scale:g||_(g),ListenEvents:m||$,hasbind:!1,supportWebp:E(),filter:w||{},adapter:L||{},observer:!!k,observerOptions:j||C},this._initEvent(),this._imageCache=new T({max:200}),this.lazyLoadHandler=(n=this._lazyLoadHandler.bind(this),r=this.options.throttleWait,o=null,a=0,function(){if(!o){var e=Date.now()-a,t=this,i=arguments,s=function(){a=Date.now(),o=!1,n.apply(t,i)};e>=r?s():o=setTimeout(s,r)}}),this.setMode(this.options.observer?b:y)}return o(t,[{key:"config",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f(this.options,e)}},{key:"performance",value:function(){var e=[];return this.ListenerQueue.map((function(t){e.push(t.performance())})),e}},{key:"addLazyBox",value:function(e){this.ListenerQueue.push(e),p&&(this._addListenerTarget(window),this._observer&&this._observer.observe(e.el),e.$el&&e.$el.parentNode&&this._addListenerTarget(e.$el.parentNode))}},{key:"add",value:function(t,n,r){var i=this;if(function(e,t){for(var n=!1,r=0,i=e.length;r<i;r++)if(t(e[r])){n=!0;break}return n}(this.ListenerQueue,(function(e){return e.el===t})))return this.update(t,n),e.nextTick(this.lazyLoadHandler);var o=this._valueFormatter(n.value),a=o.src,s=o.loading,u=o.error;e.nextTick((function(){a=w(t,i.options.scale)||a,i._observer&&i._observer.observe(t);var o=Object.keys(n.modifiers)[0],l=void 0;o&&(l=(l=r.context.$refs[o])?l.$el||l:document.getElementById(o)),l||(l=function(e){if(p){if(!(e instanceof HTMLElement))return window;for(var t=e;t&&t!==document.body&&t!==document.documentElement&&t.parentNode;){if(/(scroll|auto)/.test(O(t)))return t;t=t.parentNode}return window}}(t));var d=new S({bindType:n.arg,$parent:l,el:t,loading:s,error:u,src:a,elRenderer:i._elRenderer.bind(i),options:i.options,imageCache:i._imageCache});i.ListenerQueue.push(d),p&&(i._addListenerTarget(window),i._addListenerTarget(l)),i.lazyLoadHandler(),e.nextTick((function(){return i.lazyLoadHandler()}))}))}},{key:"update",value:function(t,n,r){var i=this,o=this._valueFormatter(n.value),a=o.src,s=o.loading,u=o.error;a=w(t,this.options.scale)||a;var l=L(this.ListenerQueue,(function(e){return e.el===t}));l?l.update({src:a,loading:s,error:u}):this.add(t,n,r),this._observer&&(this._observer.unobserve(t),this._observer.observe(t)),this.lazyLoadHandler(),e.nextTick((function(){return i.lazyLoadHandler()}))}},{key:"remove",value:function(e){if(e){this._observer&&this._observer.unobserve(e);var t=L(this.ListenerQueue,(function(t){return t.el===e}));t&&(this._removeListenerTarget(t.$parent),this._removeListenerTarget(window),m(this.ListenerQueue,t),t.$destroy())}}},{key:"removeComponent",value:function(e){e&&(m(this.ListenerQueue,e),this._observer&&this._observer.unobserve(e.el),e.$parent&&e.$el.parentNode&&this._removeListenerTarget(e.$el.parentNode),this._removeListenerTarget(window))}},{key:"setMode",value:function(e){var t=this;v||e!==b||(e=y),this.mode=e,e===y?(this._observer&&(this.ListenerQueue.forEach((function(e){t._observer.unobserve(e.el)})),this._observer=null),this.TargetQueue.forEach((function(e){t._initListen(e.el,!0)}))):(this.TargetQueue.forEach((function(e){t._initListen(e.el,!1)})),this._initIntersectionObserver())}},{key:"_addListenerTarget",value:function(e){if(e){var t=L(this.TargetQueue,(function(t){return t.el===e}));return t?t.childrenCount++:(t={el:e,id:++this.TargetIndex,childrenCount:1,listened:!0},this.mode===y&&this._initListen(t.el,!0),this.TargetQueue.push(t)),this.TargetIndex}}},{key:"_removeListenerTarget",value:function(e){var t=this;this.TargetQueue.forEach((function(n,r){n.el===e&&(n.childrenCount--,n.childrenCount||(t._initListen(n.el,!1),t.TargetQueue.splice(r,1),n=null))}))}},{key:"_initListen",value:function(e,t){var n=this;this.options.ListenEvents.forEach((function(r){return j[t?"on":"off"](e,r,n.lazyLoadHandler)}))}},{key:"_initEvent",value:function(){var e=this;this.Event={listeners:{loading:[],loaded:[],error:[]}},this.$on=function(t,n){e.Event.listeners[t]||(e.Event.listeners[t]=[]),e.Event.listeners[t].push(n)},this.$once=function(t,n){var r=e;e.$on(t,(function e(){r.$off(t,e),n.apply(r,arguments)}))},this.$off=function(t,n){if(n)m(e.Event.listeners[t],n);else{if(!e.Event.listeners[t])return;e.Event.listeners[t].length=0}},this.$emit=function(t,n,r){e.Event.listeners[t]&&e.Event.listeners[t].forEach((function(e){return e(n,r)}))}}},{key:"_lazyLoadHandler",value:function(){var e=this,t=[];this.ListenerQueue.forEach((function(e,n){e.el&&e.el.parentNode||t.push(e),e.checkInView()&&e.load()})),t.forEach((function(t){m(e.ListenerQueue,t),t.$destroy()}))}},{key:"_initIntersectionObserver",value:function(){var e=this;v&&(this._observer=new IntersectionObserver(this._observerHandler.bind(this),this.options.observerOptions),this.ListenerQueue.length&&this.ListenerQueue.forEach((function(t){e._observer.observe(t.el)})))}},{key:"_observerHandler",value:function(e,t){var n=this;e.forEach((function(e){e.isIntersecting&&n.ListenerQueue.forEach((function(t){if(t.el===e.target){if(t.state.loaded)return n._observer.unobserve(t.el);t.load()}}))}))}},{key:"_elRenderer",value:function(e,t,n){if(e.el){var r=e.el,i=e.bindType,o=void 0;switch(t){case"loading":o=e.loading;break;case"error":o=e.error;break;default:o=e.src}if(i?r.style[i]='url("'+o+'")':r.getAttribute("src")!==o&&r.setAttribute("src",o),r.setAttribute("lazy",t),this.$emit(t,e,n),this.options.adapter[t]&&this.options.adapter[t](e,this.options),this.options.dispatchEvent){var a=new g(t,{detail:e});r.dispatchEvent(a)}}}},{key:"_valueFormatter",value:function(e){var t,n=e,i=this.options.loading,o=this.options.error;return null!==(t=e)&&"object"===(void 0===t?"undefined":r(t))&&(e.src||this.options.silent||console.error("Vue Lazyload warning: miss src with "+e),n=e.src,i=e.loading||this.options.loading,o=e.error||this.options.error),{src:n,loading:i,error:o}}}]),t}()},Q=function(e){return{props:{tag:{type:String,default:"div"}},render:function(e){return!1===this.show?e(this.tag):e(this.tag,null,this.$slots.default)},data:function(){return{el:null,state:{loaded:!1},rect:{},show:!1}},mounted:function(){this.el=this.$el,e.addLazyBox(this),e.lazyLoadHandler()},beforeDestroy:function(){e.removeComponent(this)},methods:{getRect:function(){this.rect=this.$el.getBoundingClientRect()},checkInView:function(){return this.getRect(),p&&this.rect.top<window.innerHeight*e.options.preLoad&&this.rect.bottom>0&&this.rect.left<window.innerWidth*e.options.preLoad&&this.rect.right>0},load:function(){this.show=!0,this.state.loaded=!0,this.$emit("show",this)},destroy:function(){return this.$destroy}}}},R=function(){function e(t){var n=t.lazy;i(this,e),this.lazy=n,n.lazyContainerMananger=this,this._queue=[]}return o(e,[{key:"bind",value:function(e,t,n){var r=new W({el:e,binding:t,vnode:n,lazy:this.lazy});this._queue.push(r)}},{key:"update",value:function(e,t,n){var r=L(this._queue,(function(t){return t.el===e}));r&&r.update({el:e,binding:t,vnode:n})}},{key:"unbind",value:function(e,t,n){var r=L(this._queue,(function(t){return t.el===e}));r&&(r.clear(),m(this._queue,r))}}]),e}(),P={selector:"img"},W=function(){function e(t){var n=t.el,r=t.binding,o=t.vnode,a=t.lazy;i(this,e),this.el=null,this.vnode=o,this.binding=r,this.options={},this.lazy=a,this._queue=[],this.update({el:n,binding:r})}return o(e,[{key:"update",value:function(e){var t=this,n=e.el,r=e.binding;this.el=n,this.options=f({},P,r.value),this.getImgs().forEach((function(e){t.lazy.add(e,f({},t.binding,{value:{src:"dataset"in e?e.dataset.src:e.getAttribute("data-src"),error:("dataset"in e?e.dataset.error:e.getAttribute("data-error"))||t.options.error,loading:("dataset"in e?e.dataset.loading:e.getAttribute("data-loading"))||t.options.loading}}),t.vnode)}))}},{key:"getImgs",value:function(){return function(e){for(var t=e.length,n=[],r=0;r<t;r++)n.push(e[r]);return n}(this.el.querySelectorAll(this.options.selector))}},{key:"clear",value:function(){var e=this;this.getImgs().forEach((function(t){return e.lazy.remove(t)})),this.vnode=null,this.binding=null,this.lazy=null}}]),e}(),B=function(e){return{props:{src:[String,Object],tag:{type:String,default:"img"}},render:function(e){return e(this.tag,{attrs:{src:this.renderSrc}},this.$slots.default)},data:function(){return{el:null,options:{src:"",error:"",loading:"",attempt:e.options.attempt},state:{loaded:!1,error:!1,attempt:0},rect:{},renderSrc:""}},watch:{src:function(){this.init(),e.addLazyBox(this),e.lazyLoadHandler()}},created:function(){this.init(),this.renderSrc=this.options.loading},mounted:function(){this.el=this.$el,e.addLazyBox(this),e.lazyLoadHandler()},beforeDestroy:function(){e.removeComponent(this)},methods:{init:function(){var t=e._valueFormatter(this.src),n=t.src,r=t.loading,i=t.error;this.state.loaded=!1,this.options.src=n,this.options.error=i,this.options.loading=r,this.renderSrc=this.options.loading},getRect:function(){this.rect=this.$el.getBoundingClientRect()},checkInView:function(){return this.getRect(),p&&this.rect.top<window.innerHeight*e.options.preLoad&&this.rect.bottom>0&&this.rect.left<window.innerWidth*e.options.preLoad&&this.rect.right>0},load:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x;if(this.state.attempt>this.options.attempt-1&&this.state.error)return e.options.silent||console.log("VueLazyload log: "+this.options.src+" tried too more than "+this.options.attempt+" times"),void n();var r=this.options.src;A({src:r},(function(e){var n=e.src;t.renderSrc=n,t.state.loaded=!0}),(function(e){t.state.attempt++,t.renderSrc=t.options.error,t.state.error=!0}))}}}},M={install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=H(e),r=new n(t),i=new R({lazy:r}),o="2"===e.version.split(".")[0];e.prototype.$Lazyload=r,t.lazyComponent&&e.component("lazy-component",Q(r)),t.lazyImage&&e.component("lazy-image",B(r)),o?(e.directive("lazy",{bind:r.add.bind(r),update:r.update.bind(r),componentUpdated:r.lazyLoadHandler.bind(r),unbind:r.remove.bind(r)}),e.directive("lazy-container",{bind:i.bind.bind(i),componentUpdated:i.update.bind(i),unbind:i.unbind.bind(i)})):(e.directive("lazy",{bind:r.lazyLoadHandler.bind(r),update:function(e,t){f(this.vm.$refs,this.vm.$els),r.add(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:e,oldValue:t},{context:this.vm})},unbind:function(){r.remove(this.el)}}),e.directive("lazy-container",{update:function(e,t){i.update(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:e,oldValue:t},{context:this.vm})},unbind:function(){i.unbind(this.el)}}))}};n(127);M.name="vue-lazyload";t.default=M}})}));
12
+ /*!
13
+ * is-primitive <https://github.com/jonschlinkert/is-primitive>
14
+ *
15
+ * Copyright (c) 2014-2015, Jon Schlinkert.
16
+ * Licensed under the MIT License.
17
+ */
18
+ var i=function(t){return null==t||"function"!=typeof t&&"object"!=typeof t},n=Object.freeze({__proto__:null,default:i,__moduleExports:i}),o=function(t,e){if(null==t)throw new TypeError("expected first argument to be an object.");if(void 0===e||"undefined"==typeof Symbol)return t;if("function"!=typeof Object.getOwnPropertySymbols)return t;for(var r=Object.prototype.propertyIsEnumerable,i=Object(t),n=arguments.length,o=0;++o<n;)for(var s=Object(arguments[o]),a=Object.getOwnPropertySymbols(s),d=0;d<a.length;d++){var l=a[d];r.call(s,l)&&(i[l]=s[l])}return i},s=Object.freeze({__proto__:null,default:o,__moduleExports:o}),a=Object.prototype.toString,d=function(t){var e=typeof t;return"undefined"===e?"undefined":null===t?"null":!0===t||!1===t||t instanceof Boolean?"boolean":"string"===e||t instanceof String?"string":"number"===e||t instanceof Number?"number":"function"===e||t instanceof Function?void 0!==t.constructor.name&&"Generator"===t.constructor.name.slice(0,9)?"generatorfunction":"function":void 0!==Array.isArray&&Array.isArray(t)?"array":t instanceof RegExp?"regexp":t instanceof Date?"date":"[object RegExp]"===(e=a.call(t))?"regexp":"[object Date]"===e?"date":"[object Arguments]"===e?"arguments":"[object Error]"===e?"error":"[object Promise]"===e?"promise":function(t){return t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}(t)?"buffer":"[object Set]"===e?"set":"[object WeakSet]"===e?"weakset":"[object Map]"===e?"map":"[object WeakMap]"===e?"weakmap":"[object Symbol]"===e?"symbol":"[object Map Iterator]"===e?"mapiterator":"[object Set Iterator]"===e?"setiterator":"[object String Iterator]"===e?"stringiterator":"[object Array Iterator]"===e?"arrayiterator":"[object Int8Array]"===e?"int8array":"[object Uint8Array]"===e?"uint8array":"[object Uint8ClampedArray]"===e?"uint8clampedarray":"[object Int16Array]"===e?"int16array":"[object Uint16Array]"===e?"uint16array":"[object Int32Array]"===e?"int32array":"[object Uint32Array]"===e?"uint32array":"[object Float32Array]"===e?"float32array":"[object Float64Array]"===e?"float64array":"object"};var l=Object.freeze({__proto__:null,default:d,__moduleExports:d}),h=n&&i||n,c=s&&o||s,u=l&&d||l;function p(t){t=t||{};var e=arguments.length,r=0;if(1===e)return t;for(;++r<e;){var i=arguments[r];h(t)&&(t=i),b(i)&&f(t,i)}return t}function f(t,e){for(var r in c(t,e),e)if(m(r)&&g(e,r)){var i=e[r];b(i)?("undefined"===u(t[r])&&"function"===u(i)&&(t[r]=i),t[r]=p(t[r]||{},i)):t[r]=i}return t}function b(t){return"object"===u(t)||"function"===u(t)}function g(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function m(t){return"__proto__"!==t&&"constructor"!==t&&"prototype"!==t}var v=p;const y="undefined"!=typeof window&&null!==window,w=function(){if(y&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)return"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}}),!0;return!1}();const _="event",L="observer",E=function(){if(y)return"function"==typeof window.CustomEvent?window.CustomEvent:(t.prototype=window.Event.prototype,t);function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var r=document.createEvent("CustomEvent");return r.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),r}}();function z(t,e){if(!t.length)return;const r=t.indexOf(e);return r>-1?t.splice(r,1):void 0}function j(t,e){if("IMG"!==t.tagName||!t.getAttribute("data-srcset"))return;let r=t.getAttribute("data-srcset");const i=[],n=t.parentNode.offsetWidth*e;let o,s,a;r=r.trim().split(","),r.map(t=>{t=t.trim(),o=t.lastIndexOf(" "),-1===o?(s=t,a=999998):(s=t.substr(0,o),a=parseInt(t.substr(o+1,t.length-o-2),10)),i.push([a,s])}),i.sort((function(t,e){if(t[0]<e[0])return 1;if(t[0]>e[0])return-1;if(t[0]===e[0]){if(-1!==e[1].indexOf(".webp",e[1].length-5))return 1;if(-1!==t[1].indexOf(".webp",t[1].length-5))return-1}return 0}));let d,l="";for(let t=0;t<i.length;t++){d=i[t],l=d[1];const e=i[t+1];if(e&&e[0]<n){l=d[1];break}if(!e){l=d[1];break}}return l}function A(t,e){let r;for(let i=0,n=t.length;i<n;i++)if(e(t[i])){r=t[i];break}return r}const x=(t=1)=>y&&window.devicePixelRatio||t;function O(){if(!y)return!1;let t=!0;try{const e=document.createElement("canvas");e.getContext&&e.getContext("2d")&&(t=0===e.toDataURL("image/webp").indexOf("data:image/webp"))}catch(e){t=!1}return t}const $=function(){if(!y)return;let t=!1;try{let e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}(),T={on(t,e,r,i=!1){$?t.addEventListener(e,r,{capture:i,passive:!0}):t.addEventListener(e,r,i)},off(t,e,r,i=!1){t.removeEventListener(e,r,i)}},I=(t,e,r)=>{let i=new Image;if(!t||!t.src){const t=new Error("image src is required");return r(t)}i.src=t.src,t.cors&&(i.crossOrigin=t.cors),i.onload=function(){e({naturalHeight:i.naturalHeight,naturalWidth:i.naturalWidth,src:i.src})},i.onerror=function(t){r(t)}},S=(t,e)=>"undefined"!=typeof getComputedStyle?getComputedStyle(t,null).getPropertyValue(e):t.style[e],C=t=>S(t,"overflow")+S(t,"overflow-y")+S(t,"overflow-x");function H(){}class Q{constructor({max:t}){this.options={max:t||100},this._caches=[]}has(t){return this._caches.indexOf(t)>-1}add(t){this.has(t)||(this._caches.push(t),this._caches.length>this.options.max&&this.free())}free(){this._caches.shift()}}class R{constructor({el:t,src:e,error:r,loading:i,bindType:n,$parent:o,options:s,cors:a,elRenderer:d,imageCache:l}){this.el=t,this.src=e,this.error=r,this.loading=i,this.bindType=n,this.attempt=0,this.cors=a,this.naturalHeight=0,this.naturalWidth=0,this.options=s,this.rect=null,this.$parent=o,this.elRenderer=d,this._imageCache=l,this.performanceData={init:Date.now(),loadStart:0,loadEnd:0},this.filter(),this.initState(),this.render("loading",!1)}initState(){"dataset"in this.el?this.el.dataset.src=this.src:this.el.setAttribute("data-src",this.src),this.state={loading:!1,error:!1,loaded:!1,rendered:!1}}record(t){this.performanceData[t]=Date.now()}update({src:t,loading:e,error:r}){const i=this.src;this.src=t,this.loading=e,this.error=r,this.filter(),i!==this.src&&(this.attempt=0,this.initState())}getRect(){this.rect=this.el.getBoundingClientRect()}checkInView(){return this.getRect(),this.rect.top<window.innerHeight*this.options.preLoad&&this.rect.bottom>this.options.preLoadTop&&this.rect.left<window.innerWidth*this.options.preLoad&&this.rect.right>0}filter(){(function(t){if(!(t instanceof Object))return[];if(Object.keys)return Object.keys(t);{let e=[];for(let r in t)t.hasOwnProperty(r)&&e.push(r);return e}})(this.options.filter).map(t=>{this.options.filter[t](this,this.options)})}renderLoading(t){this.state.loading=!0,I({src:this.loading,cors:this.cors},e=>{this.render("loading",!1),this.state.loading=!1,t()},()=>{t(),this.state.loading=!1,this.options.silent||console.warn(`VueLazyload log: load failed with loading image(${this.loading})`)})}load(t=H){return this.attempt>this.options.attempt-1&&this.state.error?(this.options.silent||console.log(`VueLazyload log: ${this.src} tried too more than ${this.options.attempt} times`),void t()):this.state.rendered&&this.state.loaded?void 0:this._imageCache.has(this.src)?(this.state.loaded=!0,this.render("loaded",!0),this.state.rendered=!0,t()):void this.renderLoading(()=>{this.attempt++,this.options.adapter.beforeLoad&&this.options.adapter.beforeLoad(this,this.options),this.record("loadStart"),I({src:this.src,cors:this.cors},e=>{this.naturalHeight=e.naturalHeight,this.naturalWidth=e.naturalWidth,this.state.loaded=!0,this.state.error=!1,this.record("loadEnd"),this.render("loaded",!1),this.state.rendered=!0,this._imageCache.add(this.src),t()},t=>{!this.options.silent&&console.error(t),this.state.error=!0,this.state.loaded=!1,this.render("error",!1)})})}render(t,e){this.elRenderer(this,t,e)}performance(){let t="loading",e=0;return this.state.loaded&&(t="loaded",e=(this.performanceData.loadEnd-this.performanceData.loadStart)/1e3),this.state.error&&(t="error"),{src:this.src,state:t,time:e}}$destroy(){this.el=null,this.src=null,this.error=null,this.loading=null,this.bindType=null,this.attempt=0}}const k="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",B=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],P={rootMargin:"0px",threshold:0};function W(t){return class{constructor({preLoad:t,error:e,throttleWait:r,preLoadTop:i,dispatchEvent:n,loading:o,attempt:s,silent:a=!0,scale:d,listenEvents:l,hasbind:h,filter:c,adapter:u,observer:p,observerOptions:f}){this.version='"1.3.4"',this.mode=_,this.ListenerQueue=[],this.TargetIndex=0,this.TargetQueue=[],this.options={silent:a,dispatchEvent:!!n,throttleWait:r||200,preLoad:t||1.3,preLoadTop:i||0,error:e||k,loading:o||k,attempt:s||3,scale:d||x(d),ListenEvents:l||B,hasbind:!1,supportWebp:O(),filter:c||{},adapter:u||{},observer:!!p,observerOptions:f||P},this._initEvent(),this._imageCache=new Q({max:200}),this.lazyLoadHandler=function(t,e){let r=null,i=null,n=0,o=!1;return function(){if(o=!0,r)return;let s=Date.now()-n,a=this,d=arguments,l=function(){n=Date.now(),r=!1,t.apply(a,d)};s>=e?l():r=setTimeout(l,e),o&&(clearTimeout(i),i=setTimeout(l,2*e))}}(this._lazyLoadHandler.bind(this),this.options.throttleWait),this.setMode(this.options.observer?L:_)}config(t={}){v(this.options,t)}performance(){let t=[];return this.ListenerQueue.map(e=>{t.push(e.performance())}),t}addLazyBox(t){this.ListenerQueue.push(t),y&&(this._addListenerTarget(window),this._observer&&this._observer.observe(t.el),t.$el&&t.$el.parentNode&&this._addListenerTarget(t.$el.parentNode))}add(e,r,i){if(function(t,e){let r=!1;for(let i=0,n=t.length;i<n;i++)if(e(t[i])){r=!0;break}return r}(this.ListenerQueue,t=>t.el===e))return this.update(e,r),t.nextTick(this.lazyLoadHandler);let{src:n,loading:o,error:s,cors:a}=this._valueFormatter(r.value);t.nextTick(()=>{n=j(e,this.options.scale)||n,this._observer&&this._observer.observe(e);const d=Object.keys(r.modifiers)[0];let l;d&&(l=i.context.$refs[d],l=l?l.$el||l:document.getElementById(d)),l||(l=(t=>{if(!y)return;if(!(t instanceof HTMLElement))return window;let e=t;for(;e&&e!==document.body&&e!==document.documentElement&&e.parentNode;){if(/(scroll|auto)/.test(C(e)))return e;e=e.parentNode}return window})(e));const h=new R({bindType:r.arg,$parent:l,el:e,loading:o,error:s,src:n,cors:a,elRenderer:this._elRenderer.bind(this),options:this.options,imageCache:this._imageCache});this.ListenerQueue.push(h),y&&(this._addListenerTarget(window),this._addListenerTarget(l)),this.lazyLoadHandler(),t.nextTick(()=>this.lazyLoadHandler())})}update(e,r,i){let{src:n,loading:o,error:s}=this._valueFormatter(r.value);n=j(e,this.options.scale)||n;const a=A(this.ListenerQueue,t=>t.el===e);a?a.update({src:n,loading:o,error:s}):this.add(e,r,i),this._observer&&(this._observer.unobserve(e),this._observer.observe(e)),this.lazyLoadHandler(),t.nextTick(()=>this.lazyLoadHandler())}remove(t){if(!t)return;this._observer&&this._observer.unobserve(t);const e=A(this.ListenerQueue,e=>e.el===t);e&&(this._removeListenerTarget(e.$parent),this._removeListenerTarget(window),z(this.ListenerQueue,e),e.$destroy())}removeComponent(t){t&&(z(this.ListenerQueue,t),this._observer&&this._observer.unobserve(t.el),t.$parent&&t.$el.parentNode&&this._removeListenerTarget(t.$el.parentNode),this._removeListenerTarget(window))}setMode(t){w||t!==L||(t=_),this.mode=t,t===_?(this._observer&&(this.ListenerQueue.forEach(t=>{this._observer.unobserve(t.el)}),this._observer=null),this.TargetQueue.forEach(t=>{this._initListen(t.el,!0)})):(this.TargetQueue.forEach(t=>{this._initListen(t.el,!1)}),this._initIntersectionObserver())}_addListenerTarget(t){if(!t)return;let e=A(this.TargetQueue,e=>e.el===t);return e?e.childrenCount++:(e={el:t,id:++this.TargetIndex,childrenCount:1,listened:!0},this.mode===_&&this._initListen(e.el,!0),this.TargetQueue.push(e)),this.TargetIndex}_removeListenerTarget(t){this.TargetQueue.forEach((e,r)=>{e.el===t&&(e.childrenCount--,e.childrenCount||(this._initListen(e.el,!1),this.TargetQueue.splice(r,1),e=null))})}_initListen(t,e){this.options.ListenEvents.forEach(r=>T[e?"on":"off"](t,r,this.lazyLoadHandler))}_initEvent(){this.Event={listeners:{loading:[],loaded:[],error:[]}},this.$on=(t,e)=>{this.Event.listeners[t]||(this.Event.listeners[t]=[]),this.Event.listeners[t].push(e)},this.$once=(t,e)=>{const r=this;this.$on(t,(function i(){r.$off(t,i),e.apply(r,arguments)}))},this.$off=(t,e)=>{if(e)z(this.Event.listeners[t],e);else{if(!this.Event.listeners[t])return;this.Event.listeners[t].length=0}},this.$emit=(t,e,r)=>{this.Event.listeners[t]&&this.Event.listeners[t].forEach(t=>t(e,r))}}_lazyLoadHandler(){const t=[];this.ListenerQueue.forEach((e,r)=>{e.el&&e.el.parentNode||t.push(e);e.checkInView()&&e.load()}),t.forEach(t=>{z(this.ListenerQueue,t),t.$destroy()})}_initIntersectionObserver(){w&&(this._observer=new IntersectionObserver(this._observerHandler.bind(this),this.options.observerOptions),this.ListenerQueue.length&&this.ListenerQueue.forEach(t=>{this._observer.observe(t.el)}))}_observerHandler(t,e){t.forEach(t=>{t.isIntersecting&&this.ListenerQueue.forEach(e=>{if(e.el===t.target){if(e.state.loaded)return this._observer.unobserve(e.el);e.load()}})})}_elRenderer(t,e,r){if(!t.el)return;const{el:i,bindType:n}=t;let o;switch(e){case"loading":o=t.loading;break;case"error":o=t.error;break;default:o=t.src}if(n?i.style[n]='url("'+o+'")':i.getAttribute("src")!==o&&i.setAttribute("src",o),i.setAttribute("lazy",e),this.$emit(e,t,r),this.options.adapter[e]&&this.options.adapter[e](t,this.options),this.options.dispatchEvent){const r=new E(e,{detail:t});i.dispatchEvent(r)}}_valueFormatter(t){let e=t,r=this.options.loading,i=this.options.error;var n;return null!==(n=t)&&"object"==typeof n&&(t.src||this.options.silent||console.error("Vue Lazyload warning: miss src with "+t),e=t.src,r=t.loading||this.options.loading,i=t.error||this.options.error),{src:e,loading:r,error:i}}}}W.install=(t,e={})=>{const r=new(W(t))(e);"2"===t.version.split(".")[0]?t.directive("lazy",{bind:r.add.bind(r),update:r.update.bind(r),componentUpdated:r.lazyLoadHandler.bind(r),unbind:r.remove.bind(r)}):t.directive("lazy",{bind:r.lazyLoadHandler.bind(r),update(t,e){v(this.vm.$refs,this.vm.$els),r.add(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind(){r.remove(this.el)}})};const D=t=>({props:{tag:{type:String,default:"div"}},render(t){return t(this.tag,null,this.show?this.$slots.default:null)},data:()=>({el:null,state:{loaded:!1},rect:{},show:!1}),mounted(){this.el=this.$el,t.addLazyBox(this),t.lazyLoadHandler()},beforeDestroy(){t.removeComponent(this)},methods:{getRect(){this.rect=this.$el.getBoundingClientRect()},checkInView(){return this.getRect(),y&&this.rect.top<window.innerHeight*t.options.preLoad&&this.rect.bottom>0&&this.rect.left<window.innerWidth*t.options.preLoad&&this.rect.right>0},load(){this.show=!0,this.state.loaded=!0,this.$emit("show",this)},destroy(){return this.$destroy}}});D.install=function(t,e={}){const r=new(W(t))(e);t.component("lazy-component",D(r))};class M{constructor({lazy:t}){this.lazy=t,t.lazyContainerMananger=this,this._queue=[]}bind(t,e,r){const i=new N({el:t,binding:e,vnode:r,lazy:this.lazy});this._queue.push(i)}update(t,e,r){const i=A(this._queue,e=>e.el===t);i&&i.update({el:t,binding:e,vnode:r})}unbind(t,e,r){const i=A(this._queue,e=>e.el===t);i&&(i.clear(),z(this._queue,i))}}const V={selector:"img"};class N{constructor({el:t,binding:e,vnode:r,lazy:i}){this.el=null,this.vnode=r,this.binding=e,this.options={},this.lazy=i,this._queue=[],this.update({el:t,binding:e})}update({el:t,binding:e}){this.el=t,this.options=v({},V,e.value);this.getImgs().forEach(t=>{this.lazy.add(t,v({},this.binding,{value:{src:"dataset"in t?t.dataset.src:t.getAttribute("data-src"),error:("dataset"in t?t.dataset.error:t.getAttribute("data-error"))||this.options.error,loading:("dataset"in t?t.dataset.loading:t.getAttribute("data-loading"))||this.options.loading}}),this.vnode)})}getImgs(){return function(t){let e=t.length;const r=[];for(let i=0;i<e;i++)r.push(t[i]);return r}(this.el.querySelectorAll(this.options.selector))}clear(){this.getImgs().forEach(t=>this.lazy.remove(t)),this.vnode=null,this.binding=null,this.lazy=null}}N.install=(t,e={})=>{const r=new(W(t))(e),i=new N({lazy:r});"2"===t.version.split(".")[0]?t.directive("lazy-container",{bind:i.bind.bind(i),componentUpdated:i.update.bind(i),unbind:i.unbind.bind(i)}):t.directive("lazy-container",{update(t,e){i.update(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind(){i.unbind(this.el)}})};const U=t=>({props:{src:[String,Object],tag:{type:String,default:"img"}},render(t){return t(this.tag,{attrs:{src:this.renderSrc}},this.$slots.default)},data:()=>({el:null,options:{src:"",error:"",loading:"",attempt:t.options.attempt},state:{loaded:!1,error:!1,attempt:0},rect:{},renderSrc:""}),watch:{src(){this.init(),t.addLazyBox(this),t.lazyLoadHandler()}},created(){this.init(),this.renderSrc=this.options.loading},mounted(){this.el=this.$el,t.addLazyBox(this),t.lazyLoadHandler()},beforeDestroy(){t.removeComponent(this)},methods:{init(){const{src:e,loading:r,error:i}=t._valueFormatter(this.src);this.state.loaded=!1,this.options.src=e,this.options.error=i,this.options.loading=r,this.renderSrc=this.options.loading},getRect(){this.rect=this.$el.getBoundingClientRect()},checkInView(){return this.getRect(),y&&this.rect.top<window.innerHeight*t.options.preLoad&&this.rect.bottom>0&&this.rect.left<window.innerWidth*t.options.preLoad&&this.rect.right>0},load(e=H){if(this.state.attempt>this.options.attempt-1&&this.state.error)return t.options.silent||console.log(`VueLazyload log: ${this.options.src} tried too more than ${this.options.attempt} times`),void e();const r=this.options.src;I({src:r},({src:t})=>{this.renderSrc=t,this.state.loaded=!0},t=>{this.state.attempt++,this.renderSrc=this.options.error,this.state.error=!0})}}});U.install=(t,e={})=>{const r=new(W(t))(e);t.component("lazy-image",U(r))};var q={install(t,e={}){const r=new(W(t))(e),i=new M({lazy:r}),n="2"===t.version.split(".")[0];t.prototype.$Lazyload=r,e.lazyComponent&&t.component("lazy-component",D(r)),e.lazyImage&&t.component("lazy-image",U(r)),n?(t.directive("lazy",{bind:r.add.bind(r),update:r.update.bind(r),componentUpdated:r.lazyLoadHandler.bind(r),unbind:r.remove.bind(r)}),t.directive("lazy-container",{bind:i.bind.bind(i),componentUpdated:i.update.bind(i),unbind:i.unbind.bind(i)})):(t.directive("lazy",{bind:r.lazyLoadHandler.bind(r),update(t,e){v(this.vm.$refs,this.vm.$els),r.add(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind(){r.remove(this.el)}}),t.directive("lazy-container",{update(t,e){i.update(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind(){i.unbind(this.el)}}))}};r(127);q.name="vue-lazyload";e.default=q}})}));
13
19
  //# sourceMappingURL=lazyload.js.map