module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "/dist/";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 105);
/******/ })
/************************************************************************/
/******/ ({

/***/ 0:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
/* globals __VUE_SSR_CONTEXT__ */

// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.

function normalizeComponent (
  scriptExports,
  render,
  staticRenderFns,
  functionalTemplate,
  injectStyles,
  scopeId,
  moduleIdentifier, /* server only */
  shadowMode /* vue-cli only */
) {
  // Vue.extend constructor export interop
  var options = typeof scriptExports === 'function'
    ? scriptExports.options
    : scriptExports

  // render functions
  if (render) {
    options.render = render
    options.staticRenderFns = staticRenderFns
    options._compiled = true
  }

  // functional template
  if (functionalTemplate) {
    options.functional = true
  }

  // scopedId
  if (scopeId) {
    options._scopeId = 'data-v-' + scopeId
  }

  var hook
  if (moduleIdentifier) { // server build
    hook = function (context) {
      // 2.3 injection
      context =
        context || // cached call
        (this.$vnode && this.$vnode.ssrContext) || // stateful
        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
      // 2.2 with runInNewContext: true
      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
        context = __VUE_SSR_CONTEXT__
      }
      // inject component styles
      if (injectStyles) {
        injectStyles.call(this, context)
      }
      // register component module identifier for async chunk inferrence
      if (context && context._registeredComponents) {
        context._registeredComponents.add(moduleIdentifier)
      }
    }
    // used by ssr in case component is cached and beforeCreate
    // never gets called
    options._ssrRegister = hook
  } else if (injectStyles) {
    hook = shadowMode
      ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
      : injectStyles
  }

  if (hook) {
    if (options.functional) {
      // for template-only hot-reload because in that case the render fn doesn't
      // go through the normalizer
      options._injectStyles = hook
      // register for functioal component in vue file
      var originalRender = options.render
      options.render = function renderWithStyleInjection (h, context) {
        hook.call(context)
        return originalRender(h, context)
      }
    } else {
      // inject component registration as beforeCreate hook
      var existing = options.beforeCreate
      options.beforeCreate = existing
        ? [].concat(existing, hook)
        : [hook]
    }
  }

  return {
    exports: scriptExports,
    options: options
  }
}


/***/ }),

/***/ 105:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/load-list/src/main.vue?vue&type=template&id=391a88f2&
var render = function() {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c(
    "div",
    {
      directives: [
        {
          name: "loading",
          rawName: "v-loading",
          value: _vm.isLoading,
          expression: "isLoading"
        }
      ],
      staticClass: "el-load-list",
      attrs: {
        "element-loading-text": _vm.loadingText,
        "element-loading-background": "rgba(255, 255, 255, 0.7)"
      }
    },
    [
      _vm._t("default", null, { list: _vm.list, isError: _vm.isError }),
      _vm.list.length === 0
        ? _c(
            "div",
            {
              staticClass: "el-load-list-empty-container",
              class: { "el-load-list-empty-is-loading": _vm.isLoading }
            },
            [
              _vm._t(
                "empty",
                [
                  _c("el-empty", {
                    staticClass: "el-load-list-empty",
                    attrs: {
                      description: _vm.isError ? _vm.errorText : _vm.emptyText,
                      image: _vm.isError
                        ? _vm.realErrorImage
                        : _vm.realEmptyImage
                    }
                  }),
                  _c(
                    "div",
                    { staticClass: "el-empty-btn-container" },
                    [
                      _vm._t(
                        "empty-btn",
                        [
                          _c(
                            "el-button",
                            {
                              attrs: { type: "primary", size: "small" },
                              on: {
                                click: function($event) {
                                  $event.stopPropagation()
                                  _vm.refresh(false)
                                }
                              }
                            },
                            [
                              _vm._v(
                                "\n            " +
                                  _vm._s(
                                    _vm.isError
                                      ? _vm.errorBtnText
                                      : _vm.emptyBtnText
                                  ) +
                                  "\n          "
                              )
                            ]
                          )
                        ],
                        { isError: _vm.isError }
                      )
                    ],
                    2
                  )
                ],
                { isError: _vm.isError }
              )
            ],
            2
          )
        : _vm._e(),
      !_vm.hiddenPagination
        ? _c(
            "el-pagination",
            _vm._b(
              {
                staticClass: "el-load-list-pagination",
                on: {
                  "size-change": _vm.onPaginationSizeChange,
                  "current-change": _vm.onPaginationPageChange
                }
              },
              "el-pagination",
              _vm.realPaginationProps,
              false
            )
          )
        : _vm._e()
    ],
    2
  )
}
var staticRenderFns = []
render._withStripped = true


// CONCATENATED MODULE: ./packages/load-list/src/main.vue?vue&type=template&id=391a88f2&

// EXTERNAL MODULE: external "wp-element-ui/lib/utils/lodash"
var lodash_ = __webpack_require__(9);

// EXTERNAL MODULE: external "wp-element-ui/lib/utils/types"
var types_ = __webpack_require__(7);

// EXTERNAL MODULE: external "wp-element-ui/lib/pagination"
var pagination_ = __webpack_require__(45);
var pagination_default = /*#__PURE__*/__webpack_require__.n(pagination_);

// EXTERNAL MODULE: external "wp-element-ui/lib/empty"
var empty_ = __webpack_require__(46);
var empty_default = /*#__PURE__*/__webpack_require__.n(empty_);

// EXTERNAL MODULE: external "wp-element-ui/lib/button"
var button_ = __webpack_require__(13);
var button_default = /*#__PURE__*/__webpack_require__.n(button_);

// EXTERNAL MODULE: external "wp-element-ui/lib/locale"
var locale_ = __webpack_require__(11);

// EXTERNAL MODULE: external "wp-element-ui/lib/utils/scroll-into-view-or-body"
var scroll_into_view_or_body_ = __webpack_require__(28);

// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/load-list/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//









var PAGINATION_KEY = Object.freeze({
  page: 'page',
  pageSize: 'pageSize',
  total: 'total',
  list: 'list' // 列表记录字段key
});
/* harmony default export */ var mainvue_type_script_lang_js_ = ({
  name: 'ElLoadList',
  props: {
    initValue: Array, // 初始化值，之所以设置这个，是为了兼容nuxt的seo
    total: Number, // 传入initValue时，此属性必传
    loadData: {
      type: Function,
      required: true
    },
    pageSize: {
      type: Number,
      default: 20
    },
    paginationKey: {
      type: Object,
      default: function _default() {
        return Object.create(null);
      }
    },
    paginationProps: {
      type: Object,
      default: function _default() {
        return Object.create(null);
      }
    }, // 分页组件相关配置
    emptyText: {
      type: String,
      default: Object(locale_["t"])('el.empty.description')
    },
    emptyBtnText: {
      type: String,
      default: Object(locale_["t"])('el.wpCommon.reload')
    },
    emptyImage: String, // base64或者网络地址
    errorText: {
      type: String,
      default: Object(locale_["t"])('el.image.error')
    },
    errorBtnText: {
      type: String,
      default: Object(locale_["t"])('el.wpCommon.reload')
    },
    errorImage: String, // base64或者网络地址
    loadingText: {
      type: String,
      default: Object(locale_["t"])('el.select.loading')
    },
    autoScrollTop: {
      type: Boolean,
      default: true
    }, // 是否点击分页组件时自动回到el-load-list的顶部
    hiddenPagination: Boolean // 是否隐藏分页
  },
  components: {
    ElPagination: pagination_default.a,
    ElEmpty: empty_default.a,
    ElButton: button_default.a
  },
  data: function data(vm) {
    var _pagination;

    var realPaginationKey = Object(lodash_["assign"])(Object.create(null), PAGINATION_KEY, vm.paginationKey);
    return {
      list: Array.isArray(vm.initValue) ? vm.initValue : [],
      isLoading: !Array.isArray(vm.initValue), // 是否加载中
      isError: false, // 是否加载错误
      pagination: (_pagination = {}, _pagination[realPaginationKey.page] = 1, _pagination[realPaginationKey.pageSize] = vm.pageSize, _pagination[realPaginationKey.total] = vm.total || 0, _pagination)
    };
  },

  computed: {
    realPaginationKey: function realPaginationKey() {
      return Object(lodash_["assign"])(Object.create(null), PAGINATION_KEY, this.paginationKey);
    },
    loadDataIsFn: function loadDataIsFn() {
      return typeof this.loadData === 'function';
    },
    realEmptyImage: function realEmptyImage() {
      return this.emptyImage || (this.$ELEMENT ? this.$ELEMENT.emptyImage : undefined);
    },
    realErrorImage: function realErrorImage() {
      return this.errorImage || (this.$ELEMENT ? this.$ELEMENT.errorImage : undefined) || this.realEmptyImage;
    },
    realPaginationProps: function realPaginationProps() {
      return Object(lodash_["assign"])({
        align: 'center'
      }, this.paginationProps, {
        currentPage: this.pagination[this.realPaginationKey.page],
        total: this.pagination[this.realPaginationKey.total],
        pageSize: this.pagination[this.realPaginationKey.pageSize]
      });
    }
  },
  created: function created() {
    if (!this.$isServer && this.loadDataIsFn && !Array.isArray(this.initValue)) {
      this.getList(this.pagination);
    }
  },

  methods: {
    getList: function getList(pagination) {
      var _loadData,
          _this = this;

      var page = pagination[this.realPaginationKey.page],
          pageSize = pagination[this.realPaginationKey.pageSize];

      this.isLoading = true;
      return this.loadData((_loadData = {}, _loadData[this.realPaginationKey.page] = page, _loadData[this.realPaginationKey.pageSize] = pageSize, _loadData)).then(function (res) {
        var _assign;

        if (res && Object(types_["isObject"])(res) && Object.keys(res).length > 0) {
          var list = res[_this.realPaginationKey.list];
          if (Array.isArray(list)) {
            _this.list = list;
          } else {
            _this.list = [];
          }
          Object.keys(_this.pagination).forEach(function (key) {
            if (Object.prototype.hasOwnProperty.call(res, key)) {
              _this.setPagination(key, res[key]);
            }
          });
        } else {
          _this.list = [];
        }
        if (_this.isError) {
          _this.isError = false;
        }
        _this.$emit('loaded', _this.isError, Object(lodash_["assign"])((_assign = {}, _assign[_this.realPaginationKey.list] = _this.list, _assign), _this.pagination));
        _this.isLoading = false;
      }).catch(function (e) {
        var _assign2;

        _this.list = [];
        _this.isError = true;
        _this.$emit('loaded', _this.isError, Object(lodash_["assign"])((_assign2 = {}, _assign2[_this.realPaginationKey.list] = _this.list, _assign2), _this.pagination));
        _this.isLoading = false;
        throw e;
      });
    },

    /**
     * @description - 强制刷新表格数据
     * @param {boolean} [isForce] - 是否强制刷新
     * @return {Promise<unknown>}
     */
    refresh: function refresh(isForce) {
      var page = this.pagination[this.realPaginationKey.page];
      var pageSize = this.pagination[this.realPaginationKey.pageSize];
      // 是否强制刷新回到第一页
      if (isForce) {
        var _getList;

        return this.getList((_getList = {}, _getList[this.realPaginationKey.page] = 1, _getList[this.realPaginationKey.pageSize] = pageSize, _getList));
      } else {
        var _getList2;

        return this.getList((_getList2 = {}, _getList2[this.realPaginationKey.page] = page, _getList2[this.realPaginationKey.pageSize] = pageSize, _getList2));
      }
    },

    // 设置pagination数据
    setPagination: function setPagination(key, value) {
      this.$set(this.pagination, key, value);
    },
    onPaginationSizeChange: function onPaginationSizeChange(val) {
      this.setPagination(this.realPaginationKey.pageSize, val);
      this.scrollListTop();
      this.refresh(false);
    },
    onPaginationPageChange: function onPaginationPageChange(val) {
      this.setPagination(this.realPaginationKey.page, val);
      this.scrollListTop();
      this.refresh(false);
    },
    scrollListTop: function scrollListTop() {
      if (this.autoScrollTop) {
        Object(scroll_into_view_or_body_["scrollIntoView"])(this.$el, undefined, this.$el);
      }
    }
  }
});
// CONCATENATED MODULE: ./packages/load-list/src/main.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(0);

// CONCATENATED MODULE: ./packages/load-list/src/main.vue





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  src_mainvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* hot reload */
if (false) { var api; }
component.options.__file = "packages/load-list/src/main.vue"
/* harmony default export */ var main = (component.exports);
// CONCATENATED MODULE: ./packages/load-list/index.js


/* istanbul ignore next */
main.install = function (Vue) {
  Vue.component(main.name, main);
};

/* harmony default export */ var load_list = __webpack_exports__["default"] = (main);

/***/ }),

/***/ 11:
/***/ (function(module, exports) {

module.exports = require("wp-element-ui/lib/locale");

/***/ }),

/***/ 13:
/***/ (function(module, exports) {

module.exports = require("wp-element-ui/lib/button");

/***/ }),

/***/ 28:
/***/ (function(module, exports) {

module.exports = require("wp-element-ui/lib/utils/scroll-into-view-or-body");

/***/ }),

/***/ 45:
/***/ (function(module, exports) {

module.exports = require("wp-element-ui/lib/pagination");

/***/ }),

/***/ 46:
/***/ (function(module, exports) {

module.exports = require("wp-element-ui/lib/empty");

/***/ }),

/***/ 7:
/***/ (function(module, exports) {

module.exports = require("wp-element-ui/lib/utils/types");

/***/ }),

/***/ 9:
/***/ (function(module, exports) {

module.exports = require("wp-element-ui/lib/utils/lodash");

/***/ })

/******/ });