pagination.js 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. exports.ids = [18];
  2. exports.modules = {
  3. /***/ 156:
  4. /***/ (function(module, exports) {
  5. // Exports
  6. module.exports = {
  7. };
  8. /***/ }),
  9. /***/ 174:
  10. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  11. "use strict";
  12. __webpack_require__.r(__webpack_exports__);
  13. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Pagination_vue_vue_type_style_index_0_id_044ef958_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(156);
  14. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Pagination_vue_vue_type_style_index_0_id_044ef958_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Pagination_vue_vue_type_style_index_0_id_044ef958_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  15. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Pagination_vue_vue_type_style_index_0_id_044ef958_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Pagination_vue_vue_type_style_index_0_id_044ef958_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  16. /***/ }),
  17. /***/ 182:
  18. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  19. "use strict";
  20. // ESM COMPAT FLAG
  21. __webpack_require__.r(__webpack_exports__);
  22. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/Pagination.vue?vue&type=template&id=044ef958&scoped=true
  23. var render = function render() {
  24. var _vm = this,
  25. _c = _vm._self._c;
  26. return _c('div', {
  27. staticClass: "pagination-container",
  28. class: {
  29. 'hidden': _vm.hidden
  30. }
  31. }, [_vm._t("slot"), _vm._ssrNode(" "), _c('el-pagination', _vm._b({
  32. attrs: {
  33. "background": _vm.background,
  34. "current-page": _vm.currentPage,
  35. "page-size": _vm.pageSize,
  36. "layout": _vm.layout,
  37. "total": _vm.total
  38. },
  39. on: {
  40. "update:currentPage": function ($event) {
  41. _vm.currentPage = $event;
  42. },
  43. "update:current-page": function ($event) {
  44. _vm.currentPage = $event;
  45. },
  46. "update:pageSize": function ($event) {
  47. _vm.pageSize = $event;
  48. },
  49. "update:page-size": function ($event) {
  50. _vm.pageSize = $event;
  51. },
  52. "size-change": _vm.handleSizeChange,
  53. "current-change": _vm.handleCurrentChange
  54. }
  55. }, 'el-pagination', _vm.$attrs, false))], 2);
  56. };
  57. var staticRenderFns = [];
  58. // CONCATENATED MODULE: ./components/Pagination.vue?vue&type=template&id=044ef958&scoped=true
  59. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/Pagination.vue?vue&type=script&lang=js
  60. /* harmony default export */ var Paginationvue_type_script_lang_js = ({
  61. name: 'Pagination',
  62. props: {
  63. total: {
  64. required: true,
  65. type: Number
  66. },
  67. page: {
  68. type: Number,
  69. default: 0
  70. },
  71. limit: {
  72. type: Number,
  73. default: 10
  74. },
  75. // pageSizes: {
  76. // type: Array,
  77. // default() {
  78. // return [10, 20, 50, 100]
  79. // }
  80. // },
  81. layout: {
  82. type: String,
  83. default: 'prev, pager, next'
  84. },
  85. background: {
  86. type: Boolean,
  87. default: true
  88. },
  89. autoScroll: {
  90. type: Boolean,
  91. default: true
  92. },
  93. hidden: {
  94. type: Boolean,
  95. default: false
  96. }
  97. },
  98. computed: {
  99. currentPage: {
  100. get() {
  101. return this.page;
  102. },
  103. set(val) {
  104. this.$emit('update:page', val);
  105. }
  106. },
  107. pageSize: {
  108. get() {
  109. return this.limit;
  110. },
  111. set(val) {
  112. this.$emit('update:limit', val);
  113. }
  114. }
  115. },
  116. methods: {
  117. handleSizeChange(val) {
  118. this.$emit('pagination', {
  119. page: this.currentPage,
  120. limit: val
  121. });
  122. if (this.autoScroll) {
  123. scrollTo(0, 800);
  124. }
  125. },
  126. handleCurrentChange(val) {
  127. this.$emit('pagination', {
  128. page: val,
  129. limit: this.pageSize
  130. });
  131. if (this.autoScroll) {
  132. scrollTo(0, 800);
  133. }
  134. }
  135. }
  136. });
  137. // CONCATENATED MODULE: ./components/Pagination.vue?vue&type=script&lang=js
  138. /* harmony default export */ var components_Paginationvue_type_script_lang_js = (Paginationvue_type_script_lang_js);
  139. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  140. var componentNormalizer = __webpack_require__(2);
  141. // CONCATENATED MODULE: ./components/Pagination.vue
  142. function injectStyles (context) {
  143. var style0 = __webpack_require__(174)
  144. if (style0.__inject__) style0.__inject__(context)
  145. }
  146. /* normalize component */
  147. var component = Object(componentNormalizer["a" /* default */])(
  148. components_Paginationvue_type_script_lang_js,
  149. render,
  150. staticRenderFns,
  151. false,
  152. injectStyles,
  153. "044ef958",
  154. "230c7770"
  155. )
  156. /* harmony default export */ var Pagination = __webpack_exports__["default"] = (component.exports);
  157. /***/ })
  158. };;
  159. //# sourceMappingURL=pagination.js.map