@94ai/nf-table 8.1.1 → 8.1.5

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.
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, getCurrentInstance, ref, computed, onMounted, onBeforeMount, reactive, watch, nextTick, set } from "vue-demi";
2
2
  import { CachedManager, deepClone, resolveValue } from "@94ai/common-utils";
3
- import { normalizeComponent } from "@94ai/vue2-runtime-helpers";
4
- import { Loading } from "element-ui";
3
+ import { normalizeComponent as normalizeComponent$1 } from "@94ai/vue2-runtime-helpers";
4
+ import { Checkbox, Radio, TableColumn, Loading } from "element-ui";
5
5
  import { getCurrentInstance as getCurrentInstance$1, effectScope, shallowReactive } from "vue";
6
6
  import NfMessage from "@94ai/nf-message";
7
7
  const __sfc_main$2 = defineComponent({
@@ -320,9 +320,9 @@ var _sfc_render$3 = function render() {
320
320
  })], 2);
321
321
  };
322
322
  var _sfc_staticRenderFns$3 = [];
323
- var __component__$3 = /* @__PURE__ */ normalizeComponent(__sfc_main$2, _sfc_render$3, _sfc_staticRenderFns$3, false, null, null, null, null);
323
+ var __component__$3 = /* @__PURE__ */ normalizeComponent$1(__sfc_main$2, _sfc_render$3, _sfc_staticRenderFns$3, false, null, null, null, null);
324
324
  const ColumnCheckDialog = __component__$3.exports;
325
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
325
+ var commonjsGlobal$1 = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
326
326
  function getDefaultExportFromCjs(x) {
327
327
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
328
328
  }
@@ -361,17 +361,17 @@ var vuedraggable_umd = { exports: {} };
361
361
  * @author owenm <owen23355@gmail.com>
362
362
  * @license MIT
363
363
  */
364
- function _typeof(obj) {
364
+ function _typeof$1(obj) {
365
365
  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
366
- _typeof = function(obj2) {
366
+ _typeof$1 = function(obj2) {
367
367
  return typeof obj2;
368
368
  };
369
369
  } else {
370
- _typeof = function(obj2) {
370
+ _typeof$1 = function(obj2) {
371
371
  return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
372
372
  };
373
373
  }
374
- return _typeof(obj);
374
+ return _typeof$1(obj);
375
375
  }
376
376
  function _defineProperty(obj, key, value) {
377
377
  if (key in obj) {
@@ -447,21 +447,21 @@ function _objectWithoutProperties(source, excluded) {
447
447
  }
448
448
  return target;
449
449
  }
450
- function _toConsumableArray(arr) {
451
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
450
+ function _toConsumableArray$1(arr) {
451
+ return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _nonIterableSpread$1();
452
452
  }
453
- function _arrayWithoutHoles(arr) {
453
+ function _arrayWithoutHoles$1(arr) {
454
454
  if (Array.isArray(arr)) {
455
455
  for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++)
456
456
  arr2[i] = arr[i];
457
457
  return arr2;
458
458
  }
459
459
  }
460
- function _iterableToArray(iter) {
460
+ function _iterableToArray$1(iter) {
461
461
  if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]")
462
462
  return Array.from(iter);
463
463
  }
464
- function _nonIterableSpread() {
464
+ function _nonIterableSpread$1() {
465
465
  throw new TypeError("Invalid attempt to spread non-iterable instance");
466
466
  }
467
467
  var version = "1.10.2";
@@ -744,7 +744,7 @@ function isRectEqual(rect1, rect2) {
744
744
  return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);
745
745
  }
746
746
  var _throttleTimeout;
747
- function throttle(callback, ms) {
747
+ function throttle$1(callback, ms) {
748
748
  return function() {
749
749
  if (!_throttleTimeout) {
750
750
  var args = arguments, _this = this;
@@ -1025,7 +1025,7 @@ function dispatchEvent(_ref) {
1025
1025
  }
1026
1026
  }
1027
1027
  var pluginEvent2 = function pluginEvent3(eventName, sortable) {
1028
- var _ref = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, originalEvent = _ref.evt, data = _objectWithoutProperties(_ref, ["evt"]);
1028
+ var _ref = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, originalEvent = _ref.evt, data4 = _objectWithoutProperties(_ref, ["evt"]);
1029
1029
  PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread({
1030
1030
  dragEl,
1031
1031
  parentEl,
@@ -1058,7 +1058,7 @@ var pluginEvent2 = function pluginEvent3(eventName, sortable) {
1058
1058
  originalEvent
1059
1059
  });
1060
1060
  }
1061
- }, data));
1061
+ }, data4));
1062
1062
  };
1063
1063
  function _dispatchEvent(info) {
1064
1064
  dispatchEvent(_objectSpread({
@@ -1129,7 +1129,7 @@ var documentExists = typeof document !== "undefined", PositionGhostAbsolutely =
1129
1129
  }
1130
1130
  var group = {};
1131
1131
  var originalGroup = options.group;
1132
- if (!originalGroup || _typeof(originalGroup) != "object") {
1132
+ if (!originalGroup || _typeof$1(originalGroup) != "object") {
1133
1133
  originalGroup = {
1134
1134
  name: originalGroup
1135
1135
  };
@@ -2211,9 +2211,9 @@ function _generateId(el) {
2211
2211
  }
2212
2212
  return sum.toString(36);
2213
2213
  }
2214
- function _saveInputCheckedState(root) {
2214
+ function _saveInputCheckedState(root2) {
2215
2215
  savedInputChecked.length = 0;
2216
- var inputs = root.getElementsByTagName("input");
2216
+ var inputs = root2.getElementsByTagName("input");
2217
2217
  var idx = inputs.length;
2218
2218
  while (idx--) {
2219
2219
  var el = inputs[idx];
@@ -2242,7 +2242,7 @@ Sortable.utils = {
2242
2242
  return !!closest(el, selector, el, false);
2243
2243
  },
2244
2244
  extend,
2245
- throttle,
2245
+ throttle: throttle$1,
2246
2246
  closest,
2247
2247
  toggleClass,
2248
2248
  clone,
@@ -2372,7 +2372,7 @@ function clearAutoScrolls() {
2372
2372
  function clearPointerElemChangedInterval() {
2373
2373
  clearInterval(pointerElemChangedInterval);
2374
2374
  }
2375
- var autoScroll = throttle(function(evt, options, rootEl2, isFallback) {
2375
+ var autoScroll = throttle$1(function(evt, options, rootEl2, isFallback) {
2376
2376
  if (!options.scroll)
2377
2377
  return;
2378
2378
  var x = (evt.touches ? evt.touches[0] : evt).clientX, y = (evt.touches ? evt.touches[0] : evt).clientY, sens = options.scrollSensitivity, speed = options.scrollSpeed, winScroller = getWindowScrollingElement();
@@ -2591,15 +2591,15 @@ function MultiDragPlugin() {
2591
2591
  selectedClass: "sortable-selected",
2592
2592
  multiDragKey: null,
2593
2593
  setData: function setData(dataTransfer, dragEl2) {
2594
- var data = "";
2594
+ var data4 = "";
2595
2595
  if (multiDragElements.length && multiDragSortable === sortable) {
2596
2596
  multiDragElements.forEach(function(multiDragElement, i) {
2597
- data += (!i ? "" : ", ") + multiDragElement.textContent;
2597
+ data4 += (!i ? "" : ", ") + multiDragElement.textContent;
2598
2598
  });
2599
2599
  } else {
2600
- data = dragEl2.textContent;
2600
+ data4 = dragEl2.textContent;
2601
2601
  }
2602
- dataTransfer.setData("Text", data);
2602
+ dataTransfer.setData("Text", data4);
2603
2603
  }
2604
2604
  };
2605
2605
  }
@@ -2891,14 +2891,14 @@ function MultiDragPlugin() {
2891
2891
  multiDragIndex++;
2892
2892
  });
2893
2893
  if (oldIndex2 === index(dragEl$1)) {
2894
- var update = false;
2894
+ var update2 = false;
2895
2895
  multiDragElements.forEach(function(multiDragElement) {
2896
2896
  if (multiDragElement.sortableIndex !== index(multiDragElement)) {
2897
- update = true;
2897
+ update2 = true;
2898
2898
  return;
2899
2899
  }
2900
2900
  });
2901
- if (update) {
2901
+ if (update2) {
2902
2902
  dispatchSortableEvent("update");
2903
2903
  }
2904
2904
  }
@@ -3014,7 +3014,7 @@ function MultiDragPlugin() {
3014
3014
  });
3015
3015
  });
3016
3016
  return {
3017
- items: _toConsumableArray(multiDragElements),
3017
+ items: _toConsumableArray$1(multiDragElements),
3018
3018
  clones: [].concat(multiDragClones),
3019
3019
  oldIndicies,
3020
3020
  newIndicies
@@ -3071,9 +3071,9 @@ const sortable_esm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.define
3071
3071
  }, Symbol.toStringTag, { value: "Module" }));
3072
3072
  const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
3073
3073
  (function(module, exports) {
3074
- (function webpackUniversalModuleDefinition(root, factory) {
3074
+ (function webpackUniversalModuleDefinition(root2, factory) {
3075
3075
  module.exports = factory(require$$0);
3076
- })(typeof self !== "undefined" ? self : commonjsGlobal, function(__WEBPACK_EXTERNAL_MODULE_a352__) {
3076
+ })(typeof self !== "undefined" ? self : commonjsGlobal$1, function(__WEBPACK_EXTERNAL_MODULE_a352__) {
3077
3077
  return (
3078
3078
  /******/
3079
3079
  function(modules) {
@@ -3415,9 +3415,9 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
3415
3415
  "230e": (
3416
3416
  /***/
3417
3417
  function(module2, exports2, __webpack_require__) {
3418
- var isObject = __webpack_require__("d3f4");
3418
+ var isObject3 = __webpack_require__("d3f4");
3419
3419
  var document2 = __webpack_require__("7726").document;
3420
- var is2 = isObject(document2) && isObject(document2.createElement);
3420
+ var is2 = isObject3(document2) && isObject3(document2.createElement);
3421
3421
  module2.exports = function(it) {
3422
3422
  return is2 ? document2.createElement(it) : {};
3423
3423
  };
@@ -3898,9 +3898,9 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
3898
3898
  "69a8": (
3899
3899
  /***/
3900
3900
  function(module2, exports2) {
3901
- var hasOwnProperty = {}.hasOwnProperty;
3901
+ var hasOwnProperty2 = {}.hasOwnProperty;
3902
3902
  module2.exports = function(it, key) {
3903
- return hasOwnProperty.call(it, key);
3903
+ return hasOwnProperty2.call(it, key);
3904
3904
  };
3905
3905
  }
3906
3906
  ),
@@ -3908,16 +3908,16 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
3908
3908
  "6a99": (
3909
3909
  /***/
3910
3910
  function(module2, exports2, __webpack_require__) {
3911
- var isObject = __webpack_require__("d3f4");
3911
+ var isObject3 = __webpack_require__("d3f4");
3912
3912
  module2.exports = function(it, S) {
3913
- if (!isObject(it))
3913
+ if (!isObject3(it))
3914
3914
  return it;
3915
3915
  var fn, val;
3916
- if (S && typeof (fn = it.toString) == "function" && !isObject(val = fn.call(it)))
3916
+ if (S && typeof (fn = it.toString) == "function" && !isObject3(val = fn.call(it)))
3917
3917
  return val;
3918
- if (typeof (fn = it.valueOf) == "function" && !isObject(val = fn.call(it)))
3918
+ if (typeof (fn = it.valueOf) == "function" && !isObject3(val = fn.call(it)))
3919
3919
  return val;
3920
- if (!S && typeof (fn = it.toString) == "function" && !isObject(val = fn.call(it)))
3920
+ if (!S && typeof (fn = it.toString) == "function" && !isObject3(val = fn.call(it)))
3921
3921
  return val;
3922
3922
  throw TypeError("Can't convert object to primitive value");
3923
3923
  };
@@ -4257,12 +4257,12 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4257
4257
  "aae3": (
4258
4258
  /***/
4259
4259
  function(module2, exports2, __webpack_require__) {
4260
- var isObject = __webpack_require__("d3f4");
4260
+ var isObject3 = __webpack_require__("d3f4");
4261
4261
  var cof = __webpack_require__("2d95");
4262
4262
  var MATCH = __webpack_require__("2b4c")("match");
4263
4263
  module2.exports = function(it) {
4264
4264
  var isRegExp;
4265
- return isObject(it) && ((isRegExp = it[MATCH]) !== void 0 ? !!isRegExp : cof(it) == "RegExp");
4265
+ return isObject3(it) && ((isRegExp = it[MATCH]) !== void 0 ? !!isRegExp : cof(it) == "RegExp");
4266
4266
  };
4267
4267
  }
4268
4268
  ),
@@ -4519,9 +4519,9 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4519
4519
  "cb7c": (
4520
4520
  /***/
4521
4521
  function(module2, exports2, __webpack_require__) {
4522
- var isObject = __webpack_require__("d3f4");
4522
+ var isObject3 = __webpack_require__("d3f4");
4523
4523
  module2.exports = function(it) {
4524
- if (!isObject(it))
4524
+ if (!isObject3(it))
4525
4525
  throw TypeError(it + " is not an object!");
4526
4526
  return it;
4527
4527
  };
@@ -4692,11 +4692,11 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4692
4692
  __webpack_require__("ac6a");
4693
4693
  __webpack_require__("cadf");
4694
4694
  __webpack_require__("456d");
4695
- function _arrayWithHoles(arr) {
4695
+ function _arrayWithHoles2(arr) {
4696
4696
  if (Array.isArray(arr))
4697
4697
  return arr;
4698
4698
  }
4699
- function _iterableToArrayLimit(arr, i) {
4699
+ function _iterableToArrayLimit2(arr, i) {
4700
4700
  if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr)))
4701
4701
  return;
4702
4702
  var _arr = [];
@@ -4723,7 +4723,7 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4723
4723
  }
4724
4724
  return _arr;
4725
4725
  }
4726
- function _arrayLikeToArray(arr, len) {
4726
+ function _arrayLikeToArray2(arr, len) {
4727
4727
  if (len == null || len > arr.length)
4728
4728
  len = arr.length;
4729
4729
  for (var i = 0, arr2 = new Array(len); i < len; i++) {
@@ -4731,30 +4731,30 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4731
4731
  }
4732
4732
  return arr2;
4733
4733
  }
4734
- function _unsupportedIterableToArray(o, minLen) {
4734
+ function _unsupportedIterableToArray2(o, minLen) {
4735
4735
  if (!o)
4736
4736
  return;
4737
4737
  if (typeof o === "string")
4738
- return _arrayLikeToArray(o, minLen);
4738
+ return _arrayLikeToArray2(o, minLen);
4739
4739
  var n = Object.prototype.toString.call(o).slice(8, -1);
4740
4740
  if (n === "Object" && o.constructor)
4741
4741
  n = o.constructor.name;
4742
4742
  if (n === "Map" || n === "Set")
4743
4743
  return Array.from(o);
4744
4744
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
4745
- return _arrayLikeToArray(o, minLen);
4745
+ return _arrayLikeToArray2(o, minLen);
4746
4746
  }
4747
- function _nonIterableRest() {
4747
+ function _nonIterableRest2() {
4748
4748
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4749
4749
  }
4750
- function _slicedToArray(arr, i) {
4751
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
4750
+ function _slicedToArray2(arr, i) {
4751
+ return _arrayWithHoles2(arr) || _iterableToArrayLimit2(arr, i) || _unsupportedIterableToArray2(arr, i) || _nonIterableRest2();
4752
4752
  }
4753
4753
  __webpack_require__("6762");
4754
4754
  __webpack_require__("2fdb");
4755
4755
  function _arrayWithoutHoles2(arr) {
4756
4756
  if (Array.isArray(arr))
4757
- return _arrayLikeToArray(arr);
4757
+ return _arrayLikeToArray2(arr);
4758
4758
  }
4759
4759
  function _iterableToArray2(iter) {
4760
4760
  if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter))
@@ -4764,7 +4764,7 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4764
4764
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4765
4765
  }
4766
4766
  function _toConsumableArray2(arr) {
4767
- return _arrayWithoutHoles2(arr) || _iterableToArray2(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread2();
4767
+ return _arrayWithoutHoles2(arr) || _iterableToArray2(arr) || _unsupportedIterableToArray2(arr) || _nonIterableSpread2();
4768
4768
  }
4769
4769
  var external_commonjs_sortablejs_commonjs2_sortablejs_amd_sortablejs_root_Sortable_ = __webpack_require__("a352");
4770
4770
  var external_commonjs_sortablejs_commonjs2_sortablejs_amd_sortablejs_root_Sortable_default = /* @__PURE__ */ __webpack_require__.n(external_commonjs_sortablejs_commonjs2_sortablejs_amd_sortablejs_root_Sortable_);
@@ -4819,7 +4819,7 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4819
4819
  if (!slots || slots.length !== 1) {
4820
4820
  return false;
4821
4821
  }
4822
- var _slots = _slicedToArray(slots, 1), componentOptions = _slots[0].componentOptions;
4822
+ var _slots = _slicedToArray2(slots, 1), componentOptions = _slots[0].componentOptions;
4823
4823
  if (!componentOptions) {
4824
4824
  return false;
4825
4825
  }
@@ -4849,7 +4849,7 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4849
4849
  }
4850
4850
  function getComponentAttributes($attrs, componentData) {
4851
4851
  var attributes = null;
4852
- var update = function update2(name, value) {
4852
+ var update2 = function update3(name, value) {
4853
4853
  attributes = buildAttribute(attributes, name, value);
4854
4854
  };
4855
4855
  var attrs = Object.keys($attrs).filter(function(key) {
@@ -4858,13 +4858,13 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4858
4858
  res[key] = $attrs[key];
4859
4859
  return res;
4860
4860
  }, {});
4861
- update("attrs", attrs);
4861
+ update2("attrs", attrs);
4862
4862
  if (!componentData) {
4863
4863
  return attributes;
4864
4864
  }
4865
4865
  var on2 = componentData.on, props2 = componentData.props, componentDataAttrs = componentData.attrs;
4866
- update("on", on2);
4867
- update("props", props2);
4866
+ update2("on", on2);
4867
+ update2("props", props2);
4868
4868
  Object.assign(attributes.attrs, componentDataAttrs);
4869
4869
  return attributes;
4870
4870
  }
@@ -4892,7 +4892,7 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4892
4892
  },
4893
4893
  clone: {
4894
4894
  type: Function,
4895
- default: function _default(original) {
4895
+ default: function _default2(original) {
4896
4896
  return original;
4897
4897
  }
4898
4898
  },
@@ -4918,13 +4918,13 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4918
4918
  name: "draggable",
4919
4919
  inheritAttrs: false,
4920
4920
  props,
4921
- data: function data() {
4921
+ data: function data4() {
4922
4922
  return {
4923
4923
  transitionMode: false,
4924
4924
  noneFunctionalComponentMode: false
4925
4925
  };
4926
4926
  },
4927
- render: function render4(h) {
4927
+ render: function render5(h) {
4928
4928
  var slots = this.$slots.default;
4929
4929
  this.transitionMode = vuedraggable_isTransition(slots);
4930
4930
  var _computeChildrenAndOf = computeChildrenAndOffsets(slots, this.$slots, this.$scopedSlots), children = _computeChildrenAndOf.children, headerOffset = _computeChildrenAndOf.headerOffset, footerOffset = _computeChildrenAndOf.footerOffset;
@@ -4933,7 +4933,7 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4933
4933
  var attributes = getComponentAttributes(this.$attrs, this.componentData);
4934
4934
  return h(this.getTag(), attributes, children);
4935
4935
  },
4936
- created: function created() {
4936
+ created: function created3() {
4937
4937
  if (this.list !== null && this.value !== null) {
4938
4938
  helper[
4939
4939
  "b"
@@ -4982,7 +4982,7 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4982
4982
  this._sortable = new external_commonjs_sortablejs_commonjs2_sortablejs_amd_sortablejs_root_Sortable_default.a(this.rootContainer, options);
4983
4983
  this.computeIndexes();
4984
4984
  },
4985
- beforeDestroy: function beforeDestroy() {
4985
+ beforeDestroy: function beforeDestroy3() {
4986
4986
  if (this._sortable !== void 0)
4987
4987
  this._sortable.destroy();
4988
4988
  },
@@ -4996,13 +4996,13 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4996
4996
  },
4997
4997
  watch: {
4998
4998
  options: {
4999
- handler: function handler(newOptionValue) {
4999
+ handler: function handler2(newOptionValue) {
5000
5000
  this.updateOptions(newOptionValue);
5001
5001
  },
5002
5002
  deep: true
5003
5003
  },
5004
5004
  $attrs: {
5005
- handler: function handler(newOptionValue) {
5005
+ handler: function handler2(newOptionValue) {
5006
5006
  this.updateOptions(newOptionValue);
5007
5007
  },
5008
5008
  deep: true
@@ -5085,11 +5085,11 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
5085
5085
  };
5086
5086
  this.alterList(spliceList2);
5087
5087
  },
5088
- updatePosition: function updatePosition(oldIndex2, newIndex2) {
5089
- var updatePosition2 = function updatePosition3(list) {
5088
+ updatePosition: function updatePosition2(oldIndex2, newIndex2) {
5089
+ var updatePosition3 = function updatePosition4(list) {
5090
5090
  return list.splice(newIndex2, 0, list.splice(oldIndex2, 1)[0]);
5091
5091
  };
5092
- this.alterList(updatePosition2);
5092
+ this.alterList(updatePosition3);
5093
5093
  },
5094
5094
  getRelatedContextFromMoveEvent: function getRelatedContextFromMoveEvent(_ref2) {
5095
5095
  var to = _ref2.to, related = _ref2.related;
@@ -5359,7 +5359,7 @@ __sfc_main$1.setup = (__props, __ctx) => {
5359
5359
  if (currentTable.value.every((i) => !i.initHidden)) {
5360
5360
  showColumn.value = currentTable.value.map((i) => i.prop);
5361
5361
  checkedCount.value = list.length;
5362
- checkAll.value = true;
5362
+ checkAll2.value = true;
5363
5363
  isIndeterminate.value = false;
5364
5364
  }
5365
5365
  });
@@ -5423,12 +5423,12 @@ __sfc_main$1.setup = (__props, __ctx) => {
5423
5423
  showColumn.value = currentTable.value.filter((i) => !i.initHidden).map((item) => item.prop);
5424
5424
  if (columnName.value && fields.value.length) {
5425
5425
  checkedCount.value = searchValue.filter((i) => !i.initHidden).length;
5426
- checkAll.value = checkedCount.value === searchValue.length;
5426
+ checkAll2.value = checkedCount.value === searchValue.length;
5427
5427
  isIndeterminate.value = checkedCount.value > 0 && checkedCount.value < searchValue.length;
5428
5428
  return;
5429
5429
  }
5430
5430
  checkedCount.value = showColumn.value.length;
5431
- checkAll.value = checkedCount.value === currentTable.value.length;
5431
+ checkAll2.value = checkedCount.value === currentTable.value.length;
5432
5432
  isIndeterminate.value = checkedCount.value > 0 && checkedCount.value < currentTable.value.length;
5433
5433
  };
5434
5434
  const columnName = ref("");
@@ -5444,7 +5444,7 @@ __sfc_main$1.setup = (__props, __ctx) => {
5444
5444
  setFields(searchValue);
5445
5445
  updateCheckStatus();
5446
5446
  };
5447
- const checkAll = ref(false);
5447
+ const checkAll2 = ref(false);
5448
5448
  const isIndeterminate = ref(false);
5449
5449
  const handleCheckAllChange = (v) => {
5450
5450
  if (v) {
@@ -5617,7 +5617,7 @@ __sfc_main$1.setup = (__props, __ctx) => {
5617
5617
  checkedCount,
5618
5618
  columnName,
5619
5619
  handleSearch,
5620
- checkAll,
5620
+ checkAll: checkAll2,
5621
5621
  isIndeterminate,
5622
5622
  handleCheckAllChange,
5623
5623
  handleCheckedChange,
@@ -5634,7 +5634,7 @@ __sfc_main$1.setup = (__props, __ctx) => {
5634
5634
  unChangedColumn,
5635
5635
  fixedColumn,
5636
5636
  unFixedColumn,
5637
- checkAll,
5637
+ checkAll: checkAll2,
5638
5638
  isIndeterminate,
5639
5639
  columnName,
5640
5640
  searchValue,
@@ -5859,7 +5859,7 @@ var _sfc_render$2 = function render2() {
5859
5859
  })], 2)], 1)], 1)])])]);
5860
5860
  };
5861
5861
  var _sfc_staticRenderFns$2 = [];
5862
- var __component__$2 = /* @__PURE__ */ normalizeComponent(__sfc_main$1, _sfc_render$2, _sfc_staticRenderFns$2, false, null, null, null, null);
5862
+ var __component__$2 = /* @__PURE__ */ normalizeComponent$1(__sfc_main$1, _sfc_render$2, _sfc_staticRenderFns$2, false, null, null, null, null);
5863
5863
  const ColumnCheckDrawer = __component__$2.exports;
5864
5864
  const _sfc_main = defineComponent({
5865
5865
  props: {
@@ -5877,7 +5877,7 @@ const _sfc_main = defineComponent({
5877
5877
  });
5878
5878
  const _sfc_render$1 = null;
5879
5879
  const _sfc_staticRenderFns$1 = null;
5880
- var __component__$1 = /* @__PURE__ */ normalizeComponent(_sfc_main, _sfc_render$1, _sfc_staticRenderFns$1, false, null, null, null, null);
5880
+ var __component__$1 = /* @__PURE__ */ normalizeComponent$1(_sfc_main, _sfc_render$1, _sfc_staticRenderFns$1, false, null, null, null, null);
5881
5881
  const RenderComponent = __component__$1.exports;
5882
5882
  /*!
5883
5883
  * vue-router v3.6.4
@@ -5893,249 +5893,3275 @@ function useRoute() {
5893
5893
  if (process.env.NODE_ENV !== "production") {
5894
5894
  throwNoCurrentInstance("useRoute");
5895
5895
  }
5896
- var root = getCurrentInstance$1().proxy.$root;
5897
- if (!root._$route) {
5896
+ var root2 = getCurrentInstance$1().proxy.$root;
5897
+ if (!root2._$route) {
5898
5898
  var route = effectScope(true).run(function() {
5899
- return shallowReactive(Object.assign({}, root.$router.currentRoute));
5899
+ return shallowReactive(Object.assign({}, root2.$router.currentRoute));
5900
5900
  });
5901
- root._$route = route;
5902
- root.$router.afterEach(function(to) {
5901
+ root2._$route = route;
5902
+ root2.$router.afterEach(function(to) {
5903
5903
  Object.assign(route, to);
5904
5904
  });
5905
5905
  }
5906
- return root._$route;
5906
+ return root2._$route;
5907
5907
  }
5908
- const __sfc_main = defineComponent({
5909
- name: "nf-table"
5910
- });
5911
- __sfc_main.props = {
5912
- data: {
5913
- key: "data",
5914
- required: false,
5915
- type: Array,
5916
- default: () => []
5917
- },
5918
- columns: {
5919
- key: "columns",
5920
- required: false,
5921
- type: [Array, null],
5922
- default: () => []
5923
- },
5924
- searchFormAttrs: {
5925
- key: "searchFormAttrs",
5926
- required: false,
5927
- type: null,
5928
- default: () => ({})
5929
- },
5930
- searchFormEvents: {
5931
- key: "searchFormEvents",
5932
- required: false,
5933
- type: Object,
5934
- default: () => ({})
5935
- },
5936
- tableAttrs: {
5937
- key: "tableAttrs",
5938
- required: false,
5939
- type: null,
5940
- default: () => ({})
5941
- },
5942
- tableEvents: {
5943
- key: "tableEvents",
5944
- required: false,
5945
- type: Object,
5946
- default: () => ({})
5947
- },
5948
- pageAttrs: {
5949
- key: "pageAttrs",
5950
- required: false,
5951
- type: null,
5952
- default: () => ({})
5953
- },
5954
- pageEvents: {
5955
- key: "pageEvents",
5956
- required: false,
5957
- type: Object,
5958
- default: () => ({})
5959
- },
5960
- actionBarOptList: {
5961
- key: "actionBarOptList",
5962
- required: false,
5963
- type: Array,
5964
- default: () => []
5965
- },
5966
- initSearchApi: {
5967
- key: "initSearchApi",
5968
- required: false,
5969
- type: [Boolean, null],
5970
- default: void 0
5971
- },
5972
- pageChangeSearchApi: {
5973
- key: "pageChangeSearchApi",
5974
- required: false,
5975
- type: [Boolean, null],
5976
- default: void 0
5977
- },
5978
- pageKeys: {
5979
- key: "pageKeys",
5980
- required: false,
5981
- type: Array,
5982
- default: () => ["pageNo", "pageSize"]
5983
- },
5984
- setEasyConf: {
5985
- key: "setEasyConf",
5986
- required: false,
5987
- type: Boolean,
5988
- default: false
5989
- },
5990
- detectResize: {
5991
- key: "detectResize",
5992
- required: false,
5993
- type: Boolean,
5994
- default: false
5995
- },
5996
- dragCached: {
5997
- key: "dragCached",
5998
- required: false,
5999
- type: Boolean,
6000
- default: true
6001
- },
6002
- emptyImageSize: {
6003
- key: "emptyImageSize",
6004
- required: false,
6005
- type: Number,
6006
- default: 145
6007
- },
6008
- emptyText: {
6009
- key: "emptyText",
6010
- required: false,
6011
- type: String,
6012
- default: ""
6013
- },
6014
- calHeight: {
6015
- key: "calHeight",
6016
- required: false,
6017
- type: Boolean,
6018
- default: false
6019
- },
6020
- columnEdit: {
6021
- key: "columnEdit",
6022
- required: false,
6023
- type: Boolean,
6024
- default: false
6025
- },
6026
- columnPosition: {
6027
- key: "columnPosition",
6028
- required: false,
6029
- type: String,
6030
- default: "embed"
6031
- },
6032
- checkMode: {
6033
- key: "checkMode",
6034
- required: false,
6035
- type: String,
6036
- default: "drawer"
6037
- },
6038
- priority: {
6039
- key: "priority",
6040
- required: false,
6041
- type: String,
6042
- default: "cached"
6043
- },
6044
- storageKey: {
6045
- key: "storageKey",
6046
- required: false,
6047
- type: String,
6048
- default: ""
5908
+ var _populated = false;
5909
+ var _ie, _firefox, _opera, _webkit, _chrome;
5910
+ var _ie_real_version;
5911
+ var _osx, _windows, _linux, _android;
5912
+ var _win64;
5913
+ var _iphone, _ipad, _native;
5914
+ var _mobile;
5915
+ function _populate() {
5916
+ if (_populated) {
5917
+ return;
5918
+ }
5919
+ _populated = true;
5920
+ var uas = navigator.userAgent;
5921
+ var agent = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(uas);
5922
+ var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);
5923
+ _iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
5924
+ _ipad = /\b(iP[ao]d)/.exec(uas);
5925
+ _android = /Android/i.exec(uas);
5926
+ _native = /FBAN\/\w+;/i.exec(uas);
5927
+ _mobile = /Mobile/i.exec(uas);
5928
+ _win64 = !!/Win64/.exec(uas);
5929
+ if (agent) {
5930
+ _ie = agent[1] ? parseFloat(agent[1]) : agent[5] ? parseFloat(agent[5]) : NaN;
5931
+ if (_ie && document && document.documentMode) {
5932
+ _ie = document.documentMode;
5933
+ }
5934
+ var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
5935
+ _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;
5936
+ _firefox = agent[2] ? parseFloat(agent[2]) : NaN;
5937
+ _opera = agent[3] ? parseFloat(agent[3]) : NaN;
5938
+ _webkit = agent[4] ? parseFloat(agent[4]) : NaN;
5939
+ if (_webkit) {
5940
+ agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
5941
+ _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
5942
+ } else {
5943
+ _chrome = NaN;
5944
+ }
5945
+ } else {
5946
+ _ie = _firefox = _opera = _chrome = _webkit = NaN;
5947
+ }
5948
+ if (os) {
5949
+ if (os[1]) {
5950
+ var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);
5951
+ _osx = ver ? parseFloat(ver[1].replace("_", ".")) : true;
5952
+ } else {
5953
+ _osx = false;
5954
+ }
5955
+ _windows = !!os[2];
5956
+ _linux = !!os[3];
5957
+ } else {
5958
+ _osx = _windows = _linux = false;
5959
+ }
5960
+ }
5961
+ var UserAgent_DEPRECATED$1 = {
5962
+ /**
5963
+ * Check if the UA is Internet Explorer.
5964
+ *
5965
+ *
5966
+ * @return float|NaN Version number (if match) or NaN.
5967
+ */
5968
+ ie: function() {
5969
+ return _populate() || _ie;
6049
5970
  },
6050
- searchFormStorageKey: {
6051
- key: "searchFormStorageKey",
6052
- required: false,
6053
- type: String,
6054
- default: ""
5971
+ /**
5972
+ * Check if we're in Internet Explorer compatibility mode.
5973
+ *
5974
+ * @return bool true if in compatibility mode, false if
5975
+ * not compatibility mode or not ie
5976
+ */
5977
+ ieCompatibilityMode: function() {
5978
+ return _populate() || _ie_real_version > _ie;
6055
5979
  },
6056
- showColumn: {
6057
- key: "showColumn",
6058
- required: false,
6059
- type: Array,
6060
- default: void 0
5980
+ /**
5981
+ * Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we
5982
+ * only need this because Skype can't handle 64-bit IE yet. We need to remove
5983
+ * this when we don't need it -- tracked by #601957.
5984
+ */
5985
+ ie64: function() {
5986
+ return UserAgent_DEPRECATED$1.ie() && _win64;
6061
5987
  },
6062
- selectEmptyWarningTips: {
6063
- key: "selectEmptyWarningTips",
6064
- required: false,
6065
- type: String,
6066
- default: "请选择至少一个选项"
5988
+ /**
5989
+ * Check if the UA is Firefox.
5990
+ *
5991
+ *
5992
+ * @return float|NaN Version number (if match) or NaN.
5993
+ */
5994
+ firefox: function() {
5995
+ return _populate() || _firefox;
6067
5996
  },
6068
- columnDisplayBtnClass: {
6069
- key: "columnDisplayBtnClass",
6070
- required: false,
6071
- type: String,
6072
- default: ""
5997
+ /**
5998
+ * Check if the UA is Opera.
5999
+ *
6000
+ *
6001
+ * @return float|NaN Version number (if match) or NaN.
6002
+ */
6003
+ opera: function() {
6004
+ return _populate() || _opera;
6073
6005
  },
6074
- columnDisplayBtnIcon: {
6075
- key: "columnDisplayBtnIcon",
6076
- required: false,
6077
- type: String,
6078
- default: "el-icon-plus"
6006
+ /**
6007
+ * Check if the UA is WebKit.
6008
+ *
6009
+ *
6010
+ * @return float|NaN Version number (if match) or NaN.
6011
+ */
6012
+ webkit: function() {
6013
+ return _populate() || _webkit;
6079
6014
  },
6080
- columnDisplayBtnType: {
6081
- key: "columnDisplayBtnType",
6082
- required: false,
6083
- type: String,
6084
- default: "primary"
6015
+ /**
6016
+ * For Push
6017
+ * WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
6018
+ */
6019
+ safari: function() {
6020
+ return UserAgent_DEPRECATED$1.webkit();
6085
6021
  },
6086
- columnDisplayBtnPlain: {
6087
- key: "columnDisplayBtnPlain",
6088
- required: false,
6089
- type: Boolean,
6090
- default: true
6022
+ /**
6023
+ * Check if the UA is a Chrome browser.
6024
+ *
6025
+ *
6026
+ * @return float|NaN Version number (if match) or NaN.
6027
+ */
6028
+ chrome: function() {
6029
+ return _populate() || _chrome;
6091
6030
  },
6092
- columnDisplayBtnSize: {
6093
- key: "columnDisplayBtnSize",
6094
- required: false,
6095
- type: String,
6096
- default: "mini"
6031
+ /**
6032
+ * Check if the user is running Windows.
6033
+ *
6034
+ * @return bool `true' if the user's OS is Windows.
6035
+ */
6036
+ windows: function() {
6037
+ return _populate() || _windows;
6097
6038
  },
6098
- columnDisplayBtnRound: {
6099
- key: "columnDisplayBtnRound",
6100
- required: false,
6101
- type: Boolean,
6102
- default: false
6039
+ /**
6040
+ * Check if the user is running Mac OS X.
6041
+ *
6042
+ * @return float|bool Returns a float if a version number is detected,
6043
+ * otherwise true/false.
6044
+ */
6045
+ osx: function() {
6046
+ return _populate() || _osx;
6103
6047
  },
6104
- columnDisplayBtnCircle: {
6105
- key: "columnDisplayBtnCircle",
6106
- required: false,
6107
- type: Boolean,
6108
- default: false
6048
+ /**
6049
+ * Check if the user is running Linux.
6050
+ *
6051
+ * @return bool `true' if the user's OS is some flavor of Linux.
6052
+ */
6053
+ linux: function() {
6054
+ return _populate() || _linux;
6109
6055
  },
6110
- columnDisplayBtnLoading: {
6111
- key: "columnDisplayBtnLoading",
6112
- required: false,
6113
- type: Boolean,
6114
- default: false
6056
+ /**
6057
+ * Check if the user is running on an iPhone or iPod platform.
6058
+ *
6059
+ * @return bool `true' if the user is running some flavor of the
6060
+ * iPhone OS.
6061
+ */
6062
+ iphone: function() {
6063
+ return _populate() || _iphone;
6115
6064
  },
6116
- columnDisplayBtnDisabled: {
6117
- key: "columnDisplayBtnDisabled",
6118
- required: false,
6119
- type: Boolean,
6120
- default: false
6065
+ mobile: function() {
6066
+ return _populate() || _iphone || _ipad || _android || _mobile;
6121
6067
  },
6122
- columnDisplayBtnText: {
6123
- key: "columnDisplayBtnText",
6124
- required: false,
6125
- type: String,
6126
- default: "设置列表字段"
6068
+ nativeApp: function() {
6069
+ return _populate() || _native;
6127
6070
  },
6128
- columnCheckTitle: {
6129
- key: "columnCheckTitle",
6130
- required: false,
6131
- type: String,
6132
- default: "设置显示字段"
6071
+ android: function() {
6072
+ return _populate() || _android;
6133
6073
  },
6134
- columnCheckCancelButtonText: {
6135
- key: "columnCheckCancelButtonText",
6136
- required: false,
6137
- type: String,
6138
- default: "取消"
6074
+ ipad: function() {
6075
+ return _populate() || _ipad;
6076
+ }
6077
+ };
6078
+ var UserAgent_DEPRECATED_1 = UserAgent_DEPRECATED$1;
6079
+ var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
6080
+ var ExecutionEnvironment$1 = {
6081
+ canUseDOM,
6082
+ canUseWorkers: typeof Worker !== "undefined",
6083
+ canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
6084
+ canUseViewport: canUseDOM && !!window.screen,
6085
+ isInWorker: !canUseDOM
6086
+ // For now, this is true - might change in the future.
6087
+ };
6088
+ var ExecutionEnvironment_1 = ExecutionEnvironment$1;
6089
+ var ExecutionEnvironment = ExecutionEnvironment_1;
6090
+ var useHasFeature;
6091
+ if (ExecutionEnvironment.canUseDOM) {
6092
+ useHasFeature = document.implementation && document.implementation.hasFeature && // always returns true in newer browsers as per the standard.
6093
+ // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
6094
+ document.implementation.hasFeature("", "") !== true;
6095
+ }
6096
+ /**
6097
+ * Checks if an event is supported in the current execution environment.
6098
+ *
6099
+ * NOTE: This will not work correctly for non-generic events such as `change`,
6100
+ * `reset`, `load`, `error`, and `select`.
6101
+ *
6102
+ * Borrows from Modernizr.
6103
+ *
6104
+ * @param {string} eventNameSuffix Event name, e.g. "click".
6105
+ * @param {?boolean} capture Check if the capture phase is supported.
6106
+ * @return {boolean} True if the event is supported.
6107
+ * @internal
6108
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
6109
+ */
6110
+ function isEventSupported$1(eventNameSuffix, capture) {
6111
+ if (!ExecutionEnvironment.canUseDOM || capture && !("addEventListener" in document)) {
6112
+ return false;
6113
+ }
6114
+ var eventName = "on" + eventNameSuffix;
6115
+ var isSupported = eventName in document;
6116
+ if (!isSupported) {
6117
+ var element = document.createElement("div");
6118
+ element.setAttribute(eventName, "return;");
6119
+ isSupported = typeof element[eventName] === "function";
6120
+ }
6121
+ if (!isSupported && useHasFeature && eventNameSuffix === "wheel") {
6122
+ isSupported = document.implementation.hasFeature("Events.wheel", "3.0");
6123
+ }
6124
+ return isSupported;
6125
+ }
6126
+ var isEventSupported_1 = isEventSupported$1;
6127
+ var UserAgent_DEPRECATED = UserAgent_DEPRECATED_1;
6128
+ var isEventSupported = isEventSupported_1;
6129
+ var PIXEL_STEP = 10;
6130
+ var LINE_HEIGHT = 40;
6131
+ var PAGE_HEIGHT = 800;
6132
+ function normalizeWheel$2(event) {
6133
+ var sX = 0, sY = 0, pX = 0, pY = 0;
6134
+ if ("detail" in event) {
6135
+ sY = event.detail;
6136
+ }
6137
+ if ("wheelDelta" in event) {
6138
+ sY = -event.wheelDelta / 120;
6139
+ }
6140
+ if ("wheelDeltaY" in event) {
6141
+ sY = -event.wheelDeltaY / 120;
6142
+ }
6143
+ if ("wheelDeltaX" in event) {
6144
+ sX = -event.wheelDeltaX / 120;
6145
+ }
6146
+ if ("axis" in event && event.axis === event.HORIZONTAL_AXIS) {
6147
+ sX = sY;
6148
+ sY = 0;
6149
+ }
6150
+ pX = sX * PIXEL_STEP;
6151
+ pY = sY * PIXEL_STEP;
6152
+ if ("deltaY" in event) {
6153
+ pY = event.deltaY;
6154
+ }
6155
+ if ("deltaX" in event) {
6156
+ pX = event.deltaX;
6157
+ }
6158
+ if ((pX || pY) && event.deltaMode) {
6159
+ if (event.deltaMode == 1) {
6160
+ pX *= LINE_HEIGHT;
6161
+ pY *= LINE_HEIGHT;
6162
+ } else {
6163
+ pX *= PAGE_HEIGHT;
6164
+ pY *= PAGE_HEIGHT;
6165
+ }
6166
+ }
6167
+ if (pX && !sX) {
6168
+ sX = pX < 1 ? -1 : 1;
6169
+ }
6170
+ if (pY && !sY) {
6171
+ sY = pY < 1 ? -1 : 1;
6172
+ }
6173
+ return {
6174
+ spinX: sX,
6175
+ spinY: sY,
6176
+ pixelX: pX,
6177
+ pixelY: pY
6178
+ };
6179
+ }
6180
+ normalizeWheel$2.getEventType = function() {
6181
+ return UserAgent_DEPRECATED.firefox() ? "DOMMouseScroll" : isEventSupported("wheel") ? "wheel" : "mousewheel";
6182
+ };
6183
+ var normalizeWheel_1 = normalizeWheel$2;
6184
+ var normalizeWheel = normalizeWheel_1;
6185
+ const normalizeWheel$1 = /* @__PURE__ */ getDefaultExportFromCjs(normalizeWheel);
6186
+ const getValueByPath = function(object, prop) {
6187
+ prop = prop || "";
6188
+ const paths = prop.split(".");
6189
+ let current = object;
6190
+ let result = null;
6191
+ for (let i = 0, j = paths.length; i < j; i++) {
6192
+ const path = paths[i];
6193
+ if (!current)
6194
+ break;
6195
+ if (i === j - 1) {
6196
+ result = current[path];
6197
+ break;
6198
+ }
6199
+ current = current[path];
6200
+ }
6201
+ return result;
6202
+ };
6203
+ function _iterableToArrayLimit(r, l) {
6204
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
6205
+ if (null != t) {
6206
+ var e, n, i, u, a = [], f = true, o = false;
6207
+ try {
6208
+ if (i = (t = t.call(r)).next, 0 === l) {
6209
+ if (Object(t) !== t)
6210
+ return;
6211
+ f = false;
6212
+ } else
6213
+ for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true)
6214
+ ;
6215
+ } catch (r2) {
6216
+ o = true, n = r2;
6217
+ } finally {
6218
+ try {
6219
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u))
6220
+ return;
6221
+ } finally {
6222
+ if (o)
6223
+ throw n;
6224
+ }
6225
+ }
6226
+ return a;
6227
+ }
6228
+ }
6229
+ function _regeneratorRuntime() {
6230
+ _regeneratorRuntime = function() {
6231
+ return e;
6232
+ };
6233
+ var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function(t2, e2, r2) {
6234
+ t2[e2] = r2.value;
6235
+ }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag";
6236
+ function define(t2, e2, r2) {
6237
+ return Object.defineProperty(t2, e2, {
6238
+ value: r2,
6239
+ enumerable: true,
6240
+ configurable: true,
6241
+ writable: true
6242
+ }), t2[e2];
6243
+ }
6244
+ try {
6245
+ define({}, "");
6246
+ } catch (t2) {
6247
+ define = function(t3, e2, r2) {
6248
+ return t3[e2] = r2;
6249
+ };
6250
+ }
6251
+ function wrap(t2, e2, r2, n2) {
6252
+ var i2 = e2 && e2.prototype instanceof Generator ? e2 : Generator, a2 = Object.create(i2.prototype), c2 = new Context(n2 || []);
6253
+ return o(a2, "_invoke", {
6254
+ value: makeInvokeMethod(t2, r2, c2)
6255
+ }), a2;
6256
+ }
6257
+ function tryCatch(t2, e2, r2) {
6258
+ try {
6259
+ return {
6260
+ type: "normal",
6261
+ arg: t2.call(e2, r2)
6262
+ };
6263
+ } catch (t3) {
6264
+ return {
6265
+ type: "throw",
6266
+ arg: t3
6267
+ };
6268
+ }
6269
+ }
6270
+ e.wrap = wrap;
6271
+ var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {};
6272
+ function Generator() {
6273
+ }
6274
+ function GeneratorFunction() {
6275
+ }
6276
+ function GeneratorFunctionPrototype() {
6277
+ }
6278
+ var p = {};
6279
+ define(p, a, function() {
6280
+ return this;
6281
+ });
6282
+ var d = Object.getPrototypeOf, v = d && d(d(values([])));
6283
+ v && v !== r && n.call(v, a) && (p = v);
6284
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
6285
+ function defineIteratorMethods(t2) {
6286
+ ["next", "throw", "return"].forEach(function(e2) {
6287
+ define(t2, e2, function(t3) {
6288
+ return this._invoke(e2, t3);
6289
+ });
6290
+ });
6291
+ }
6292
+ function AsyncIterator(t2, e2) {
6293
+ function invoke(r3, o2, i2, a2) {
6294
+ var c2 = tryCatch(t2[r3], t2, o2);
6295
+ if ("throw" !== c2.type) {
6296
+ var u2 = c2.arg, h2 = u2.value;
6297
+ return h2 && "object" == typeof h2 && n.call(h2, "__await") ? e2.resolve(h2.__await).then(function(t3) {
6298
+ invoke("next", t3, i2, a2);
6299
+ }, function(t3) {
6300
+ invoke("throw", t3, i2, a2);
6301
+ }) : e2.resolve(h2).then(function(t3) {
6302
+ u2.value = t3, i2(u2);
6303
+ }, function(t3) {
6304
+ return invoke("throw", t3, i2, a2);
6305
+ });
6306
+ }
6307
+ a2(c2.arg);
6308
+ }
6309
+ var r2;
6310
+ o(this, "_invoke", {
6311
+ value: function(t3, n2) {
6312
+ function callInvokeWithMethodAndArg() {
6313
+ return new e2(function(e3, r3) {
6314
+ invoke(t3, n2, e3, r3);
6315
+ });
6316
+ }
6317
+ return r2 = r2 ? r2.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
6318
+ }
6319
+ });
6320
+ }
6321
+ function makeInvokeMethod(e2, r2, n2) {
6322
+ var o2 = h;
6323
+ return function(i2, a2) {
6324
+ if (o2 === f)
6325
+ throw new Error("Generator is already running");
6326
+ if (o2 === s) {
6327
+ if ("throw" === i2)
6328
+ throw a2;
6329
+ return {
6330
+ value: t,
6331
+ done: true
6332
+ };
6333
+ }
6334
+ for (n2.method = i2, n2.arg = a2; ; ) {
6335
+ var c2 = n2.delegate;
6336
+ if (c2) {
6337
+ var u2 = maybeInvokeDelegate(c2, n2);
6338
+ if (u2) {
6339
+ if (u2 === y)
6340
+ continue;
6341
+ return u2;
6342
+ }
6343
+ }
6344
+ if ("next" === n2.method)
6345
+ n2.sent = n2._sent = n2.arg;
6346
+ else if ("throw" === n2.method) {
6347
+ if (o2 === h)
6348
+ throw o2 = s, n2.arg;
6349
+ n2.dispatchException(n2.arg);
6350
+ } else
6351
+ "return" === n2.method && n2.abrupt("return", n2.arg);
6352
+ o2 = f;
6353
+ var p2 = tryCatch(e2, r2, n2);
6354
+ if ("normal" === p2.type) {
6355
+ if (o2 = n2.done ? s : l, p2.arg === y)
6356
+ continue;
6357
+ return {
6358
+ value: p2.arg,
6359
+ done: n2.done
6360
+ };
6361
+ }
6362
+ "throw" === p2.type && (o2 = s, n2.method = "throw", n2.arg = p2.arg);
6363
+ }
6364
+ };
6365
+ }
6366
+ function maybeInvokeDelegate(e2, r2) {
6367
+ var n2 = r2.method, o2 = e2.iterator[n2];
6368
+ if (o2 === t)
6369
+ return r2.delegate = null, "throw" === n2 && e2.iterator.return && (r2.method = "return", r2.arg = t, maybeInvokeDelegate(e2, r2), "throw" === r2.method) || "return" !== n2 && (r2.method = "throw", r2.arg = new TypeError("The iterator does not provide a '" + n2 + "' method")), y;
6370
+ var i2 = tryCatch(o2, e2.iterator, r2.arg);
6371
+ if ("throw" === i2.type)
6372
+ return r2.method = "throw", r2.arg = i2.arg, r2.delegate = null, y;
6373
+ var a2 = i2.arg;
6374
+ return a2 ? a2.done ? (r2[e2.resultName] = a2.value, r2.next = e2.nextLoc, "return" !== r2.method && (r2.method = "next", r2.arg = t), r2.delegate = null, y) : a2 : (r2.method = "throw", r2.arg = new TypeError("iterator result is not an object"), r2.delegate = null, y);
6375
+ }
6376
+ function pushTryEntry(t2) {
6377
+ var e2 = {
6378
+ tryLoc: t2[0]
6379
+ };
6380
+ 1 in t2 && (e2.catchLoc = t2[1]), 2 in t2 && (e2.finallyLoc = t2[2], e2.afterLoc = t2[3]), this.tryEntries.push(e2);
6381
+ }
6382
+ function resetTryEntry(t2) {
6383
+ var e2 = t2.completion || {};
6384
+ e2.type = "normal", delete e2.arg, t2.completion = e2;
6385
+ }
6386
+ function Context(t2) {
6387
+ this.tryEntries = [{
6388
+ tryLoc: "root"
6389
+ }], t2.forEach(pushTryEntry, this), this.reset(true);
6390
+ }
6391
+ function values(e2) {
6392
+ if (e2 || "" === e2) {
6393
+ var r2 = e2[a];
6394
+ if (r2)
6395
+ return r2.call(e2);
6396
+ if ("function" == typeof e2.next)
6397
+ return e2;
6398
+ if (!isNaN(e2.length)) {
6399
+ var o2 = -1, i2 = function next() {
6400
+ for (; ++o2 < e2.length; )
6401
+ if (n.call(e2, o2))
6402
+ return next.value = e2[o2], next.done = false, next;
6403
+ return next.value = t, next.done = true, next;
6404
+ };
6405
+ return i2.next = i2;
6406
+ }
6407
+ }
6408
+ throw new TypeError(typeof e2 + " is not iterable");
6409
+ }
6410
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
6411
+ value: GeneratorFunctionPrototype,
6412
+ configurable: true
6413
+ }), o(GeneratorFunctionPrototype, "constructor", {
6414
+ value: GeneratorFunction,
6415
+ configurable: true
6416
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function(t2) {
6417
+ var e2 = "function" == typeof t2 && t2.constructor;
6418
+ return !!e2 && (e2 === GeneratorFunction || "GeneratorFunction" === (e2.displayName || e2.name));
6419
+ }, e.mark = function(t2) {
6420
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t2, GeneratorFunctionPrototype) : (t2.__proto__ = GeneratorFunctionPrototype, define(t2, u, "GeneratorFunction")), t2.prototype = Object.create(g), t2;
6421
+ }, e.awrap = function(t2) {
6422
+ return {
6423
+ __await: t2
6424
+ };
6425
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function() {
6426
+ return this;
6427
+ }), e.AsyncIterator = AsyncIterator, e.async = function(t2, r2, n2, o2, i2) {
6428
+ void 0 === i2 && (i2 = Promise);
6429
+ var a2 = new AsyncIterator(wrap(t2, r2, n2, o2), i2);
6430
+ return e.isGeneratorFunction(r2) ? a2 : a2.next().then(function(t3) {
6431
+ return t3.done ? t3.value : a2.next();
6432
+ });
6433
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function() {
6434
+ return this;
6435
+ }), define(g, "toString", function() {
6436
+ return "[object Generator]";
6437
+ }), e.keys = function(t2) {
6438
+ var e2 = Object(t2), r2 = [];
6439
+ for (var n2 in e2)
6440
+ r2.push(n2);
6441
+ return r2.reverse(), function next() {
6442
+ for (; r2.length; ) {
6443
+ var t3 = r2.pop();
6444
+ if (t3 in e2)
6445
+ return next.value = t3, next.done = false, next;
6446
+ }
6447
+ return next.done = true, next;
6448
+ };
6449
+ }, e.values = values, Context.prototype = {
6450
+ constructor: Context,
6451
+ reset: function(e2) {
6452
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = false, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e2)
6453
+ for (var r2 in this)
6454
+ "t" === r2.charAt(0) && n.call(this, r2) && !isNaN(+r2.slice(1)) && (this[r2] = t);
6455
+ },
6456
+ stop: function() {
6457
+ this.done = true;
6458
+ var t2 = this.tryEntries[0].completion;
6459
+ if ("throw" === t2.type)
6460
+ throw t2.arg;
6461
+ return this.rval;
6462
+ },
6463
+ dispatchException: function(e2) {
6464
+ if (this.done)
6465
+ throw e2;
6466
+ var r2 = this;
6467
+ function handle(n2, o3) {
6468
+ return a2.type = "throw", a2.arg = e2, r2.next = n2, o3 && (r2.method = "next", r2.arg = t), !!o3;
6469
+ }
6470
+ for (var o2 = this.tryEntries.length - 1; o2 >= 0; --o2) {
6471
+ var i2 = this.tryEntries[o2], a2 = i2.completion;
6472
+ if ("root" === i2.tryLoc)
6473
+ return handle("end");
6474
+ if (i2.tryLoc <= this.prev) {
6475
+ var c2 = n.call(i2, "catchLoc"), u2 = n.call(i2, "finallyLoc");
6476
+ if (c2 && u2) {
6477
+ if (this.prev < i2.catchLoc)
6478
+ return handle(i2.catchLoc, true);
6479
+ if (this.prev < i2.finallyLoc)
6480
+ return handle(i2.finallyLoc);
6481
+ } else if (c2) {
6482
+ if (this.prev < i2.catchLoc)
6483
+ return handle(i2.catchLoc, true);
6484
+ } else {
6485
+ if (!u2)
6486
+ throw new Error("try statement without catch or finally");
6487
+ if (this.prev < i2.finallyLoc)
6488
+ return handle(i2.finallyLoc);
6489
+ }
6490
+ }
6491
+ }
6492
+ },
6493
+ abrupt: function(t2, e2) {
6494
+ for (var r2 = this.tryEntries.length - 1; r2 >= 0; --r2) {
6495
+ var o2 = this.tryEntries[r2];
6496
+ if (o2.tryLoc <= this.prev && n.call(o2, "finallyLoc") && this.prev < o2.finallyLoc) {
6497
+ var i2 = o2;
6498
+ break;
6499
+ }
6500
+ }
6501
+ i2 && ("break" === t2 || "continue" === t2) && i2.tryLoc <= e2 && e2 <= i2.finallyLoc && (i2 = null);
6502
+ var a2 = i2 ? i2.completion : {};
6503
+ return a2.type = t2, a2.arg = e2, i2 ? (this.method = "next", this.next = i2.finallyLoc, y) : this.complete(a2);
6504
+ },
6505
+ complete: function(t2, e2) {
6506
+ if ("throw" === t2.type)
6507
+ throw t2.arg;
6508
+ return "break" === t2.type || "continue" === t2.type ? this.next = t2.arg : "return" === t2.type ? (this.rval = this.arg = t2.arg, this.method = "return", this.next = "end") : "normal" === t2.type && e2 && (this.next = e2), y;
6509
+ },
6510
+ finish: function(t2) {
6511
+ for (var e2 = this.tryEntries.length - 1; e2 >= 0; --e2) {
6512
+ var r2 = this.tryEntries[e2];
6513
+ if (r2.finallyLoc === t2)
6514
+ return this.complete(r2.completion, r2.afterLoc), resetTryEntry(r2), y;
6515
+ }
6516
+ },
6517
+ catch: function(t2) {
6518
+ for (var e2 = this.tryEntries.length - 1; e2 >= 0; --e2) {
6519
+ var r2 = this.tryEntries[e2];
6520
+ if (r2.tryLoc === t2) {
6521
+ var n2 = r2.completion;
6522
+ if ("throw" === n2.type) {
6523
+ var o2 = n2.arg;
6524
+ resetTryEntry(r2);
6525
+ }
6526
+ return o2;
6527
+ }
6528
+ }
6529
+ throw new Error("illegal catch attempt");
6530
+ },
6531
+ delegateYield: function(e2, r2, n2) {
6532
+ return this.delegate = {
6533
+ iterator: values(e2),
6534
+ resultName: r2,
6535
+ nextLoc: n2
6536
+ }, "next" === this.method && (this.arg = t), y;
6537
+ }
6538
+ }, e;
6539
+ }
6540
+ function _typeof(o) {
6541
+ "@babel/helpers - typeof";
6542
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
6543
+ return typeof o2;
6544
+ } : function(o2) {
6545
+ return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
6546
+ }, _typeof(o);
6547
+ }
6548
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
6549
+ try {
6550
+ var info = gen[key](arg);
6551
+ var value = info.value;
6552
+ } catch (error) {
6553
+ reject(error);
6554
+ return;
6555
+ }
6556
+ if (info.done) {
6557
+ resolve(value);
6558
+ } else {
6559
+ Promise.resolve(value).then(_next, _throw);
6560
+ }
6561
+ }
6562
+ function _asyncToGenerator(fn) {
6563
+ return function() {
6564
+ var self2 = this, args = arguments;
6565
+ return new Promise(function(resolve, reject) {
6566
+ var gen = fn.apply(self2, args);
6567
+ function _next(value) {
6568
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
6569
+ }
6570
+ function _throw(err) {
6571
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
6572
+ }
6573
+ _next(void 0);
6574
+ });
6575
+ };
6576
+ }
6577
+ function _slicedToArray(arr, i) {
6578
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
6579
+ }
6580
+ function _toConsumableArray(arr) {
6581
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
6582
+ }
6583
+ function _arrayWithoutHoles(arr) {
6584
+ if (Array.isArray(arr))
6585
+ return _arrayLikeToArray(arr);
6586
+ }
6587
+ function _arrayWithHoles(arr) {
6588
+ if (Array.isArray(arr))
6589
+ return arr;
6590
+ }
6591
+ function _iterableToArray(iter) {
6592
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
6593
+ return Array.from(iter);
6594
+ }
6595
+ function _unsupportedIterableToArray(o, minLen) {
6596
+ if (!o)
6597
+ return;
6598
+ if (typeof o === "string")
6599
+ return _arrayLikeToArray(o, minLen);
6600
+ var n = Object.prototype.toString.call(o).slice(8, -1);
6601
+ if (n === "Object" && o.constructor)
6602
+ n = o.constructor.name;
6603
+ if (n === "Map" || n === "Set")
6604
+ return Array.from(o);
6605
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
6606
+ return _arrayLikeToArray(o, minLen);
6607
+ }
6608
+ function _arrayLikeToArray(arr, len) {
6609
+ if (len == null || len > arr.length)
6610
+ len = arr.length;
6611
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
6612
+ arr2[i] = arr[i];
6613
+ return arr2;
6614
+ }
6615
+ function _nonIterableSpread() {
6616
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6617
+ }
6618
+ function _nonIterableRest() {
6619
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6620
+ }
6621
+ function isObject$1(value) {
6622
+ var type = typeof value;
6623
+ return value != null && (type == "object" || type == "function");
6624
+ }
6625
+ var isObject_1 = isObject$1;
6626
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
6627
+ var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
6628
+ var _freeGlobal = freeGlobal;
6629
+ var freeSelf = typeof self == "object" && self && self.Object === Object && self;
6630
+ var root = _freeGlobal || freeSelf || Function("return this")();
6631
+ var _root = root;
6632
+ var now = function() {
6633
+ return _root.Date.now();
6634
+ };
6635
+ var now_1 = now;
6636
+ var reWhitespace = /\s/;
6637
+ function trimmedEndIndex(string) {
6638
+ var index2 = string.length;
6639
+ while (index2-- && reWhitespace.test(string.charAt(index2))) {
6640
+ }
6641
+ return index2;
6642
+ }
6643
+ var _trimmedEndIndex = trimmedEndIndex;
6644
+ var reTrimStart = /^\s+/;
6645
+ function baseTrim(string) {
6646
+ return string ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
6647
+ }
6648
+ var _baseTrim = baseTrim;
6649
+ var Symbol$1 = _root.Symbol;
6650
+ var _Symbol = Symbol$1;
6651
+ var objectProto$1 = Object.prototype;
6652
+ var hasOwnProperty = objectProto$1.hasOwnProperty;
6653
+ var nativeObjectToString$1 = objectProto$1.toString;
6654
+ var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : void 0;
6655
+ function getRawTag(value) {
6656
+ var isOwn = hasOwnProperty.call(value, symToStringTag$1), tag = value[symToStringTag$1];
6657
+ try {
6658
+ value[symToStringTag$1] = void 0;
6659
+ var unmasked = true;
6660
+ } catch (e) {
6661
+ }
6662
+ var result = nativeObjectToString$1.call(value);
6663
+ if (unmasked) {
6664
+ if (isOwn) {
6665
+ value[symToStringTag$1] = tag;
6666
+ } else {
6667
+ delete value[symToStringTag$1];
6668
+ }
6669
+ }
6670
+ return result;
6671
+ }
6672
+ var _getRawTag = getRawTag;
6673
+ var objectProto = Object.prototype;
6674
+ var nativeObjectToString = objectProto.toString;
6675
+ function objectToString(value) {
6676
+ return nativeObjectToString.call(value);
6677
+ }
6678
+ var _objectToString = objectToString;
6679
+ var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
6680
+ var symToStringTag = _Symbol ? _Symbol.toStringTag : void 0;
6681
+ function baseGetTag(value) {
6682
+ if (value == null) {
6683
+ return value === void 0 ? undefinedTag : nullTag;
6684
+ }
6685
+ return symToStringTag && symToStringTag in Object(value) ? _getRawTag(value) : _objectToString(value);
6686
+ }
6687
+ var _baseGetTag = baseGetTag;
6688
+ function isObjectLike(value) {
6689
+ return value != null && typeof value == "object";
6690
+ }
6691
+ var isObjectLike_1 = isObjectLike;
6692
+ var symbolTag = "[object Symbol]";
6693
+ function isSymbol(value) {
6694
+ return typeof value == "symbol" || isObjectLike_1(value) && _baseGetTag(value) == symbolTag;
6695
+ }
6696
+ var isSymbol_1 = isSymbol;
6697
+ var NAN = 0 / 0;
6698
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
6699
+ var reIsBinary = /^0b[01]+$/i;
6700
+ var reIsOctal = /^0o[0-7]+$/i;
6701
+ var freeParseInt = parseInt;
6702
+ function toNumber(value) {
6703
+ if (typeof value == "number") {
6704
+ return value;
6705
+ }
6706
+ if (isSymbol_1(value)) {
6707
+ return NAN;
6708
+ }
6709
+ if (isObject_1(value)) {
6710
+ var other = typeof value.valueOf == "function" ? value.valueOf() : value;
6711
+ value = isObject_1(other) ? other + "" : other;
6712
+ }
6713
+ if (typeof value != "string") {
6714
+ return value === 0 ? value : +value;
6715
+ }
6716
+ value = _baseTrim(value);
6717
+ var isBinary = reIsBinary.test(value);
6718
+ return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
6719
+ }
6720
+ var toNumber_1 = toNumber;
6721
+ var FUNC_ERROR_TEXT$1 = "Expected a function";
6722
+ var nativeMax = Math.max, nativeMin = Math.min;
6723
+ function debounce(func, wait, options) {
6724
+ var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
6725
+ if (typeof func != "function") {
6726
+ throw new TypeError(FUNC_ERROR_TEXT$1);
6727
+ }
6728
+ wait = toNumber_1(wait) || 0;
6729
+ if (isObject_1(options)) {
6730
+ leading = !!options.leading;
6731
+ maxing = "maxWait" in options;
6732
+ maxWait = maxing ? nativeMax(toNumber_1(options.maxWait) || 0, wait) : maxWait;
6733
+ trailing = "trailing" in options ? !!options.trailing : trailing;
6734
+ }
6735
+ function invokeFunc(time) {
6736
+ var args = lastArgs, thisArg = lastThis;
6737
+ lastArgs = lastThis = void 0;
6738
+ lastInvokeTime = time;
6739
+ result = func.apply(thisArg, args);
6740
+ return result;
6741
+ }
6742
+ function leadingEdge(time) {
6743
+ lastInvokeTime = time;
6744
+ timerId = setTimeout(timerExpired, wait);
6745
+ return leading ? invokeFunc(time) : result;
6746
+ }
6747
+ function remainingWait(time) {
6748
+ var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
6749
+ return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
6750
+ }
6751
+ function shouldInvoke(time) {
6752
+ var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
6753
+ return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
6754
+ }
6755
+ function timerExpired() {
6756
+ var time = now_1();
6757
+ if (shouldInvoke(time)) {
6758
+ return trailingEdge(time);
6759
+ }
6760
+ timerId = setTimeout(timerExpired, remainingWait(time));
6761
+ }
6762
+ function trailingEdge(time) {
6763
+ timerId = void 0;
6764
+ if (trailing && lastArgs) {
6765
+ return invokeFunc(time);
6766
+ }
6767
+ lastArgs = lastThis = void 0;
6768
+ return result;
6769
+ }
6770
+ function cancel() {
6771
+ if (timerId !== void 0) {
6772
+ clearTimeout(timerId);
6773
+ }
6774
+ lastInvokeTime = 0;
6775
+ lastArgs = lastCallTime = lastThis = timerId = void 0;
6776
+ }
6777
+ function flush() {
6778
+ return timerId === void 0 ? result : trailingEdge(now_1());
6779
+ }
6780
+ function debounced() {
6781
+ var time = now_1(), isInvoking = shouldInvoke(time);
6782
+ lastArgs = arguments;
6783
+ lastThis = this;
6784
+ lastCallTime = time;
6785
+ if (isInvoking) {
6786
+ if (timerId === void 0) {
6787
+ return leadingEdge(lastCallTime);
6788
+ }
6789
+ if (maxing) {
6790
+ clearTimeout(timerId);
6791
+ timerId = setTimeout(timerExpired, wait);
6792
+ return invokeFunc(lastCallTime);
6793
+ }
6794
+ }
6795
+ if (timerId === void 0) {
6796
+ timerId = setTimeout(timerExpired, wait);
6797
+ }
6798
+ return result;
6799
+ }
6800
+ debounced.cancel = cancel;
6801
+ debounced.flush = flush;
6802
+ return debounced;
6803
+ }
6804
+ var debounce_1 = debounce;
6805
+ var FUNC_ERROR_TEXT = "Expected a function";
6806
+ function throttle(func, wait, options) {
6807
+ var leading = true, trailing = true;
6808
+ if (typeof func != "function") {
6809
+ throw new TypeError(FUNC_ERROR_TEXT);
6810
+ }
6811
+ if (isObject_1(options)) {
6812
+ leading = "leading" in options ? !!options.leading : leading;
6813
+ trailing = "trailing" in options ? !!options.trailing : trailing;
6814
+ }
6815
+ return debounce_1(func, wait, {
6816
+ "leading": leading,
6817
+ "maxWait": wait,
6818
+ "trailing": trailing
6819
+ });
6820
+ }
6821
+ var throttle_1 = throttle;
6822
+ function isScroller(el) {
6823
+ var style = window.getComputedStyle(el, null);
6824
+ var scrollValues = ["auto", "scroll"];
6825
+ return scrollValues.includes(style.overflow) || scrollValues.includes(style["overflow-y"]);
6826
+ }
6827
+ function getParentScroller(el) {
6828
+ var parent = el;
6829
+ while (parent) {
6830
+ if ([window, document, document.documentElement].includes(parent)) {
6831
+ return window;
6832
+ }
6833
+ if (isScroller(parent)) {
6834
+ return parent;
6835
+ }
6836
+ parent = parent.parentNode;
6837
+ }
6838
+ return parent || window;
6839
+ }
6840
+ function getScrollTop(el) {
6841
+ return el === window ? window.pageYOffset : el.scrollTop;
6842
+ }
6843
+ function getOffsetHeight(el) {
6844
+ return el === window ? window.innerHeight : el.offsetHeight;
6845
+ }
6846
+ function scrollToY(el, y) {
6847
+ if (el === window) {
6848
+ window.scroll(0, y);
6849
+ } else {
6850
+ el.scrollTop = y;
6851
+ }
6852
+ }
6853
+ function isEmpty(val) {
6854
+ return typeof val === "undefined" || val === null;
6855
+ }
6856
+ var isFirefox = typeof navigator !== "undefined" && navigator.userAgent.toLowerCase().indexOf("firefox") > -1;
6857
+ function setMousewheelSlow(scroller, slow) {
6858
+ function handler2(event) {
6859
+ var data4 = normalizeWheel$1(event);
6860
+ if (Math.abs(data4.spinY) > 0) {
6861
+ var currentScrollTop = scroller.scrollTop;
6862
+ if (data4.pixelY < 0 && currentScrollTop !== 0) {
6863
+ event.preventDefault();
6864
+ }
6865
+ if (data4.pixelY > 0 && scroller.scrollHeight - scroller.clientHeight > currentScrollTop) {
6866
+ event.preventDefault();
6867
+ }
6868
+ scroller.scrollTop += Math.ceil(data4.pixelY / slow);
6869
+ }
6870
+ }
6871
+ var throttleHandler = throttle_1(handler2, 0);
6872
+ scroller.addEventListener(isFirefox ? "DOMMouseScroll" : "mousewheel", throttleHandler, {
6873
+ passive: false
6874
+ });
6875
+ return function destory2() {
6876
+ scroller.removeEventListener(isFirefox ? "DOMMouseScroll" : "mousewheel", throttleHandler);
6877
+ };
6878
+ }
6879
+ var isObject = function isObject2(obj) {
6880
+ return obj !== null && _typeof(obj) === "object";
6881
+ };
6882
+ var orderBy = function orderBy2(array, sortKey, reverse, sortMethod, sortBy) {
6883
+ if (!sortKey && !sortMethod && (!sortBy || Array.isArray(sortBy) && !sortBy.length)) {
6884
+ return array;
6885
+ }
6886
+ if (typeof reverse === "string") {
6887
+ reverse = reverse === "descending" ? -1 : 1;
6888
+ } else {
6889
+ reverse = reverse && reverse < 0 ? -1 : 1;
6890
+ }
6891
+ var getKey = sortMethod ? null : function(value, index2) {
6892
+ if (sortBy) {
6893
+ if (!Array.isArray(sortBy)) {
6894
+ sortBy = [sortBy];
6895
+ }
6896
+ return sortBy.map(function(by) {
6897
+ if (typeof by === "string") {
6898
+ return getValueByPath(value, by);
6899
+ } else {
6900
+ return by(value, index2, array);
6901
+ }
6902
+ });
6903
+ }
6904
+ if (sortKey !== "$key") {
6905
+ if (isObject(value) && "$value" in value)
6906
+ value = value.$value;
6907
+ }
6908
+ return [isObject(value) ? getValueByPath(value, sortKey) : value];
6909
+ };
6910
+ var compare = function compare2(a, b) {
6911
+ if (sortMethod) {
6912
+ return sortMethod(a.value, b.value);
6913
+ }
6914
+ for (var i = 0, len = a.key.length; i < len; i++) {
6915
+ if (a.key[i] < b.key[i]) {
6916
+ return -1;
6917
+ }
6918
+ if (a.key[i] > b.key[i]) {
6919
+ return 1;
6920
+ }
6921
+ }
6922
+ return 0;
6923
+ };
6924
+ return array.map(function(value, index2) {
6925
+ return {
6926
+ value,
6927
+ index: index2,
6928
+ key: getKey ? getKey(value, index2) : null
6929
+ };
6930
+ }).sort(function(a, b) {
6931
+ var order = compare(a, b);
6932
+ if (!order) {
6933
+ order = a.index - b.index;
6934
+ }
6935
+ return order * reverse;
6936
+ }).map(function(item) {
6937
+ return item.value;
6938
+ });
6939
+ };
6940
+ var getColumnById = function getColumnById2(table, columnId) {
6941
+ var column = null;
6942
+ table.columns.forEach(function(item) {
6943
+ if (item.id === columnId) {
6944
+ column = item;
6945
+ }
6946
+ });
6947
+ return column;
6948
+ };
6949
+ var TableBodyClassNames = [
6950
+ ".el-table__body-wrapper",
6951
+ // 主表格容器
6952
+ ".el-table__fixed-right .el-table__fixed-body-wrapper",
6953
+ // 右固定表格容器
6954
+ ".el-table__fixed .el-table__fixed-body-wrapper"
6955
+ // 左固定表格容器
6956
+ ];
6957
+ var script$2 = {
6958
+ name: "el-table-virtual-scroll",
6959
+ props: {
6960
+ // 总数据
6961
+ data: {
6962
+ type: Array,
6963
+ required: true
6964
+ },
6965
+ // 每一行的预估高度
6966
+ itemSize: {
6967
+ type: Number,
6968
+ "default": 60
6969
+ },
6970
+ // 指定滚动容器
6971
+ scrollBox: {
6972
+ type: String
6973
+ },
6974
+ // 顶部和底部缓冲区域,值越大显示表格的行数越多
6975
+ buffer: {
6976
+ type: Number,
6977
+ "default": 200
6978
+ },
6979
+ // key值,data数据中的唯一id
6980
+ keyProp: {
6981
+ type: String,
6982
+ "default": "id"
6983
+ },
6984
+ // 滚动事件的节流时间
6985
+ throttleTime: {
6986
+ type: Number,
6987
+ "default": 16
6988
+ },
6989
+ // 是否获取表格行动态高度
6990
+ dynamic: {
6991
+ type: Boolean,
6992
+ "default": true
6993
+ },
6994
+ // 是否开启虚拟滚动
6995
+ virtualized: {
6996
+ type: Boolean,
6997
+ "default": true
6998
+ },
6999
+ // 表格行合并时,合并在一起的行返回相同的key值
7000
+ rowSpanKey: {
7001
+ type: Function
7002
+ },
7003
+ warn: {
7004
+ type: Boolean,
7005
+ "default": true
7006
+ },
7007
+ // 禁用虚拟滚动
7008
+ disabled: {
7009
+ type: Boolean,
7010
+ "default": false
7011
+ },
7012
+ // 支持自定义选中数据的排序规则,传入false则可保留列表的排序规则,默认是按照选中顺序排序
7013
+ selectionSort: {
7014
+ type: [Function, Boolean],
7015
+ "default": true
7016
+ },
7017
+ // 获取el-table组件,默认 virtual-scroll 组件的第一个子组件
7018
+ getElTable: {
7019
+ type: Function,
7020
+ "default": function _default() {
7021
+ return this.$children[0];
7022
+ }
7023
+ },
7024
+ keepScroll: {
7025
+ type: Boolean,
7026
+ "default": true
7027
+ }
7028
+ },
7029
+ provide: function provide() {
7030
+ return {
7031
+ virtualScroll: this
7032
+ };
7033
+ },
7034
+ data: function data() {
7035
+ return {
7036
+ sizes: {},
7037
+ // 尺寸映射(依赖响应式)
7038
+ start: 0,
7039
+ // 渲染列表开始索引
7040
+ end: void 0,
7041
+ // 渲染列表结束索引
7042
+ curRow: null,
7043
+ // 表格单选:选中的行
7044
+ oldSelection: [],
7045
+ // 表格多选:选中的行
7046
+ isExpanding: false,
7047
+ // 列是否正在展开
7048
+ columnVms: [],
7049
+ // virtual-column 组件实例
7050
+ isHideAppend: false,
7051
+ // 是否隐藏append
7052
+ scrollPosition: "",
7053
+ // x轴滚动位置(左、中、右)
7054
+ hasFixedRight: false,
7055
+ // 是否有固定右边的列
7056
+ listData: [],
7057
+ // 未筛选为data源数据,筛选后则为筛选后的数据
7058
+ isTree: false
7059
+ // 是否自定义树形表格
7060
+ };
7061
+ },
7062
+ computed: {
7063
+ // 计算出每个item(的key值)到滚动容器顶部的距离
7064
+ offsetMap: function offsetMap(_ref) {
7065
+ var keyProp = _ref.keyProp, itemSize = _ref.itemSize, sizes = _ref.sizes, listData = _ref.listData;
7066
+ if (!this.dynamic)
7067
+ return {};
7068
+ var res = {};
7069
+ var total = 0;
7070
+ for (var i = 0; i < listData.length; i++) {
7071
+ var key = listData[i][keyProp];
7072
+ if (typeof key === "undefined") {
7073
+ this.warn && console.warn("data[".concat(i, "][").concat(keyProp, "] 为 undefined,请确保 keyProp 对应的值不为undefined"));
7074
+ }
7075
+ res[key] = total;
7076
+ var curSize = sizes[key];
7077
+ var size = typeof curSize === "number" ? curSize : itemSize;
7078
+ total += size;
7079
+ }
7080
+ return res;
7081
+ },
7082
+ // 树节点的 children 映射,通过响应式关联起来,那么children中添加、删除节点会触发treeMap computed,从而监听treeMap更新视图【注:children 添加删除不会触发data watch,data只是浅监听】
7083
+ treeMap: function treeMap(_ref2) {
7084
+ var data4 = _ref2.data, keyProp = _ref2.keyProp, treeProps = _ref2.treeProps, isTree = _ref2.isTree;
7085
+ if (!isTree || !treeProps)
7086
+ return;
7087
+ var res = {};
7088
+ var children = treeProps.children;
7089
+ var traverse = function traverse2(nodes) {
7090
+ nodes.forEach(function(node) {
7091
+ var key = node[keyProp];
7092
+ if (typeof key !== "undefined" && node[children]) {
7093
+ res[key] = node[children];
7094
+ traverse2(node[children]);
7095
+ }
7096
+ });
7097
+ };
7098
+ traverse(data4);
7099
+ return res;
7100
+ }
7101
+ },
7102
+ methods: {
7103
+ // 初始化数据
7104
+ initData: function initData() {
7105
+ var _this = this;
7106
+ this.destory();
7107
+ this.renderData = [];
7108
+ this.top = void 0;
7109
+ this.bottom = void 0;
7110
+ this.start = 0;
7111
+ this.end = void 0;
7112
+ this.isInnerScroll = false;
7113
+ this.highlightRow = null;
7114
+ this.scrollPos = [0, 0];
7115
+ this.triggleScroll = false;
7116
+ this.checkOrder = 0;
7117
+ this.elTable = this.getElTable();
7118
+ if (!this.elTable || this.elTable.$options.name !== "ElTable") {
7119
+ throw new Error("未找到 <el-table> 组件. 请确保 <el-table> 组件在虚拟组件内,且 getElTable 方法能获取到正确的 <el-table> 组件!");
7120
+ }
7121
+ if (!this.elTable.rowKey) {
7122
+ this.warn && console.warn("[el-table-virtual-scroll]: 建议设置 <el-table> 组件的 rowKey 属性");
7123
+ }
7124
+ this.scroller = this.getScroller();
7125
+ this.observeElTable();
7126
+ this.onScroll = !this.throttleTime ? this.handleScroll : throttle_1(this.handleScroll, this.throttleTime);
7127
+ this.scroller.addEventListener("scroll", this.onScroll);
7128
+ window.addEventListener("resize", this.onScroll);
7129
+ this.hackTableExpand();
7130
+ this.hackTableHeaderDrag();
7131
+ this.hackTableSort();
7132
+ this.hackTableFilter();
7133
+ this.hackRowHighlight();
7134
+ this.hackSelection();
7135
+ this.hackCustomTree();
7136
+ this.bindTableDestory();
7137
+ this.treeProps = this.elTable.treeProps || {
7138
+ children: "children",
7139
+ hasChildren: "hasChildren"
7140
+ };
7141
+ if (this.elTable.defaultSort) {
7142
+ this.$nextTick(function() {
7143
+ _this.onSortChange();
7144
+ });
7145
+ } else {
7146
+ this.updateTreeData();
7147
+ }
7148
+ setTimeout(function() {
7149
+ !_this.triggleScroll && _this.onScroll();
7150
+ }, 100);
7151
+ },
7152
+ // 滚轮滚动速度减缓,减少快速滚动白屏
7153
+ // slowNum - 减速的值,值越大,滚动越慢
7154
+ slowOnMousewheel: function slowOnMousewheel() {
7155
+ var slowNum = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1;
7156
+ var scroller = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.scroller;
7157
+ this.removeMousewheelEvent && this.removeMousewheelEvent();
7158
+ this.removeMousewheelEvent = null;
7159
+ if (!slowNum)
7160
+ return;
7161
+ this.removeMousewheelEvent = setMousewheelSlow(scroller, slowNum);
7162
+ },
7163
+ // 获取滚动元素
7164
+ getScroller: function getScroller() {
7165
+ var el;
7166
+ if (this.scrollBox) {
7167
+ if (this.scrollBox === "window" || this.scrollBox === window)
7168
+ return window;
7169
+ el = document.querySelector(this.scrollBox);
7170
+ if (!el)
7171
+ throw new Error(" scrollBox prop: '".concat(this.scrollBox, "' is not a valid selector"));
7172
+ if (!isScroller(el))
7173
+ console.warn("Warning! scrollBox prop: '".concat(this.scrollBox, "' is not a scroll element"));
7174
+ return el;
7175
+ }
7176
+ if (this.elTable && (this.elTable.height || this.elTable.maxHeight || this.elTable.height === 0 || this.elTable.maxHeight === 0)) {
7177
+ this.isInnerScroll = true;
7178
+ return this.$el.querySelector(".el-table__body-wrapper");
7179
+ } else {
7180
+ return getParentScroller(this.$el);
7181
+ }
7182
+ },
7183
+ // 设置表格到滚动容器的距离
7184
+ getToTop: function getToTop() {
7185
+ if (this.isInnerScroll) {
7186
+ return 0;
7187
+ } else {
7188
+ return this.$el.getBoundingClientRect().top - (this.scroller === window ? 0 : this.scroller.getBoundingClientRect().top) + getScrollTop(this.scroller);
7189
+ }
7190
+ },
7191
+ // 处理滚动事件
7192
+ handleScroll: function handleScroll() {
7193
+ var shouldUpdate = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
7194
+ if (this.disabled)
7195
+ return;
7196
+ if (!this.scroller)
7197
+ return;
7198
+ this.triggleScroll = true;
7199
+ if (this.isInnerScroll && !this.scroller.style.height && !this.scroller.style.maxHeight)
7200
+ return;
7201
+ if (this.isDeactivated)
7202
+ return;
7203
+ if (this.isInnerScroll && this.elTable.layout.bodyHeight) {
7204
+ this.scrollPos[0] = this.scroller.scrollTop;
7205
+ this.scrollPos[1] = this.scroller.scrollLeft;
7206
+ }
7207
+ if (!this.virtualized)
7208
+ return;
7209
+ this.removeHoverRows();
7210
+ this.updateSizes();
7211
+ this.calcRenderData();
7212
+ this.calcPosition();
7213
+ shouldUpdate && this.updatePosition();
7214
+ this.$emit("change", this.renderData, this.start, this.end);
7215
+ this.syncRowsHighlight();
7216
+ },
7217
+ // 移除多个hover-row
7218
+ removeHoverRows: function removeHoverRows() {
7219
+ var hoverRows = this.$el.querySelectorAll(".el-table__row.hover-row");
7220
+ if (hoverRows.length > 1) {
7221
+ Array.from(hoverRows).forEach(function(row) {
7222
+ row.classList.remove("hover-row");
7223
+ });
7224
+ }
7225
+ },
7226
+ // 更新尺寸(高度)
7227
+ updateSizes: function updateSizes() {
7228
+ var _this2 = this;
7229
+ if (!this.dynamic)
7230
+ return;
7231
+ var rows = this.$el.querySelectorAll(".el-table__body > tbody > .el-table__row");
7232
+ var isTree = this.elTable.lazy;
7233
+ var isVTree = this.isTree;
7234
+ var noFirstLevelReg = /el-table__row--level-[1-9]\d*/;
7235
+ if (!isVTree && isTree) {
7236
+ rows = Array.from(this.$el.querySelectorAll(".el-table__body > tbody > .el-table__row")).filter(function(row) {
7237
+ return !noFirstLevelReg.test(row.className);
7238
+ });
7239
+ }
7240
+ Array.from(rows).forEach(function(row, index2) {
7241
+ var item = _this2.renderData[index2];
7242
+ if (!item)
7243
+ return;
7244
+ var offsetHeight = row.offsetHeight;
7245
+ if (!isTree && !isVTree && row.classList.contains("expanded")) {
7246
+ offsetHeight += row.nextSibling.offsetHeight;
7247
+ }
7248
+ if (isTree) {
7249
+ var next = row.nextSibling;
7250
+ while (next && next.tagName === "TR" && noFirstLevelReg.test(next.className)) {
7251
+ offsetHeight += next.offsetHeight;
7252
+ next = next.nextSibling;
7253
+ }
7254
+ }
7255
+ var key = item[_this2.keyProp];
7256
+ if (offsetHeight && _this2.sizes[key] !== offsetHeight) {
7257
+ _this2.$set(_this2.sizes, key, offsetHeight);
7258
+ }
7259
+ });
7260
+ },
7261
+ // 获取某条数据offsetTop
7262
+ getItemOffsetTop: function getItemOffsetTop(index2) {
7263
+ if (!this.dynamic) {
7264
+ return this.itemSize * index2;
7265
+ }
7266
+ var item = this.listData[index2];
7267
+ if (item) {
7268
+ return this.offsetMap[item[this.keyProp]] || 0;
7269
+ }
7270
+ return 0;
7271
+ },
7272
+ // 获取某条数据的尺寸
7273
+ getItemSize: function getItemSize(index2) {
7274
+ if (index2 <= -1)
7275
+ return 0;
7276
+ var item = this.listData[index2];
7277
+ if (item) {
7278
+ var key = item[this.keyProp];
7279
+ return this.sizes[key] || this.itemSize;
7280
+ }
7281
+ return this.itemSize;
7282
+ },
7283
+ // 计算只在视图上渲染的数据
7284
+ calcRenderData: function calcRenderData() {
7285
+ var scroller = this.scroller, listData = this.listData, buffer = this.buffer;
7286
+ var toTop = this.getToTop();
7287
+ var top = getScrollTop(scroller) - buffer - toTop;
7288
+ var bottom = getScrollTop(scroller) + getOffsetHeight(scroller) + buffer - toTop;
7289
+ var start;
7290
+ var end;
7291
+ if (!this.dynamic) {
7292
+ start = top <= 0 ? 0 : Math.floor(top / this.itemSize);
7293
+ end = bottom <= 0 ? 0 : Math.ceil(bottom / this.itemSize);
7294
+ } else {
7295
+ var l = 0;
7296
+ var r = listData.length - 1;
7297
+ var mid = 0;
7298
+ while (l <= r) {
7299
+ mid = Math.floor((l + r) / 2);
7300
+ var midVal = this.getItemOffsetTop(mid);
7301
+ if (midVal < top) {
7302
+ var midNextVal = this.getItemOffsetTop(mid + 1);
7303
+ if (midNextVal > top)
7304
+ break;
7305
+ l = mid + 1;
7306
+ } else {
7307
+ r = mid - 1;
7308
+ }
7309
+ }
7310
+ start = mid;
7311
+ l = start;
7312
+ r = listData.length - 1;
7313
+ mid = 0;
7314
+ while (l <= r) {
7315
+ mid = Math.floor((l + r) / 2);
7316
+ var _midVal = this.getItemOffsetTop(mid);
7317
+ if (_midVal >= bottom) {
7318
+ var _midNextVal = this.getItemOffsetTop(mid - 1);
7319
+ if (_midNextVal < bottom)
7320
+ break;
7321
+ r = mid - 1;
7322
+ } else {
7323
+ l = mid + 1;
7324
+ }
7325
+ }
7326
+ end = mid;
7327
+ }
7328
+ if (this.isRowSpan()) {
7329
+ var _this$calcRenderSpanD = this.calcRenderSpanData(start, end);
7330
+ var _this$calcRenderSpanD2 = _slicedToArray(_this$calcRenderSpanD, 2);
7331
+ start = _this$calcRenderSpanD2[0];
7332
+ end = _this$calcRenderSpanD2[1];
7333
+ } else {
7334
+ if (start % 2)
7335
+ start = start - 1;
7336
+ }
7337
+ this.top = top;
7338
+ this.bottom = bottom;
7339
+ this.start = start;
7340
+ this.end = end;
7341
+ this.renderData = listData.slice(start, end + 1);
7342
+ if (this.start === 0 && this.end > 30 && this.end === this.listData.length - 1) {
7343
+ this.warn && console.warn("[el-table-virtual-scroll] 表格数据全部渲染,渲染数量为:" + this.listData.length);
7344
+ }
7345
+ },
7346
+ // 是否是合并行
7347
+ isRowSpan: function isRowSpan() {
7348
+ return typeof this.rowSpanKey === "function";
7349
+ },
7350
+ // 如果存在合并行的情况,渲染的数据范围扩大到包含合并行
7351
+ calcRenderSpanData: function calcRenderSpanData(start, end) {
7352
+ var prevKey;
7353
+ while (start > 0) {
7354
+ var curRow = this.listData[start];
7355
+ var curkey = this.rowSpanKey(curRow, start);
7356
+ if (isEmpty(curkey))
7357
+ break;
7358
+ if (!isEmpty(prevKey) && prevKey !== curkey) {
7359
+ start++;
7360
+ break;
7361
+ }
7362
+ prevKey = curkey;
7363
+ start--;
7364
+ }
7365
+ var len = this.listData.length;
7366
+ prevKey = void 0;
7367
+ while (end < len) {
7368
+ var _curRow = this.listData[end];
7369
+ var _curkey = this.rowSpanKey(_curRow, end);
7370
+ if (!_curkey)
7371
+ break;
7372
+ if (prevKey && prevKey !== _curkey) {
7373
+ end--;
7374
+ break;
7375
+ }
7376
+ prevKey = _curkey;
7377
+ end++;
7378
+ }
7379
+ return [start, end];
7380
+ },
7381
+ // 计算位置
7382
+ calcPosition: function calcPosition() {
7383
+ var _this3 = this;
7384
+ var last = this.listData.length - 1;
7385
+ var wrapHeight = this.getItemOffsetTop(last) + this.getItemSize(last);
7386
+ var offsetTop = this.getItemOffsetTop(this.start);
7387
+ var tableWrapEl;
7388
+ TableBodyClassNames.forEach(function(className, index2) {
7389
+ var el = _this3.$el.querySelector(className);
7390
+ if (!el)
7391
+ return;
7392
+ if (!el.wrapEl) {
7393
+ var wrapEl = document.createElement("div");
7394
+ var innerEl = document.createElement("div");
7395
+ wrapEl.appendChild(innerEl);
7396
+ innerEl.appendChild(el.children[0]);
7397
+ el.insertBefore(wrapEl, el.firstChild);
7398
+ el.wrapEl = wrapEl;
7399
+ el.innerEl = innerEl;
7400
+ if (index2 > 0 && tableWrapEl) {
7401
+ _this3.$nextTick(function() {
7402
+ el.scrollTop = tableWrapEl.scrollTop;
7403
+ });
7404
+ }
7405
+ }
7406
+ index2 === 0 && (tableWrapEl = el);
7407
+ if (el.wrapEl) {
7408
+ el.wrapEl.style.height = wrapHeight + "px";
7409
+ el.innerEl.style.transform = "translateY(".concat(offsetTop, "px)");
7410
+ }
7411
+ });
7412
+ },
7413
+ // 监听el-table
7414
+ observeElTable: function observeElTable() {
7415
+ var _this4 = this;
7416
+ var unWatch1 = this.$watch(function() {
7417
+ return [_this4.elTable.scrollPosition, _this4.elTable.layout.scrollX];
7418
+ }, function(_ref3) {
7419
+ var _ref4 = _slicedToArray(_ref3, 2), pos = _ref4[0], scrollX = _ref4[1];
7420
+ var _ref5 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], _ref6 = _slicedToArray(_ref5, 2);
7421
+ _ref6[0];
7422
+ var oldScrollX = _ref6[1];
7423
+ _this4.scrollPosition = _this4.elTable.layout.scrollX ? pos : "none";
7424
+ if (scrollX && !oldScrollX) {
7425
+ _this4.elTable.syncPostion && _this4.elTable.syncPostion();
7426
+ }
7427
+ }, {
7428
+ immediate: true
7429
+ });
7430
+ var unWatch2 = this.$watch(function() {
7431
+ return _this4.elTable.layout.bodyHeight;
7432
+ }, function(val) {
7433
+ val > 0 && _this4.restoreScroll();
7434
+ val > 0 && _this4.onScroll();
7435
+ });
7436
+ this.unWatchs = [unWatch1, unWatch2];
7437
+ },
7438
+ // 执行update方法更新虚拟滚动,且每次nextTick只能执行一次【在数据大于100条开启虚拟滚动时,由于监听了data、virtualized会连续触发两次update方法:第一次update时,(updateSize)计算尺寸里的渲染数据(renderData)与表格行的dom是一一对应,之后会改变渲染数据(renderData)的值;而第二次执行update时,renderData改变了,而表格行dom未改变,导致renderData与dom不一一对应,从而位置计算错误,最终渲染的数据对应不上。因此使用每次nextTick只能执行一次来避免bug发生】
7439
+ doUpdate: function doUpdate() {
7440
+ var _this5 = this;
7441
+ if (this.hasDoUpdate)
7442
+ return;
7443
+ if (!this.scroller)
7444
+ return;
7445
+ this.isHideAppend = true;
7446
+ this.onScroll();
7447
+ this.hasDoUpdate = true;
7448
+ this.$nextTick(function() {
7449
+ _this5.hasDoUpdate = false;
7450
+ _this5.isHideAppend = false;
7451
+ });
7452
+ },
7453
+ // 空闲时更新位置(触发时间:滚动停止后等待10ms执行)
7454
+ // 场景:固定表格fixed变化时、扩展行展开滑动时需要更新
7455
+ updatePosition: function updatePosition() {
7456
+ var _this6 = this;
7457
+ this.timer && clearTimeout(this.timer);
7458
+ this.timer = setTimeout(function() {
7459
+ _this6.timer && clearTimeout(_this6.timer);
7460
+ _this6.handleScroll(false);
7461
+ }, this.throttleTime + 10);
7462
+ },
7463
+ // 渲染全部数据
7464
+ renderAllData: function renderAllData() {
7465
+ var _this7 = this;
7466
+ this.renderData = this.listData;
7467
+ this.$emit("change", this.listData, 0, this.listData.length - 1);
7468
+ console.log("renderAllData", this.listData);
7469
+ this.$nextTick(function() {
7470
+ TableBodyClassNames.forEach(function(className) {
7471
+ var el = _this7.$el.querySelector(className);
7472
+ if (!el)
7473
+ return;
7474
+ if (el.wrapEl) {
7475
+ el.wrapEl.style.height = "auto";
7476
+ el.innerEl.style.transform = "translateY(".concat(0, "px)");
7477
+ }
7478
+ });
7479
+ });
7480
+ },
7481
+ // 恢复滚动位置(仅支持表格内部滚动)
7482
+ restoreScroll: function restoreScroll() {
7483
+ if (!this.scroller || !this.isInnerScroll)
7484
+ return;
7485
+ this.scroller.scrollLeft = this.keepScroll ? this.scrollPos[1] : 0;
7486
+ this.scroller.scrollTop = this.keepScroll ? this.scrollPos[0] : 0;
7487
+ },
7488
+ // 【外部调用】更新
7489
+ update: function update() {
7490
+ if (this.isTree) {
7491
+ this.onFilterChange && this.onFilterChange();
7492
+ }
7493
+ this.handleScroll();
7494
+ },
7495
+ // 【外部调用】滚动到第几行
7496
+ // (不太精确:滚动到第n行时,如果周围的表格行计算出真实高度后会更新高度,导致内容坍塌或撑起)
7497
+ // offsetY - 偏移量
7498
+ scrollTo: function scrollTo(index2) {
7499
+ var _this8 = this;
7500
+ var offsetY = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
7501
+ var stop = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
7502
+ var item = this.listData[index2];
7503
+ if (item && this.scroller) {
7504
+ this.updateSizes();
7505
+ this.calcRenderData();
7506
+ this.$nextTick(function() {
7507
+ var offsetTop = _this8.getItemOffsetTop(index2) - offsetY;
7508
+ scrollToY(_this8.scroller, offsetTop);
7509
+ if (!stop) {
7510
+ setTimeout(function() {
7511
+ _this8.scrollTo(index2, offsetY, true);
7512
+ }, 50);
7513
+ }
7514
+ });
7515
+ }
7516
+ },
7517
+ // 【外部调用】滚动到对应的行
7518
+ scrollToRow: function scrollToRow(row) {
7519
+ var _this9 = this;
7520
+ var offsetY = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
7521
+ var index2 = this.listData.findIndex(function(item) {
7522
+ return item === row || item[_this9.keyProp] === row[_this9.keyProp];
7523
+ });
7524
+ this.scrollTo(index2, offsetY);
7525
+ },
7526
+ // 【外部调用】重置 (没用废弃)
7527
+ reset: function reset() {
7528
+ this.sizes = {};
7529
+ this.scrollTo(0, 0, false);
7530
+ },
7531
+ // 销毁
7532
+ destory: function destory() {
7533
+ if (this.scroller) {
7534
+ this.scroller.removeEventListener("scroll", this.onScroll);
7535
+ window.removeEventListener("resize", this.onScroll);
7536
+ }
7537
+ if (this.unWatchs) {
7538
+ this.unWatchs.forEach(function(unWatch) {
7539
+ return unWatch();
7540
+ });
7541
+ }
7542
+ if (this.removeMousewheelEvent) {
7543
+ this.removeMousewheelEvent();
7544
+ }
7545
+ this.oldSelection = [];
7546
+ this.elTable = null;
7547
+ this.scroller = null;
7548
+ this.unWatchs = [];
7549
+ },
7550
+ // 【VirtualColumn调用】获取列表全部数据】
7551
+ // origin - 源数据,非筛选后的数据
7552
+ getData: function getData() {
7553
+ var origin = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
7554
+ return this.list || (origin ? this.data : this.listData);
7555
+ },
7556
+ // 【VirtualColumn调用】添加virtual-column实例
7557
+ addColumn: function addColumn(vm) {
7558
+ this.columnVms.push(vm);
7559
+ },
7560
+ // 【VirtualColumn调用】移除virtual-column实例
7561
+ removeColumn: function removeColumn(vm) {
7562
+ this.columnVms = this.columnVms.filter(function(item) {
7563
+ return item !== vm;
7564
+ });
7565
+ },
7566
+ // 【多选】选中所有列
7567
+ checkAll: function checkAll(val) {
7568
+ var _this10 = this;
7569
+ var rows = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.listData;
7570
+ var byUser = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
7571
+ var removedRows = [];
7572
+ rows.forEach(function(row) {
7573
+ if (row.$v_checked) {
7574
+ removedRows.push(row);
7575
+ }
7576
+ if (row.$v_checked !== val) {
7577
+ _this10.$set(row, "$v_checked", val);
7578
+ _this10.$set(row, "$v_checkedOrder", val ? _this10.checkOrder++ : void 0);
7579
+ }
7580
+ });
7581
+ var selection = this.emitSelectionChange(removedRows);
7582
+ if (byUser) {
7583
+ this.$emit("select-all", selection, val);
7584
+ this.elTable.$emit("select-all", selection, val);
7585
+ }
7586
+ if (val === false) {
7587
+ this.checkOrder = 0;
7588
+ }
7589
+ },
7590
+ // 【多选】选中某一列
7591
+ checkRow: function checkRow(row, val) {
7592
+ var emit = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true;
7593
+ var byUser = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
7594
+ if (row.$v_checked === val)
7595
+ return;
7596
+ this.$set(row, "$v_checked", val);
7597
+ this.$set(row, "$v_checkedOrder", val ? this.checkOrder++ : void 0);
7598
+ if (emit) {
7599
+ var selection = this.emitSelectionChange(val ? [] : [row]);
7600
+ if (byUser) {
7601
+ this.$emit("select", selection, row, val);
7602
+ this.elTable.$emit("select", selection, row, val);
7603
+ }
7604
+ }
7605
+ },
7606
+ // 【多选】兼容表格clearSelection方法
7607
+ clearSelection: function clearSelection() {
7608
+ var _this11 = this;
7609
+ this.oldSelection.forEach(function(row) {
7610
+ _this11.$set(row, "$v_checked", false);
7611
+ });
7612
+ this.oldSelection = [];
7613
+ this.checkAll(false);
7614
+ this.columnVms.forEach(function(vm) {
7615
+ return vm.syncCheckStatus();
7616
+ });
7617
+ },
7618
+ // 【多选】兼容表格toggleRowSelection方法
7619
+ toggleRowSelection: function toggleRowSelection(row, selected) {
7620
+ if (!Array.isArray(row)) {
7621
+ row = [row];
7622
+ }
7623
+ this.toggleRowsSelection(row, selected);
7624
+ },
7625
+ // 【扩展多选】表格切换多个row选中状态
7626
+ toggleRowsSelection: function toggleRowsSelection(rows, selected) {
7627
+ var _this12 = this;
7628
+ var oldSelectedMap = {};
7629
+ var curSelectedMap = {};
7630
+ var toDeleteMap = null;
7631
+ var isReserve = this.isReserveSelection();
7632
+ if (isReserve) {
7633
+ this.oldSelection.forEach(function(row) {
7634
+ oldSelectedMap[row[_this12.keyProp]] = true;
7635
+ });
7636
+ this.data.forEach(function(row) {
7637
+ curSelectedMap[row[_this12.keyProp]] = true;
7638
+ });
7639
+ }
7640
+ var removedRows = [];
7641
+ rows.forEach(function(row) {
7642
+ var val = typeof selected === "boolean" ? selected : !row.$v_checked;
7643
+ !val && removedRows.push(row);
7644
+ _this12.$set(row, "$v_checked", val);
7645
+ _this12.$set(row, "$v_checkedOrder", val ? _this12.checkOrder++ : void 0);
7646
+ if (!isReserve)
7647
+ return;
7648
+ var key = row[_this12.keyProp];
7649
+ if (key in oldSelectedMap && !val) {
7650
+ if (!toDeleteMap)
7651
+ toDeleteMap = {};
7652
+ toDeleteMap[key] = true;
7653
+ }
7654
+ if (!(key in curSelectedMap) && val) {
7655
+ _this12.oldSelection.push(row);
7656
+ }
7657
+ });
7658
+ if (toDeleteMap) {
7659
+ this.oldSelection = this.oldSelection.filter(function(row) {
7660
+ return !(row[_this12.keyProp] in toDeleteMap);
7661
+ });
7662
+ }
7663
+ this.emitSelectionChange(removedRows);
7664
+ this.columnVms.forEach(function(vm) {
7665
+ return vm.syncCheckStatus();
7666
+ });
7667
+ },
7668
+ // 【多选】兼容表格selection-change事件
7669
+ emitSelectionChange: function emitSelectionChange(removedRows) {
7670
+ var isReserve = this.isReserveSelection();
7671
+ var selection = isReserve ? _toConsumableArray(this.oldSelection) : [];
7672
+ this.data.forEach(function(row) {
7673
+ if (row.$v_checked) {
7674
+ selection.push(row);
7675
+ }
7676
+ });
7677
+ this.sortSelection(selection);
7678
+ this.$emit("selection-change", selection, removedRows);
7679
+ this.elTable.$emit("selection-change", selection, removedRows);
7680
+ if (!isReserve) {
7681
+ this.oldSelection = _toConsumableArray(selection);
7682
+ }
7683
+ return selection;
7684
+ },
7685
+ // 【多选】兼容表格 reserve-selection,存储上次选中的值
7686
+ updateSelectionByRowKey: function updateSelectionByRowKey(data4) {
7687
+ var _this13 = this;
7688
+ var oldData = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
7689
+ if (!this.elTable)
7690
+ return;
7691
+ oldData.forEach(function(row) {
7692
+ if (row.$v_checked) {
7693
+ _this13.oldSelection.push(row);
7694
+ }
7695
+ });
7696
+ var selectedMap = {};
7697
+ this.oldSelection.forEach(function(row) {
7698
+ selectedMap[row[_this13.keyProp]] = true;
7699
+ });
7700
+ var usedMap = {};
7701
+ data4.forEach(function(row) {
7702
+ var key = row[_this13.keyProp];
7703
+ if (key in selectedMap) {
7704
+ _this13.$set(row, "$v_checked", true);
7705
+ usedMap[key] = true;
7706
+ }
7707
+ });
7708
+ this.oldSelection = this.oldSelection.filter(function(row) {
7709
+ return !(row[_this13.keyProp] in usedMap);
7710
+ });
7711
+ },
7712
+ // 【多选】多选列是否设置了 reserve-selection
7713
+ isReserveSelection: function isReserveSelection() {
7714
+ return this.columnVms.some(function(vm) {
7715
+ return vm.reserveSelection && vm.isSelection();
7716
+ });
7717
+ },
7718
+ // 获取选中值
7719
+ getSelection: function getSelection() {
7720
+ if (this.isReserveSelection()) {
7721
+ var curSelection = this.data.filter(function(row) {
7722
+ return row.$v_checked;
7723
+ });
7724
+ return [].concat(_toConsumableArray(this.oldSelection), _toConsumableArray(curSelection));
7725
+ } else {
7726
+ return this.oldSelection;
7727
+ }
7728
+ },
7729
+ // 【多选】更新多选的值
7730
+ updateSelectionData: function updateSelectionData(data4, oldData) {
7731
+ var _this14 = this;
7732
+ this.syncSelectionStatus();
7733
+ if (data4 !== oldData) {
7734
+ if (this.oldSelection.length > 0) {
7735
+ this.$emit("selection-change", [], _toConsumableArray(this.oldSelection));
7736
+ this.elTable.$emit("selection-change", [], _toConsumableArray(this.oldSelection));
7737
+ this.oldSelection = [];
7738
+ }
7739
+ return;
7740
+ }
7741
+ var selection = this.data.filter(function(row) {
7742
+ return row.$v_checked;
7743
+ });
7744
+ this.sortSelection(selection);
7745
+ var selectionKeyMap = selection.reduce(function(map, dataItem) {
7746
+ map[dataItem[_this14.keyProp]] = true;
7747
+ return map;
7748
+ }, {});
7749
+ var removedRows = this.oldSelection.reduce(function(rows, row) {
7750
+ if (!(row[_this14.keyProp] in selectionKeyMap))
7751
+ rows.push(row);
7752
+ return rows;
7753
+ }, []);
7754
+ if (removedRows.length || selection.length !== this.oldSelection.length) {
7755
+ this.$emit("selection-change", selection, removedRows);
7756
+ this.elTable.$emit("selection-change", selection, removedRows);
7757
+ this.oldSelection = _toConsumableArray(selection);
7758
+ }
7759
+ },
7760
+ // 【多选】多选排序
7761
+ sortSelection: function sortSelection(selection) {
7762
+ var _this15 = this;
7763
+ if (!this.selectionSort)
7764
+ return;
7765
+ if (typeof this.selectionSort === "function") {
7766
+ selection.sort(function(a, b) {
7767
+ return _this15.selectionSort(a, b);
7768
+ });
7769
+ } else {
7770
+ selection.sort(function(a, b) {
7771
+ return a.$v_checkedOrder - b.$v_checkedOrder;
7772
+ });
7773
+ }
7774
+ },
7775
+ // 【多选】同步多选状态
7776
+ syncSelectionStatus: function syncSelectionStatus() {
7777
+ var selectionVm = this.columnVms.find(function(vm) {
7778
+ return vm.isSelection();
7779
+ });
7780
+ if (selectionVm) {
7781
+ selectionVm.syncCheckStatus();
7782
+ }
7783
+ },
7784
+ // 【radio单选】设置选中行
7785
+ setCurrentRow: function setCurrentRow(row) {
7786
+ this.curRow = row;
7787
+ this.$emit("current-change", row);
7788
+ this.elTable.$emit("current-change", row);
7789
+ },
7790
+ // 【单选高亮】兼容行高亮
7791
+ hackRowHighlight: function hackRowHighlight() {
7792
+ var _this16 = this;
7793
+ if (this.elTable.setCurrentRow.virtual) {
7794
+ var originSetCurrentRow = this.elTable.setCurrentRow.bind(this.elTable);
7795
+ var setCurrentRow2 = function setCurrentRow3(row) {
7796
+ _this16.elTable.store.states.currentRow = _this16.highlightRow;
7797
+ if (_this16.highlightRow !== row)
7798
+ _this16.highlightRow = row;
7799
+ originSetCurrentRow(row);
7800
+ };
7801
+ this.elTable.setCurrentRow = setCurrentRow2;
7802
+ setCurrentRow2.virtual = true;
7803
+ }
7804
+ var unWatch = this.$watch(function() {
7805
+ return _this16.elTable.currentRowKey;
7806
+ }, function(val) {
7807
+ if (_this16.elTable.rowKey) {
7808
+ var targetRow = _this16.listData.find(function(row) {
7809
+ return val === row[_this16.elTable.rowKey];
7810
+ });
7811
+ _this16.highlightRow = targetRow;
7812
+ }
7813
+ }, {
7814
+ immediate: true
7815
+ });
7816
+ this.unWatchs.push(unWatch);
7817
+ var onCurrentChange = function onCurrentChange2(row) {
7818
+ _this16.highlightRow = row;
7819
+ };
7820
+ this.elTable.$on("current-change", onCurrentChange);
7821
+ this.unWatchs.push(function() {
7822
+ _this16.elTable.$off("current-change", onCurrentChange);
7823
+ });
7824
+ },
7825
+ // 【单选高亮】同步表格行高亮的值
7826
+ syncRowsHighlight: function syncRowsHighlight() {
7827
+ var _this17 = this;
7828
+ if (!this.elTable.highlightCurrentRow)
7829
+ return;
7830
+ this.$nextTick(function() {
7831
+ _this17.elTable.store.states.currentRow = _this17.highlightRow;
7832
+ });
7833
+ },
7834
+ // 使用自定义的树形表格;需禁用原来的树(将children字段改为空)
7835
+ useCustomSelection: function useCustomSelection() {
7836
+ this.isSelection = true;
7837
+ },
7838
+ // 【多选高亮】兼容多选
7839
+ hackSelection: function hackSelection() {
7840
+ var _this18 = this;
7841
+ var onFixedColumnsChange = function onFixedColumnsChange2() {
7842
+ if (!_this18.elTable)
7843
+ return;
7844
+ var tableBodyVm = _this18.elTable.$children.filter(function(vm) {
7845
+ return vm.$options.name === "ElTableBody";
7846
+ });
7847
+ tableBodyVm.forEach(function(vm) {
7848
+ if (vm.getRowClass.virtual)
7849
+ return;
7850
+ var originGetRowClass = vm.getRowClass.bind(_this18.elTable);
7851
+ vm.getRowClass = function(row, rowIndex) {
7852
+ var classes = originGetRowClass(row, rowIndex);
7853
+ if (_this18.elTable.highlightSelectionRow && row.$v_checked) {
7854
+ classes.push("selection-row");
7855
+ }
7856
+ return classes;
7857
+ };
7858
+ vm.getRowClass.virtual = true;
7859
+ });
7860
+ };
7861
+ var unWatch = this.$watch(function() {
7862
+ return [_this18.elTable.fixedColumns, _this18.elTable.rightFixedColumns];
7863
+ }, onFixedColumnsChange, {
7864
+ immediate: true
7865
+ });
7866
+ this.unWatchs.push(unWatch);
7867
+ this.elTable.toggleRowSelection = function(row, selected) {
7868
+ _this18.toggleRowSelection(row, selected);
7869
+ };
7870
+ this.elTable.clearSelection = function() {
7871
+ _this18.clearSelection();
7872
+ };
7873
+ this.elTable.toggleAllSelection = function() {
7874
+ var selectionVm = _this18.columnVms.find(function(vm) {
7875
+ return vm.isSelection();
7876
+ });
7877
+ if (selectionVm) {
7878
+ selectionVm.onCheckAllRows(!selectionVm.isCheckedAll);
7879
+ }
7880
+ };
7881
+ },
7882
+ // 监听表格header-dragend事件
7883
+ hackTableHeaderDrag: function hackTableHeaderDrag() {
7884
+ var _this19 = this;
7885
+ var onHeaderDragend = function onHeaderDragend2() {
7886
+ _this19.hasHeadDrag = true;
7887
+ setTimeout(function() {
7888
+ _this19.elTable.doLayout();
7889
+ });
7890
+ _this19.update();
7891
+ };
7892
+ this.elTable.$on("header-dragend", onHeaderDragend);
7893
+ this.unWatchs.push(function() {
7894
+ _this19.elTable.$off("header-dragend", onHeaderDragend);
7895
+ });
7896
+ },
7897
+ // 【展开行】使用扩展行
7898
+ useExpandTable: function useExpandTable() {
7899
+ this.isExpandType = true;
7900
+ },
7901
+ // 【展开行】监听表格expand-change事件
7902
+ hackTableExpand: function hackTableExpand() {
7903
+ var _this20 = this;
7904
+ if (!this.isExpandType)
7905
+ return;
7906
+ var store = this.elTable.store;
7907
+ store.isRowExpanded = function(row) {
7908
+ return row.$v_expanded;
7909
+ };
7910
+ store.setExpandRowKeys = function() {
7911
+ var expandRowKeys = _this20.elTable.expandRowKeys;
7912
+ _this20.listData.forEach(function(row) {
7913
+ _this20.$set(row, "$v_expanded", expandRowKeys.includes(row[_this20.elTable.rowKey]));
7914
+ });
7915
+ };
7916
+ store.updateExpandRows = function() {
7917
+ var defaultExpandAll = _this20.elTable.defaultExpandAll;
7918
+ if (defaultExpandAll) {
7919
+ _this20.listData.forEach(function(row) {
7920
+ _this20.$set(row, "$v_expanded", true);
7921
+ });
7922
+ }
7923
+ };
7924
+ store.toggleRowExpansion = function(row, expanded) {
7925
+ var val = typeof expanded === "boolean" ? expanded : !row.$v_expanded;
7926
+ if (val === Boolean(row.$v_expanded))
7927
+ return;
7928
+ _this20.$set(row, "$v_expanded", val);
7929
+ _this20.elTable.$emit("expand-change", row, _this20.listData.filter(function(row2) {
7930
+ return row2.$v_expanded;
7931
+ }));
7932
+ if (_this20.updateExpandeding)
7933
+ return;
7934
+ _this20.updateExpandeding = true;
7935
+ _this20.$nextTick(function() {
7936
+ _this20.updateExpandeding = false;
7937
+ _this20.update();
7938
+ });
7939
+ };
7940
+ store.states.expandRows.indexOf = function(row) {
7941
+ if (row) {
7942
+ return row.$v_expanded || -1;
7943
+ }
7944
+ return -1;
7945
+ };
7946
+ },
7947
+ // 【展开行/树】切换某一行的展开状态
7948
+ toggleRowExpansion: function toggleRowExpansion(row, expanded) {
7949
+ this.elTable.toggleRowExpansion(row, expanded);
7950
+ },
7951
+ // 【自定义固定列】设置固定左右样式
7952
+ headerCellFixedStyle: function headerCellFixedStyle(data4) {
7953
+ return this.cellFixedStyle(data4, true);
7954
+ },
7955
+ // 【自定义固定列】设置固定左右样式
7956
+ cellFixedStyle: function cellFixedStyle(_ref7) {
7957
+ var _this21 = this;
7958
+ var column = _ref7.column;
7959
+ var isHeader = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
7960
+ var elTable = this.getElTable();
7961
+ if (!elTable)
7962
+ return;
7963
+ var _elTable$layout = elTable.layout, _gutterWidth = _elTable$layout.gutterWidth, scrollY = _elTable$layout.scrollY, bodyWidth = _elTable$layout.bodyWidth;
7964
+ var gutterWidth = isHeader && scrollY ? _gutterWidth : 0;
7965
+ if (!this.fixedMap || this._isScrollY !== scrollY || this._bodyWidth !== bodyWidth || this.hasHeadDrag) {
7966
+ if (this.hasHeadDrag)
7967
+ this.hasHeadDrag = false;
7968
+ this._isScrollY = scrollY;
7969
+ this._bodyWidth = bodyWidth;
7970
+ this.fixedMap = {};
7971
+ this.totalLeft = 0;
7972
+ this.totalRight = 0;
7973
+ var columns = elTable.columns;
7974
+ var rightColumns = [];
7975
+ var lastLeftColumn;
7976
+ var firstRightColumn;
7977
+ for (var i = 0; i < columns.length; i++) {
7978
+ var _column = columns[i];
7979
+ var isLeft = _column.className && _column.className.includes("virtual-column__fixed-left");
7980
+ var isRight = _column.className && _column.className.includes("virtual-column__fixed-right");
7981
+ if (!isLeft && !isRight)
7982
+ continue;
7983
+ if (isLeft) {
7984
+ lastLeftColumn = _column;
7985
+ this.fixedMap[_column.id] = {
7986
+ left: this.totalLeft
7987
+ };
7988
+ this.totalLeft += _column.realWidth || _column.width;
7989
+ }
7990
+ if (isRight) {
7991
+ if (!firstRightColumn)
7992
+ firstRightColumn = _column;
7993
+ rightColumns.push(_column);
7994
+ }
7995
+ }
7996
+ var leftClass = " is-last-column";
7997
+ var rightClass = " is-first-column";
7998
+ if (lastLeftColumn && !lastLeftColumn.className.includes(leftClass))
7999
+ lastLeftColumn.className += leftClass;
8000
+ if (firstRightColumn && !firstRightColumn.className.includes(rightClass))
8001
+ firstRightColumn.className += rightClass;
8002
+ this.hasFixedRight = rightColumns.length > 0;
8003
+ rightColumns.reverse().forEach(function(column2) {
8004
+ _this21.fixedMap[column2.id] = {
8005
+ right: _this21.totalRight
8006
+ };
8007
+ _this21.totalRight += column2.realWidth || column2.width;
8008
+ });
8009
+ }
8010
+ var style = this.fixedMap[column.id];
8011
+ if (!style)
8012
+ return;
8013
+ var isFixedRight = "right" in style;
8014
+ var curStyle = isFixedRight ? {
8015
+ right: style.right + gutterWidth + "px"
8016
+ } : {
8017
+ left: style.left + "px"
8018
+ };
8019
+ if (elTable.showSummary) {
8020
+ this.$nextTick(function() {
8021
+ var footTh = _this21.$el.querySelector(".el-table__footer-wrapper .".concat(column.id));
8022
+ if (footTh) {
8023
+ if (curStyle.left)
8024
+ footTh.style.left = curStyle.left;
8025
+ if (curStyle.right)
8026
+ footTh.style.right = curStyle.right;
8027
+ }
8028
+ });
8029
+ }
8030
+ return curStyle;
8031
+ },
8032
+ // 【自定义固定列】更新表头布局
8033
+ doHeaderLayout: function doHeaderLayout() {
8034
+ if (!this.elTable)
8035
+ return;
8036
+ this.fixedMap = null;
8037
+ this.elTable.$refs.tableHeader.$forceUpdate();
8038
+ },
8039
+ // 绑定排序事件
8040
+ hackTableSort: function hackTableSort() {
8041
+ var _this22 = this;
8042
+ this.onSortChange = function() {
8043
+ if (!_this22.elTable)
8044
+ return;
8045
+ var states = _this22.elTable.store.states;
8046
+ var sortingColumn = states.sortingColumn;
8047
+ var data4 = _this22.filterData || _this22.data;
8048
+ if (!sortingColumn || typeof sortingColumn.sortable === "string") {
8049
+ _this22.updateTreeData(data4);
8050
+ } else {
8051
+ var listData = orderBy(data4, states.sortProp, states.sortOrder, sortingColumn.sortMethod, sortingColumn.sortBy);
8052
+ _this22.updateTreeData(listData);
8053
+ }
8054
+ _this22.doUpdate();
8055
+ if (!_this22.virtualized) {
8056
+ _this22.renderAllData();
8057
+ }
8058
+ _this22.$nextTick(function() {
8059
+ _this22.syncSelectionStatus();
8060
+ });
8061
+ };
8062
+ this.elTable.$on("sort-change", this.onSortChange);
8063
+ this.unWatchs.push(function() {
8064
+ _this22.elTable.$off("sort-change", _this22.onSortChange);
8065
+ });
8066
+ var originClearSort = this.elTable.clearSort.bind(this.elTable);
8067
+ this.elTable.clearSort = function() {
8068
+ originClearSort.apply(void 0, arguments);
8069
+ _this22.onSortChange();
8070
+ };
8071
+ },
8072
+ // 绑定筛选事件
8073
+ hackTableFilter: function hackTableFilter() {
8074
+ var _this23 = this;
8075
+ if (this.isTree) {
8076
+ this.$nextTick(function() {
8077
+ _this23.elTable.store.execQuery = function() {
8078
+ _this23.elTable.store.states.data = _toConsumableArray(_this23.elTable.data);
8079
+ };
8080
+ });
8081
+ }
8082
+ this.onFilterChange = function() {
8083
+ if (!_this23.elTable)
8084
+ return;
8085
+ var states2 = _this23.elTable.store.states;
8086
+ var filters = states2.filters;
8087
+ var data4 = _this23.data;
8088
+ Object.keys(filters).forEach(function(columnId) {
8089
+ var values = states2.filters[columnId];
8090
+ if (!values || values.length === 0)
8091
+ return;
8092
+ var column = getColumnById(states2, columnId);
8093
+ if (column && column.filterMethod) {
8094
+ data4 = data4.filter(function(row) {
8095
+ return values.some(function(value) {
8096
+ return column.filterMethod.call(null, value, row, column);
8097
+ });
8098
+ });
8099
+ }
8100
+ });
8101
+ var hasFilter = _this23.data !== data4;
8102
+ _this23.filterData = hasFilter ? data4 : null;
8103
+ _this23.onSortChange();
8104
+ };
8105
+ this.elTable.$on("filter-change", this.onFilterChange);
8106
+ this.unWatchs.push(function() {
8107
+ _this23.elTable.$off("filter-change", _this23.onFilterChange);
8108
+ });
8109
+ var originClearFilter = this.elTable.clearFilter.bind(this.elTable);
8110
+ this.elTable.clearFilter = function() {
8111
+ originClearFilter.apply(void 0, arguments);
8112
+ _this23.onFilterChange();
8113
+ };
8114
+ var states = this.elTable.store.states;
8115
+ states.columns.forEach(function(column) {
8116
+ if (column.filteredValue && column.filteredValue.length) {
8117
+ _this23.onFilterChange();
8118
+ }
8119
+ });
8120
+ },
8121
+ // 使用自定义的树形表格;需禁用原来的树(将children字段改为空)
8122
+ // 场景:row包含children会被当做的树结构,与 virtual-column 的树结构有冲突,所以需要禁用原来的
8123
+ useCustomTree: function useCustomTree() {
8124
+ var _this24 = this;
8125
+ var isTry = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
8126
+ this.isTree = true;
8127
+ var elTable = this.getElTable();
8128
+ if (elTable) {
8129
+ var states = elTable.store.states;
8130
+ states.childrenColumnName = "";
8131
+ states.lazyColumnIdentifier = "";
8132
+ elTable.store.updateTreeData = function() {
8133
+ };
8134
+ } else if (isTry) {
8135
+ this.$nextTick(function() {
8136
+ _this24.useCustomTree(false);
8137
+ });
8138
+ }
8139
+ },
8140
+ // 兼容自定义树形表格
8141
+ hackCustomTree: function hackCustomTree() {
8142
+ var _this25 = this;
8143
+ if (!this.isTree)
8144
+ return;
8145
+ var unWatch = this.$watch(function() {
8146
+ return _this25.elTable.expandRowKeys;
8147
+ }, function() {
8148
+ _this25.expandRowKeysChanged = true;
8149
+ _this25.update();
8150
+ _this25.expandRowKeysChanged = false;
8151
+ });
8152
+ this.unWatchs.push(unWatch);
8153
+ this.elTable.toggleRowExpansion = function(row, expanded) {
8154
+ var treeState = row.$v_tree;
8155
+ if (!treeState)
8156
+ return;
8157
+ if (typeof expanded === "undefined") {
8158
+ expanded = !treeState.expanded;
8159
+ }
8160
+ if (treeState.expanded === expanded)
8161
+ return;
8162
+ treeState.expanded = expanded;
8163
+ if (_this25.togglingRowExpansion)
8164
+ return;
8165
+ _this25.togglingRowExpansion = true;
8166
+ _this25.$nextTick(function() {
8167
+ _this25.togglingRowExpansion = false;
8168
+ _this25.update();
8169
+ _this25.columnVms.forEach(function(vm) {
8170
+ return vm.isTree && vm.renderTreeNode();
8171
+ });
8172
+ });
8173
+ };
8174
+ },
8175
+ // 更新树:将树结构平铺,将展开的节点筛出来,同时对新节点插入$v_tree 记录树节点状态数据
8176
+ updateTreeData: function updateTreeData() {
8177
+ var _this26 = this;
8178
+ var data4 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.data;
8179
+ if (!this.isTree || !this.treeProps) {
8180
+ this.listData = data4;
8181
+ return;
8182
+ }
8183
+ var res = [];
8184
+ var _this$treeProps$child = this.treeProps.children, children = _this$treeProps$child === void 0 ? "children" : _this$treeProps$child;
8185
+ var _this$elTable = this.elTable, defaultExpandAll = _this$elTable.defaultExpandAll, expandRowKeys = _this$elTable.expandRowKeys, rowKey = _this$elTable.rowKey, indent2 = _this$elTable.indent;
8186
+ var getExpanded = function getExpanded2(key) {
8187
+ if (!key)
8188
+ return false;
8189
+ return defaultExpandAll || expandRowKeys && expandRowKeys.indexOf(key) !== -1 || false;
8190
+ };
8191
+ var traverse = function traverse2(nodes, parent) {
8192
+ var level = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
8193
+ var display = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : true;
8194
+ nodes.forEach(function(node) {
8195
+ if (display) {
8196
+ res.push(node);
8197
+ }
8198
+ var treeState = node.$v_tree || {};
8199
+ if (!node.$v_tree) {
8200
+ node.$v_tree = treeState = {
8201
+ parent,
8202
+ level,
8203
+ expanded: getExpanded(node[rowKey]),
8204
+ loaded: false,
8205
+ loading: false,
8206
+ indent: (level - 1) * indent2
8207
+ };
8208
+ } else {
8209
+ if (_this26.expandRowKeysChanged) {
8210
+ treeState.expanded = getExpanded(node[rowKey]);
8211
+ }
8212
+ }
8213
+ if (Array.isArray(node[children])) {
8214
+ var childDisplay = display && treeState.expanded;
8215
+ traverse2(node[children], node, level + 1, childDisplay);
8216
+ }
8217
+ });
8218
+ };
8219
+ traverse(data4);
8220
+ this.listData = res;
8221
+ },
8222
+ /*
8223
+ * 【扩展树形表格方法】获取子节点
8224
+ */
8225
+ getChildNodes: function getChildNodes(row) {
8226
+ var _this$treeProps$child2 = this.treeProps.children, children = _this$treeProps$child2 === void 0 ? "children" : _this$treeProps$child2;
8227
+ return row[children] || [];
8228
+ },
8229
+ // 【扩展树形表格方法】获取父节点
8230
+ getParentNode: function getParentNode(row) {
8231
+ var treeState = row.$v_tree;
8232
+ return treeState && treeState.parent;
8233
+ },
8234
+ // 【扩展树形表格方法】获取父层所有节点
8235
+ getParentNodes: function getParentNodes(row) {
8236
+ var res = [];
8237
+ var curRow = row;
8238
+ while (curRow) {
8239
+ var treeState = curRow.$v_tree;
8240
+ if (!treeState || !treeState.parent)
8241
+ break;
8242
+ res.unshift(treeState.parent);
8243
+ curRow = treeState.parent;
8244
+ }
8245
+ return res;
8246
+ },
8247
+ // 【扩展树形表格方法】重新加载节点
8248
+ // 删除原来子节点,并触发load函数重新加载
8249
+ reloadNode: function reloadNode(row) {
8250
+ var _this27 = this;
8251
+ return _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee() {
8252
+ var treeState, _this27$treeProps, _this27$treeProps$chi, children, _this27$treeProps$has, hasChildren, vm;
8253
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
8254
+ while (1)
8255
+ switch (_context.prev = _context.next) {
8256
+ case 0:
8257
+ treeState = row.$v_tree;
8258
+ if (treeState) {
8259
+ _context.next = 3;
8260
+ break;
8261
+ }
8262
+ return _context.abrupt("return");
8263
+ case 3:
8264
+ _this27$treeProps = _this27.treeProps, _this27$treeProps$chi = _this27$treeProps.children, children = _this27$treeProps$chi === void 0 ? "children" : _this27$treeProps$chi, _this27$treeProps$has = _this27$treeProps.hasChildren, hasChildren = _this27$treeProps$has === void 0 ? "hasChildren" : _this27$treeProps$has;
8265
+ row[children] = null;
8266
+ row[hasChildren] = true;
8267
+ treeState.loaded = false;
8268
+ _this27.update();
8269
+ vm = _this27.columnVms.find(function(vm2) {
8270
+ return vm2.isTree;
8271
+ });
8272
+ _context.t0 = vm;
8273
+ if (!_context.t0) {
8274
+ _context.next = 13;
8275
+ break;
8276
+ }
8277
+ _context.next = 13;
8278
+ return vm.loadChildNodes(row, true);
8279
+ case 13:
8280
+ case "end":
8281
+ return _context.stop();
8282
+ }
8283
+ }, _callee);
8284
+ }))();
8285
+ },
8286
+ // 【扩展树形表格方法】收起所有树节点
8287
+ unexpandAllNodes: function unexpandAllNodes() {
8288
+ var _this28 = this;
8289
+ var children = this.treeProps.children;
8290
+ var traverse = function traverse2(rows) {
8291
+ rows.forEach(function(row) {
8292
+ _this28.toggleRowExpansion(row, false);
8293
+ if (Array.isArray(row[children]))
8294
+ traverse2(row[children]);
8295
+ });
8296
+ };
8297
+ traverse(this.listData);
8298
+ },
8299
+ // 【扩展树形表格方法】展开所有树节点
8300
+ expandAllNodes: function expandAllNodes() {
8301
+ var _this29 = this;
8302
+ var _this$treeProps = this.treeProps, children = _this$treeProps.children, _this$treeProps$hasCh = _this$treeProps.hasChildren, hasChildren = _this$treeProps$hasCh === void 0 ? "hasChildren" : _this$treeProps$hasCh;
8303
+ var traverse = function traverse2(rows) {
8304
+ rows.forEach(function(row) {
8305
+ var treeState = row.$v_tree;
8306
+ if (row[hasChildren] && !treeState.loaded)
8307
+ return;
8308
+ _this29.toggleRowExpansion(row, true);
8309
+ if (Array.isArray(row[children]))
8310
+ traverse2(row[children]);
8311
+ });
8312
+ };
8313
+ traverse(this.listData);
8314
+ },
8315
+ // 表格销毁事件
8316
+ bindTableDestory: function bindTableDestory() {
8317
+ var _this30 = this;
8318
+ var onTableDestory = function onTableDestory2() {
8319
+ _this30.warn && console.warn("<el-table> 组件销毁时,建议将 <el-table-virtual-scroll> 组件一同销毁");
8320
+ _this30.destory();
8321
+ _this30.$nextTick(function() {
8322
+ _this30.initData();
8323
+ });
8324
+ };
8325
+ this.elTable.$on("hook:beforeDestory", onTableDestory);
8326
+ this.unWatchs.push(function() {
8327
+ _this30.elTable.$off("hook:beforeDestory", onTableDestory);
8328
+ });
8329
+ }
8330
+ },
8331
+ watch: {
8332
+ data: function data2(_data, oldData) {
8333
+ this.listData = _data;
8334
+ if (this.list && _data !== oldData) {
8335
+ this.list = _data;
8336
+ }
8337
+ this.onFilterChange && this.onFilterChange();
8338
+ if (this.isReserveSelection()) {
8339
+ this.updateSelectionByRowKey(_data, oldData);
8340
+ } else {
8341
+ this.updateSelectionData(_data, oldData);
8342
+ }
8343
+ },
8344
+ virtualized: {
8345
+ immediate: true,
8346
+ handler: function handler() {
8347
+ this.onFilterChange && this.onFilterChange();
8348
+ }
8349
+ },
8350
+ disabled: function disabled() {
8351
+ this.doUpdate();
8352
+ },
8353
+ treeMap: function treeMap2() {
8354
+ this.update();
8355
+ }
8356
+ },
8357
+ created: function created() {
8358
+ var _this31 = this;
8359
+ this.$nextTick(function() {
8360
+ _this31.initData();
8361
+ });
8362
+ },
8363
+ activated: function activated() {
8364
+ var _this$elTable2;
8365
+ this.isDeactivated = false;
8366
+ ((_this$elTable2 = this.elTable) === null || _this$elTable2 === void 0 ? void 0 : _this$elTable2.fit) === false && this.restoreScroll();
8367
+ },
8368
+ deactivated: function deactivated() {
8369
+ this.isDeactivated = true;
8370
+ },
8371
+ beforeDestroy: function beforeDestroy() {
8372
+ this.destory();
8373
+ }
8374
+ };
8375
+ function normalizeComponent(template, style, script2, scopeId, isFunctionalTemplate, moduleIdentifier, shadowMode, createInjector2, createInjectorSSR, createInjectorShadow) {
8376
+ if (typeof shadowMode !== "boolean") {
8377
+ createInjectorSSR = createInjector2;
8378
+ createInjector2 = shadowMode;
8379
+ shadowMode = false;
8380
+ }
8381
+ const options = typeof script2 === "function" ? script2.options : script2;
8382
+ if (template && template.render) {
8383
+ options.render = template.render;
8384
+ options.staticRenderFns = template.staticRenderFns;
8385
+ options._compiled = true;
8386
+ if (isFunctionalTemplate) {
8387
+ options.functional = true;
8388
+ }
8389
+ }
8390
+ if (scopeId) {
8391
+ options._scopeId = scopeId;
8392
+ }
8393
+ let hook;
8394
+ if (moduleIdentifier) {
8395
+ hook = function(context) {
8396
+ context = context || // cached call
8397
+ this.$vnode && this.$vnode.ssrContext || // stateful
8398
+ this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
8399
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") {
8400
+ context = __VUE_SSR_CONTEXT__;
8401
+ }
8402
+ if (style) {
8403
+ style.call(this, createInjectorSSR(context));
8404
+ }
8405
+ if (context && context._registeredComponents) {
8406
+ context._registeredComponents.add(moduleIdentifier);
8407
+ }
8408
+ };
8409
+ options._ssrRegister = hook;
8410
+ } else if (style) {
8411
+ hook = shadowMode ? function(context) {
8412
+ style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
8413
+ } : function(context) {
8414
+ style.call(this, createInjector2(context));
8415
+ };
8416
+ }
8417
+ if (hook) {
8418
+ if (options.functional) {
8419
+ const originalRender = options.render;
8420
+ options.render = function renderWithStyleInjection(h, context) {
8421
+ hook.call(context);
8422
+ return originalRender(h, context);
8423
+ };
8424
+ } else {
8425
+ const existing = options.beforeCreate;
8426
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
8427
+ }
8428
+ }
8429
+ return script2;
8430
+ }
8431
+ const isOldIE = typeof navigator !== "undefined" && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());
8432
+ function createInjector(context) {
8433
+ return (id, style) => addStyle(id, style);
8434
+ }
8435
+ let HEAD;
8436
+ const styles = {};
8437
+ function addStyle(id, css2) {
8438
+ const group = isOldIE ? css2.media || "default" : id;
8439
+ const style = styles[group] || (styles[group] = {
8440
+ ids: /* @__PURE__ */ new Set(),
8441
+ styles: []
8442
+ });
8443
+ if (!style.ids.has(id)) {
8444
+ style.ids.add(id);
8445
+ let code = css2.source;
8446
+ if (css2.map) {
8447
+ code += "\n/*# sourceURL=" + css2.map.sources[0] + " */";
8448
+ code += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(css2.map)))) + " */";
8449
+ }
8450
+ if (!style.element) {
8451
+ style.element = document.createElement("style");
8452
+ style.element.type = "text/css";
8453
+ if (css2.media)
8454
+ style.element.setAttribute("media", css2.media);
8455
+ if (HEAD === void 0) {
8456
+ HEAD = document.head || document.getElementsByTagName("head")[0];
8457
+ }
8458
+ HEAD.appendChild(style.element);
8459
+ }
8460
+ if ("styleSheet" in style.element) {
8461
+ style.styles.push(code);
8462
+ style.element.styleSheet.cssText = style.styles.filter(Boolean).join("\n");
8463
+ } else {
8464
+ const index2 = style.ids.size - 1;
8465
+ const textNode = document.createTextNode(code);
8466
+ const nodes = style.element.childNodes;
8467
+ if (nodes[index2])
8468
+ style.element.removeChild(nodes[index2]);
8469
+ if (nodes.length)
8470
+ style.element.insertBefore(textNode, nodes[index2]);
8471
+ else
8472
+ style.element.appendChild(textNode);
8473
+ }
8474
+ }
8475
+ }
8476
+ var __vue_script__$2 = script$2;
8477
+ var __vue_render__$1 = function __vue_render__() {
8478
+ var _vm = this;
8479
+ var _h = _vm.$createElement;
8480
+ var _c = _vm._self._c || _h;
8481
+ return _c("div", {
8482
+ staticClass: "el-table-virtual-scroll",
8483
+ "class": [_vm.isExpanding ? "is-expanding" : "", _vm.isHideAppend ? "hide-append" : "", _vm.scrollPosition ? "is-scrolling-" + _vm.scrollPosition : "", _vm.hasFixedRight ? "has-custom-fixed-right" : ""]
8484
+ }, [_vm._t("default", null, null, {
8485
+ headerCellFixedStyle: _vm.headerCellFixedStyle,
8486
+ cellFixedStyle: _vm.cellFixedStyle
8487
+ })], 2);
8488
+ };
8489
+ var __vue_staticRenderFns__$1 = [];
8490
+ __vue_render__$1._withStripped = true;
8491
+ var __vue_inject_styles__$2 = function __vue_inject_styles__(inject) {
8492
+ if (!inject)
8493
+ return;
8494
+ inject("data-v-5cf6e4f7_0", {
8495
+ source: ".el-table-virtual-scroll.has-custom-fixed-right .el-table__cell.gutter {\n position: sticky;\n right: 0;\n}\n",
8496
+ map: {
8497
+ "version": 3,
8498
+ "sources": ["el-table-virtual-scroll.vue"],
8499
+ "names": [],
8500
+ "mappings": "AAAA;EACE,gBAAgB;EAChB,QAAQ;AACV",
8501
+ "file": "el-table-virtual-scroll.vue",
8502
+ "sourcesContent": [".el-table-virtual-scroll.has-custom-fixed-right .el-table__cell.gutter {\n position: sticky;\n right: 0;\n}\n"]
8503
+ },
8504
+ media: void 0
8505
+ }), inject("data-v-5cf6e4f7_1", {
8506
+ source: ".is-expanding[data-v-5cf6e4f7] .el-table__expand-icon {\n transition: none;\n}\n.hide-append[data-v-5cf6e4f7] .el-table__append-wrapper {\n display: none;\n}\n",
8507
+ map: {
8508
+ "version": 3,
8509
+ "sources": ["el-table-virtual-scroll.vue"],
8510
+ "names": [],
8511
+ "mappings": "AAAA;EACE,gBAAgB;AAClB;AACA;EACE,aAAa;AACf",
8512
+ "file": "el-table-virtual-scroll.vue",
8513
+ "sourcesContent": [".is-expanding /deep/ .el-table__expand-icon {\n transition: none;\n}\n.hide-append /deep/ .el-table__append-wrapper {\n display: none;\n}\n"]
8514
+ },
8515
+ media: void 0
8516
+ });
8517
+ };
8518
+ var __vue_scope_id__$2 = "data-v-5cf6e4f7";
8519
+ var __vue_module_identifier__$2 = void 0;
8520
+ var __vue_is_functional_template__$2 = false;
8521
+ var __vue_component__$2 = /* @__PURE__ */ normalizeComponent({
8522
+ render: __vue_render__$1,
8523
+ staticRenderFns: __vue_staticRenderFns__$1
8524
+ }, __vue_inject_styles__$2, __vue_script__$2, __vue_scope_id__$2, __vue_is_functional_template__$2, __vue_module_identifier__$2, false, createInjector, void 0, void 0);
8525
+ var script$1 = {
8526
+ name: "el-table-virtual-column-formatter",
8527
+ props: {
8528
+ vNode: {
8529
+ type: Object
8530
+ }
8531
+ },
8532
+ render: function render3() {
8533
+ return this.vNode;
8534
+ }
8535
+ };
8536
+ var __vue_script__$1 = script$1;
8537
+ var __vue_inject_styles__$1 = void 0;
8538
+ var __vue_scope_id__$1 = void 0;
8539
+ var __vue_module_identifier__$1 = void 0;
8540
+ var __vue_is_functional_template__$1 = void 0;
8541
+ var __vue_component__$1 = /* @__PURE__ */ normalizeComponent({}, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, void 0, void 0, void 0);
8542
+ var formatterTempObj = {
8543
+ scope: null,
8544
+ // 缓存键 当前scope参数
8545
+ result: null
8546
+ // 缓存值 formatter的调用结果
8547
+ };
8548
+ var script = {
8549
+ name: "el-table-virtual-column",
8550
+ components: {
8551
+ ElCheckbox: Checkbox,
8552
+ ElRadio: Radio,
8553
+ ElTableVirtualColumnFormatter: __vue_component__$1
8554
+ },
8555
+ inject: ["virtualScroll"],
8556
+ props: {
8557
+ selectable: {
8558
+ type: Function
8559
+ },
8560
+ reserveSelection: {
8561
+ type: Boolean,
8562
+ "default": false
8563
+ }
8564
+ },
8565
+ data: function data3() {
8566
+ return {
8567
+ isCheckedAll: false,
8568
+ // 全选
8569
+ isCheckedImn: false,
8570
+ // 控制半选样式
8571
+ isTree: false,
8572
+ // 树结构
8573
+ isNested: false,
8574
+ // 是否列嵌套
8575
+ treeNodeKey: 1
8576
+ // 更新树节点视图
8577
+ };
8578
+ },
8579
+ computed: {
8580
+ getClassName: function getClassName() {
8581
+ var classnames = [];
8582
+ var classname = this.$attrs["class-name"] || this.$attrs.className;
8583
+ classname && classnames.push(classname);
8584
+ this.isTree && classnames.push("el-table__row--level");
8585
+ var vfixed = this.$attrs.vfixed;
8586
+ if (vfixed === true || vfixed === "")
8587
+ vfixed = "left";
8588
+ if (vfixed)
8589
+ classnames.push("virtual-column__fixed-" + vfixed);
8590
+ return classnames.join(" ");
8591
+ },
8592
+ indent: function indent() {
8593
+ return (this.virtualScroll.elTable || {}).indent || 16;
8594
+ }
8595
+ },
8596
+ methods: {
8597
+ getColumnType: function getColumnType() {
8598
+ var type = this.$attrs.type;
8599
+ return ["index", "selection", "radio", "tree"].includes(type) ? "" : type;
8600
+ },
8601
+ // 获取多选禁用状态
8602
+ getDisabled: function getDisabled(scope) {
8603
+ if (this.selectable) {
8604
+ var index2 = this.getIndex(scope, false);
8605
+ return !this.selectable(scope.row, index2);
8606
+ }
8607
+ return false;
8608
+ },
8609
+ // 选择表格所有行
8610
+ onCheckAllRows: function onCheckAllRows(val) {
8611
+ var _this = this;
8612
+ var _this$virtualScroll$e = this.virtualScroll.elTable.selectOnIndeterminate, selectOnIndeterminate = _this$virtualScroll$e === void 0 ? true : _this$virtualScroll$e;
8613
+ if (selectOnIndeterminate) {
8614
+ val = this.isCheckedImn ? true : !this.isCheckedAll;
8615
+ } else {
8616
+ val = this.isCheckedImn ? false : !this.isCheckedAll;
8617
+ }
8618
+ if (this.selectable) {
8619
+ var selectableList = [];
8620
+ var list = this.virtualScroll.getData(false);
8621
+ list.forEach(function(row, index2) {
8622
+ _this.selectable(row, index2) && selectableList.push(row);
8623
+ });
8624
+ this.virtualScroll.checkAll(val, selectableList, true);
8625
+ } else {
8626
+ this.virtualScroll.checkAll(val);
8627
+ }
8628
+ var selection = this.virtualScroll.getSelection();
8629
+ this.isCheckedImn = !val && selection.length > 0;
8630
+ this.isCheckedAll = val;
8631
+ },
8632
+ // 选择表格某行
8633
+ onCheckRow: function onCheckRow(scope, val) {
8634
+ var index2 = this.getIndex(scope, false);
8635
+ if (this.selectable) {
8636
+ var isSelectable = this.selectable(scope.row, index2);
8637
+ if (!isSelectable)
8638
+ return;
8639
+ }
8640
+ this.virtualScroll.checkRow(scope.row, val, true, true);
8641
+ this.syncCheckStatus();
8642
+ },
8643
+ // 是否自定义多选
8644
+ isSelection: function isSelection() {
8645
+ return this.$attrs.type === "selection";
8646
+ },
8647
+ // 同步全选、半选框状态
8648
+ syncCheckStatus: function syncCheckStatus() {
8649
+ var _this2 = this;
8650
+ var list = this.virtualScroll.getData(false);
8651
+ var checkedLen = list.filter(function(row) {
8652
+ return row.$v_checked === true;
8653
+ }).length;
8654
+ var selection = this.virtualScroll.getSelection();
8655
+ if (checkedLen && checkedLen === list.length) {
8656
+ this.isCheckedAll = true;
8657
+ } else if (checkedLen && this.selectable) {
8658
+ this.isCheckedAll = list.every(function(row, index2) {
8659
+ var enable = _this2.selectable(row, index2);
8660
+ if (!enable)
8661
+ return true;
8662
+ return row.$v_checked;
8663
+ });
8664
+ } else {
8665
+ this.isCheckedAll = false;
8666
+ }
8667
+ this.isCheckedImn = !this.isCheckedAll && selection.length > 0;
8668
+ },
8669
+ // 单选
8670
+ onRadioChange: function onRadioChange(row) {
8671
+ this.virtualScroll.setCurrentRow(row);
8672
+ },
8673
+ // 获取索引值; add1 - 是否加1
8674
+ getIndex: function getIndex(scope) {
8675
+ var add1 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
8676
+ var index2 = this.virtualScroll.start + scope.$index;
8677
+ if (typeof this.$attrs.index === "function") {
8678
+ return this.$attrs.index(index2);
8679
+ }
8680
+ return index2 + (add1 ? 1 : 0);
8681
+ },
8682
+ // 设置正确索引值
8683
+ setScope: function setScope(scope) {
8684
+ scope.$index = this.virtualScroll.start + scope.$index;
8685
+ return scope;
8686
+ },
8687
+ // 获取树节点状态
8688
+ getTreeState: function getTreeState(row) {
8689
+ return row.$v_tree || {};
8690
+ },
8691
+ // 是否可展开
8692
+ canExpand: function canExpand(row) {
8693
+ var _ref = this.virtualScroll.treeProps || {}, _ref$children = _ref.children, children = _ref$children === void 0 ? "children" : _ref$children, _ref$hasChildren = _ref.hasChildren, hasChildren = _ref$hasChildren === void 0 ? "hasChildren" : _ref$hasChildren;
8694
+ var treeState = row.$v_tree || {};
8695
+ return (row[children] || []).length > 0 || row[hasChildren] && !treeState.loaded;
8696
+ },
8697
+ // 展开树节点
8698
+ onTreeNodeExpand: function onTreeNodeExpand(row) {
8699
+ var _this3 = this;
8700
+ return _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee() {
8701
+ var treeState, treeProps, _treeProps$hasChildre, hasChildren;
8702
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
8703
+ while (1)
8704
+ switch (_context.prev = _context.next) {
8705
+ case 0:
8706
+ treeState = row.$v_tree;
8707
+ if (!treeState) {
8708
+ _context.next = 15;
8709
+ break;
8710
+ }
8711
+ treeProps = _this3.virtualScroll.treeProps;
8712
+ _treeProps$hasChildre = treeProps.hasChildren, hasChildren = _treeProps$hasChildre === void 0 ? "hasChildren" : _treeProps$hasChildre;
8713
+ if (!treeState.loading) {
8714
+ _context.next = 6;
8715
+ break;
8716
+ }
8717
+ return _context.abrupt("return");
8718
+ case 6:
8719
+ if (!(!treeState.expanded && row[hasChildren] && !treeState.loaded)) {
8720
+ _context.next = 11;
8721
+ break;
8722
+ }
8723
+ _context.next = 9;
8724
+ return _this3.loadChildNodes(row);
8725
+ case 9:
8726
+ _context.next = 14;
8727
+ break;
8728
+ case 11:
8729
+ treeState.expanded = !treeState.expanded;
8730
+ _this3.renderTreeNode();
8731
+ _this3.virtualScroll.update();
8732
+ case 14:
8733
+ _this3.virtualScroll.elTable.$emit("expand-change", row, treeState.expanded);
8734
+ case 15:
8735
+ case "end":
8736
+ return _context.stop();
8737
+ }
8738
+ }, _callee);
8739
+ }))();
8740
+ },
8741
+ // 加载子节点
8742
+ loadChildNodes: function loadChildNodes(row) {
8743
+ var _this4 = this;
8744
+ return _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee2() {
8745
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
8746
+ while (1)
8747
+ switch (_context2.prev = _context2.next) {
8748
+ case 0:
8749
+ return _context2.abrupt("return", new Promise(function(resolve) {
8750
+ var treeProps = _this4.virtualScroll.treeProps;
8751
+ var load = _this4.virtualScroll.elTable.load;
8752
+ if (!load)
8753
+ return resolve();
8754
+ var _treeProps$children = treeProps.children, children = _treeProps$children === void 0 ? "children" : _treeProps$children;
8755
+ var treeState = row.$v_tree;
8756
+ treeState.loading = true;
8757
+ _this4.renderTreeNode();
8758
+ function resolveFn(data4) {
8759
+ if (!Array.isArray(data4)) {
8760
+ throw new Error("[ElTable] data must be an array");
8761
+ }
8762
+ treeState.loading = false;
8763
+ treeState.loaded = true;
8764
+ treeState.expanded = true;
8765
+ this.renderTreeNode();
8766
+ if (!Array.isArray(data4)) {
8767
+ resolve();
8768
+ return;
8769
+ }
8770
+ this.$set(row, children, data4);
8771
+ this.virtualScroll.update();
8772
+ resolve();
8773
+ }
8774
+ load(row, treeState, resolveFn.bind(_this4));
8775
+ }));
8776
+ case 1:
8777
+ case "end":
8778
+ return _context2.stop();
8779
+ }
8780
+ }, _callee2);
8781
+ }))();
8782
+ },
8783
+ // 由于$v_tree不是响应式数据,$v_tree状态的变更需要手动触发视图的更新
8784
+ renderTreeNode: function renderTreeNode() {
8785
+ this.treeNodeKey = this.treeNodeKey === 1 ? 2 : 1;
8786
+ },
8787
+ // 判断内容是否为VNode
8788
+ isVNode: function isVNode(vNode) {
8789
+ return this._vnode.constructor === (vNode === null || vNode === void 0 ? void 0 : vNode.constructor);
8790
+ },
8791
+ // 获取formatter结果,相同的scope使用缓存的结果,避免重复调用formatter函数
8792
+ // 当前与formatter有关的template的写法会使同一个scope参数被formatter连续使用两次
8793
+ // 后续的formatter调用参数都是一个全新的scope对象
8794
+ // 因此,只需判断当前scope与上一个scope是否相同即可决定是否需要使用缓存
8795
+ getFormatterResult: function getFormatterResult(scope) {
8796
+ if (formatterTempObj.scope === scope) {
8797
+ return formatterTempObj.result;
8798
+ } else {
8799
+ formatterTempObj.scope = scope;
8800
+ formatterTempObj.result = scope.column.formatter(scope.row, scope.column, scope.row[scope.column.property], scope.$index);
8801
+ return formatterTempObj.result;
8802
+ }
8803
+ }
8804
+ },
8805
+ beforeCreate: function beforeCreate() {
8806
+ var globalComponents = this.$root.$options.components;
8807
+ if (!globalComponents.ElTableColumn) {
8808
+ this.$options.components.ElTableColumn = TableColumn;
8809
+ }
8810
+ },
8811
+ created: function created2() {
8812
+ this.isNested = !!this.$slots["default"];
8813
+ this.virtualScroll.addColumn(this);
8814
+ var type = this.$attrs.type;
8815
+ if (type === "expand") {
8816
+ this.virtualScroll.useExpandTable();
8817
+ } else if (type === "tree") {
8818
+ this.isTree = true;
8819
+ this.virtualScroll.useCustomTree();
8820
+ } else if (type === "selection") {
8821
+ this.virtualScroll.useCustomSelection();
8822
+ }
8823
+ },
8824
+ beforeDestroy: function beforeDestroy2() {
8825
+ this.virtualScroll.removeColumn(this);
8826
+ formatterTempObj.scope = null;
8827
+ formatterTempObj.result = null;
8828
+ }
8829
+ };
8830
+ var __vue_script__ = script;
8831
+ var __vue_render__2 = function __vue_render__3() {
8832
+ var _vm = this;
8833
+ var _h = _vm.$createElement;
8834
+ var _c = _vm._self._c || _h;
8835
+ return _c("el-table-column", _vm._g(_vm._b({
8836
+ attrs: {
8837
+ type: _vm.getColumnType(),
8838
+ "class-name": _vm.getClassName
8839
+ },
8840
+ scopedSlots: _vm._u([{
8841
+ key: "header",
8842
+ fn: function fn(scope) {
8843
+ return [_vm.$scopedSlots["header"] ? _vm._t("header", null, null, scope) : [_vm.$attrs.type === "selection" ? _c("el-checkbox", {
8844
+ attrs: {
8845
+ value: _vm.isCheckedAll,
8846
+ indeterminate: _vm.isCheckedImn
8847
+ },
8848
+ on: {
8849
+ change: _vm.onCheckAllRows
8850
+ }
8851
+ }) : [_vm._v("\n " + _vm._s(scope.column.label) + "\n ")]]];
8852
+ }
8853
+ }, {
8854
+ key: "default",
8855
+ fn: function fn(scope) {
8856
+ return [_vm.isTree ? [_c("span", {
8857
+ staticClass: "el-table__indent",
8858
+ style: {
8859
+ paddingLeft: _vm.getTreeState(scope.row).level * _vm.indent + "px"
8860
+ }
8861
+ }), _vm._v(" "), _vm.canExpand(scope.row) && _vm.treeNodeKey ? _c("div", {
8862
+ staticClass: "el-table__expand-icon",
8863
+ "class": _vm.getTreeState(scope.row).expanded ? "el-table__expand-icon--expanded" : "",
8864
+ on: {
8865
+ click: function click($event) {
8866
+ return _vm.onTreeNodeExpand(scope.row);
8867
+ }
8868
+ }
8869
+ }, [_vm.getTreeState(scope.row).loading ? _c("i", {
8870
+ staticClass: "el-icon-loading"
8871
+ }) : _c("i", {
8872
+ staticClass: "el-icon-arrow-right"
8873
+ })]) : _c("span", {
8874
+ staticClass: "el-table__placeholder"
8875
+ })] : _vm._e(), _vm._v(" "), _vm.$scopedSlots["default"] ? _vm._t("default", null, null, _vm.setScope(scope)) : [_vm.$attrs.type === "selection" ? _c("el-checkbox", {
8876
+ attrs: {
8877
+ value: scope.row.$v_checked || false,
8878
+ disabled: _vm.getDisabled(scope)
8879
+ },
8880
+ on: {
8881
+ change: function change($event) {
8882
+ return _vm.onCheckRow(scope, !scope.row.$v_checked);
8883
+ }
8884
+ },
8885
+ nativeOn: {
8886
+ click: function click($event) {
8887
+ $event.stopPropagation();
8888
+ }
8889
+ }
8890
+ }) : _vm._e(), _vm._v(" "), _vm.$attrs.type === "radio" ? _c("el-radio", {
8891
+ attrs: {
8892
+ label: true,
8893
+ value: _vm.virtualScroll.curRow === scope.row
8894
+ },
8895
+ on: {
8896
+ change: function change($event) {
8897
+ return _vm.onRadioChange(scope.row);
8898
+ }
8899
+ }
8900
+ }, [_c("span")]) : _vm.$attrs.type === "index" ? _c("span", [_vm._v("\n " + _vm._s(_vm.getIndex(scope)) + "\n ")]) : scope.column.formatter ? [_vm.isVNode(_vm.getFormatterResult(scope)) ? _c("el-table-virtual-column-formatter", {
8901
+ attrs: {
8902
+ "v-node": _vm.getFormatterResult(scope)
8903
+ }
8904
+ }) : [_vm._v(_vm._s(_vm.getFormatterResult(scope)))]] : [_vm._v("\n " + _vm._s(scope.row[scope.column.property]) + "\n ")]]];
8905
+ }
8906
+ }], null, true)
8907
+ }, "el-table-column", _vm.$attrs, false), _vm.$listeners), [_vm._v(" "), _vm.isNested ? [_vm._t("default")] : _vm._e()], 2);
8908
+ };
8909
+ var __vue_staticRenderFns__ = [];
8910
+ __vue_render__2._withStripped = true;
8911
+ var __vue_inject_styles__2 = function __vue_inject_styles__3(inject) {
8912
+ if (!inject)
8913
+ return;
8914
+ inject("data-v-4703507b_0", {
8915
+ source: '.el-table-virtual-scroll .virtual-column__fixed-left,\n.el-table-virtual-scroll .virtual-column__fixed-right {\n position: sticky !important;\n z-index: 2 !important;\n background: #fff;\n}\n.el-table-virtual-scroll.is-scrolling-left .is-last-column:before {\n box-shadow: none;\n}\n.el-table-virtual-scroll.is-scrolling-right .is-last-column,\n.el-table-virtual-scroll.is-scrolling-middle .is-last-column {\n border-right: none;\n}\n.el-table-virtual-scroll.is-scrolling-right .is-first-column:before {\n box-shadow: none;\n}\n.el-table-virtual-scroll.is-scrolling-left .is-first-column,\n.el-table-virtual-scroll.is-scrolling-middle .is-first-column {\n border-left: none;\n}\n.el-table-virtual-scroll .is-last-column,\n.el-table-virtual-scroll .is-first-column {\n overflow: visible !important;\n}\n.el-table-virtual-scroll .is-last-column:before,\n.el-table-virtual-scroll .is-first-column:before {\n content: "";\n position: absolute;\n top: 0px;\n width: 10px;\n bottom: -1px;\n overflow-x: hidden;\n overflow-y: hidden;\n touch-action: none;\n pointer-events: none;\n}\n.el-table-virtual-scroll .is-last-column:before {\n right: -10px;\n box-shadow: inset 10px 0 10px -10px rgba(0, 0, 0, 0.12);\n}\n.el-table-virtual-scroll .is-first-column:before {\n left: -10px;\n box-shadow: inset -10px 0 10px -10px rgba(0, 0, 0, 0.12);\n}\n.el-table-virtual-scroll.is-scrolling-none .is-last-column:before,\n.el-table-virtual-scroll.is-scrolling-none .is-first-column:before {\n content: none;\n}\n',
8916
+ map: {
8917
+ "version": 3,
8918
+ "sources": ["el-table-virtual-column.vue"],
8919
+ "names": [],
8920
+ "mappings": "AAAA;;EAEE,2BAA2B;EAC3B,qBAAqB;EACrB,gBAAgB;AAClB;AACA;EACE,gBAAgB;AAClB;AACA;;EAEE,kBAAkB;AACpB;AACA;EACE,gBAAgB;AAClB;AACA;;EAEE,iBAAiB;AACnB;AACA;;EAEE,4BAA4B;AAC9B;AACA;;EAEE,WAAW;EACX,kBAAkB;EAClB,QAAQ;EACR,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,kBAAkB;EAClB,kBAAkB;EAClB,oBAAoB;AACtB;AACA;EACE,YAAY;EACZ,uDAAuD;AACzD;AACA;EACE,WAAW;EACX,wDAAwD;AAC1D;AACA;;EAEE,aAAa;AACf",
8921
+ "file": "el-table-virtual-column.vue",
8922
+ "sourcesContent": ['.el-table-virtual-scroll .virtual-column__fixed-left,\n.el-table-virtual-scroll .virtual-column__fixed-right {\n position: sticky !important;\n z-index: 2 !important;\n background: #fff;\n}\n.el-table-virtual-scroll.is-scrolling-left .is-last-column:before {\n box-shadow: none;\n}\n.el-table-virtual-scroll.is-scrolling-right .is-last-column,\n.el-table-virtual-scroll.is-scrolling-middle .is-last-column {\n border-right: none;\n}\n.el-table-virtual-scroll.is-scrolling-right .is-first-column:before {\n box-shadow: none;\n}\n.el-table-virtual-scroll.is-scrolling-left .is-first-column,\n.el-table-virtual-scroll.is-scrolling-middle .is-first-column {\n border-left: none;\n}\n.el-table-virtual-scroll .is-last-column,\n.el-table-virtual-scroll .is-first-column {\n overflow: visible !important;\n}\n.el-table-virtual-scroll .is-last-column:before,\n.el-table-virtual-scroll .is-first-column:before {\n content: "";\n position: absolute;\n top: 0px;\n width: 10px;\n bottom: -1px;\n overflow-x: hidden;\n overflow-y: hidden;\n touch-action: none;\n pointer-events: none;\n}\n.el-table-virtual-scroll .is-last-column:before {\n right: -10px;\n box-shadow: inset 10px 0 10px -10px rgba(0, 0, 0, 0.12);\n}\n.el-table-virtual-scroll .is-first-column:before {\n left: -10px;\n box-shadow: inset -10px 0 10px -10px rgba(0, 0, 0, 0.12);\n}\n.el-table-virtual-scroll.is-scrolling-none .is-last-column:before,\n.el-table-virtual-scroll.is-scrolling-none .is-first-column:before {\n content: none;\n}\n']
8923
+ },
8924
+ media: void 0
8925
+ });
8926
+ };
8927
+ var __vue_scope_id__ = void 0;
8928
+ var __vue_module_identifier__ = void 0;
8929
+ var __vue_is_functional_template__ = false;
8930
+ var __vue_component__ = /* @__PURE__ */ normalizeComponent({
8931
+ render: __vue_render__2,
8932
+ staticRenderFns: __vue_staticRenderFns__
8933
+ }, __vue_inject_styles__2, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, createInjector, void 0, void 0);
8934
+ const __sfc_main = defineComponent({
8935
+ name: "nf-table"
8936
+ });
8937
+ __sfc_main.props = {
8938
+ data: {
8939
+ key: "data",
8940
+ required: false,
8941
+ type: Array,
8942
+ default: () => []
8943
+ },
8944
+ columns: {
8945
+ key: "columns",
8946
+ required: false,
8947
+ type: [Array, null],
8948
+ default: () => []
8949
+ },
8950
+ searchFormAttrs: {
8951
+ key: "searchFormAttrs",
8952
+ required: false,
8953
+ type: null,
8954
+ default: () => ({})
8955
+ },
8956
+ searchFormEvents: {
8957
+ key: "searchFormEvents",
8958
+ required: false,
8959
+ type: Object,
8960
+ default: () => ({})
8961
+ },
8962
+ tableAttrs: {
8963
+ key: "tableAttrs",
8964
+ required: false,
8965
+ type: null,
8966
+ default: () => ({})
8967
+ },
8968
+ tableEvents: {
8969
+ key: "tableEvents",
8970
+ required: false,
8971
+ type: Object,
8972
+ default: () => ({})
8973
+ },
8974
+ pageAttrs: {
8975
+ key: "pageAttrs",
8976
+ required: false,
8977
+ type: null,
8978
+ default: () => ({})
8979
+ },
8980
+ pageEvents: {
8981
+ key: "pageEvents",
8982
+ required: false,
8983
+ type: Object,
8984
+ default: () => ({})
8985
+ },
8986
+ actionBarOptList: {
8987
+ key: "actionBarOptList",
8988
+ required: false,
8989
+ type: Array,
8990
+ default: () => []
8991
+ },
8992
+ initSearchApi: {
8993
+ key: "initSearchApi",
8994
+ required: false,
8995
+ type: [Boolean, null],
8996
+ default: void 0
8997
+ },
8998
+ pageChangeSearchApi: {
8999
+ key: "pageChangeSearchApi",
9000
+ required: false,
9001
+ type: [Boolean, null],
9002
+ default: void 0
9003
+ },
9004
+ pageKeys: {
9005
+ key: "pageKeys",
9006
+ required: false,
9007
+ type: Array,
9008
+ default: () => ["pageNo", "pageSize"]
9009
+ },
9010
+ setEasyConf: {
9011
+ key: "setEasyConf",
9012
+ required: false,
9013
+ type: Boolean,
9014
+ default: false
9015
+ },
9016
+ detectResize: {
9017
+ key: "detectResize",
9018
+ required: false,
9019
+ type: Boolean,
9020
+ default: false
9021
+ },
9022
+ dragCached: {
9023
+ key: "dragCached",
9024
+ required: false,
9025
+ type: Boolean,
9026
+ default: true
9027
+ },
9028
+ emptyImageSize: {
9029
+ key: "emptyImageSize",
9030
+ required: false,
9031
+ type: Number,
9032
+ default: 145
9033
+ },
9034
+ emptyText: {
9035
+ key: "emptyText",
9036
+ required: false,
9037
+ type: String,
9038
+ default: ""
9039
+ },
9040
+ calHeight: {
9041
+ key: "calHeight",
9042
+ required: false,
9043
+ type: Boolean,
9044
+ default: false
9045
+ },
9046
+ columnEdit: {
9047
+ key: "columnEdit",
9048
+ required: false,
9049
+ type: Boolean,
9050
+ default: false
9051
+ },
9052
+ columnPosition: {
9053
+ key: "columnPosition",
9054
+ required: false,
9055
+ type: String,
9056
+ default: "embed"
9057
+ },
9058
+ checkMode: {
9059
+ key: "checkMode",
9060
+ required: false,
9061
+ type: String,
9062
+ default: "drawer"
9063
+ },
9064
+ priority: {
9065
+ key: "priority",
9066
+ required: false,
9067
+ type: String,
9068
+ default: "cached"
9069
+ },
9070
+ storageKey: {
9071
+ key: "storageKey",
9072
+ required: false,
9073
+ type: String,
9074
+ default: ""
9075
+ },
9076
+ searchFormStorageKey: {
9077
+ key: "searchFormStorageKey",
9078
+ required: false,
9079
+ type: String,
9080
+ default: ""
9081
+ },
9082
+ showColumn: {
9083
+ key: "showColumn",
9084
+ required: false,
9085
+ type: Array,
9086
+ default: void 0
9087
+ },
9088
+ selectEmptyWarningTips: {
9089
+ key: "selectEmptyWarningTips",
9090
+ required: false,
9091
+ type: String,
9092
+ default: "请选择至少一个选项"
9093
+ },
9094
+ columnDisplayBtnClass: {
9095
+ key: "columnDisplayBtnClass",
9096
+ required: false,
9097
+ type: String,
9098
+ default: ""
9099
+ },
9100
+ columnDisplayBtnIcon: {
9101
+ key: "columnDisplayBtnIcon",
9102
+ required: false,
9103
+ type: String,
9104
+ default: "el-icon-plus"
9105
+ },
9106
+ columnDisplayBtnType: {
9107
+ key: "columnDisplayBtnType",
9108
+ required: false,
9109
+ type: String,
9110
+ default: "primary"
9111
+ },
9112
+ columnDisplayBtnPlain: {
9113
+ key: "columnDisplayBtnPlain",
9114
+ required: false,
9115
+ type: Boolean,
9116
+ default: true
9117
+ },
9118
+ columnDisplayBtnSize: {
9119
+ key: "columnDisplayBtnSize",
9120
+ required: false,
9121
+ type: String,
9122
+ default: "mini"
9123
+ },
9124
+ columnDisplayBtnRound: {
9125
+ key: "columnDisplayBtnRound",
9126
+ required: false,
9127
+ type: Boolean,
9128
+ default: false
9129
+ },
9130
+ columnDisplayBtnCircle: {
9131
+ key: "columnDisplayBtnCircle",
9132
+ required: false,
9133
+ type: Boolean,
9134
+ default: false
9135
+ },
9136
+ columnDisplayBtnLoading: {
9137
+ key: "columnDisplayBtnLoading",
9138
+ required: false,
9139
+ type: Boolean,
9140
+ default: false
9141
+ },
9142
+ columnDisplayBtnDisabled: {
9143
+ key: "columnDisplayBtnDisabled",
9144
+ required: false,
9145
+ type: Boolean,
9146
+ default: false
9147
+ },
9148
+ columnDisplayBtnText: {
9149
+ key: "columnDisplayBtnText",
9150
+ required: false,
9151
+ type: String,
9152
+ default: "设置列表字段"
9153
+ },
9154
+ columnCheckTitle: {
9155
+ key: "columnCheckTitle",
9156
+ required: false,
9157
+ type: String,
9158
+ default: "设置显示字段"
9159
+ },
9160
+ columnCheckCancelButtonText: {
9161
+ key: "columnCheckCancelButtonText",
9162
+ required: false,
9163
+ type: String,
9164
+ default: "取消"
6139
9165
  },
6140
9166
  columnCheckConfirmButtonText: {
6141
9167
  key: "columnCheckConfirmButtonText",
@@ -6350,6 +9376,24 @@ __sfc_main.props = {
6350
9376
  required: false,
6351
9377
  type: Object,
6352
9378
  default: () => ({})
9379
+ },
9380
+ virtualized: {
9381
+ key: "virtualized",
9382
+ required: false,
9383
+ type: Boolean,
9384
+ default: false
9385
+ },
9386
+ virtualTableData: {
9387
+ key: "virtualTableData",
9388
+ required: false,
9389
+ type: Array,
9390
+ default: () => []
9391
+ },
9392
+ virtualProps: {
9393
+ key: "virtualProps",
9394
+ required: false,
9395
+ type: Object,
9396
+ default: () => ({})
6353
9397
  }
6354
9398
  };
6355
9399
  __sfc_main.setup = (__props, __ctx) => {
@@ -6790,11 +9834,11 @@ __sfc_main.setup = (__props, __ctx) => {
6790
9834
  var _a2;
6791
9835
  (_a2 = nfSearchFormRef.value) == null ? void 0 : _a2.onNfSearchFormExport();
6792
9836
  };
6793
- const clearSelection = () => {
9837
+ const clearSelection2 = () => {
6794
9838
  var _a2;
6795
9839
  (_a2 = elTableRef.value) == null ? void 0 : _a2.clearSelection();
6796
9840
  };
6797
- const toggleRowSelection = (row, selected) => {
9841
+ const toggleRowSelection2 = (row, selected) => {
6798
9842
  var _a2;
6799
9843
  (_a2 = elTableRef.value) == null ? void 0 : _a2.toggleRowSelection(row, selected);
6800
9844
  };
@@ -6802,11 +9846,11 @@ __sfc_main.setup = (__props, __ctx) => {
6802
9846
  var _a2;
6803
9847
  (_a2 = elTableRef.value) == null ? void 0 : _a2.toggleAllSelection();
6804
9848
  };
6805
- const toggleRowExpansion = (row, expanded) => {
9849
+ const toggleRowExpansion2 = (row, expanded) => {
6806
9850
  var _a2;
6807
9851
  (_a2 = elTableRef.value) == null ? void 0 : _a2.toggleRowExpansion(row, expanded);
6808
9852
  };
6809
- const setCurrentRow = (row) => {
9853
+ const setCurrentRow2 = (row) => {
6810
9854
  var _a2;
6811
9855
  (_a2 = elTableRef.value) == null ? void 0 : _a2.setCurrentRow(row);
6812
9856
  };
@@ -6942,7 +9986,7 @@ __sfc_main.setup = (__props, __ctx) => {
6942
9986
  eleChildrenFixLeft[i].style.height = offsetHeight;
6943
9987
  }
6944
9988
  if (hasRightFixed) {
6945
- const eleChildrenFixRight = childrenEle[4].children[1].children[0].children[1].children;
9989
+ const eleChildrenFixRight = childrenEle[hasLeftFixed ? 4 : 3].children[1].children[0].children[1].children;
6946
9990
  eleChildrenFixRight[i].style.height = offsetHeight;
6947
9991
  }
6948
9992
  }
@@ -6956,6 +10000,16 @@ __sfc_main.setup = (__props, __ctx) => {
6956
10000
  });
6957
10001
  }
6958
10002
  };
10003
+ const wrapperProps = computed(() => {
10004
+ return {
10005
+ data: props.virtualTableData,
10006
+ ...props.virtualProps
10007
+ };
10008
+ });
10009
+ const tableData = ref([]);
10010
+ const handleVirtualChange = (scrollData) => {
10011
+ tableData.value = scrollData;
10012
+ };
6959
10013
  onMounted(() => {
6960
10014
  calcTableHeight();
6961
10015
  props.columns.forEach((i) => {
@@ -7012,6 +10066,9 @@ __sfc_main.setup = (__props, __ctx) => {
7012
10066
  fieldsConfirm,
7013
10067
  columnCheckConfirm,
7014
10068
  searchApi,
10069
+ wrapperProps,
10070
+ tableData,
10071
+ handleVirtualChange,
7015
10072
  nfTableBorder,
7016
10073
  nfSearchFormModel
7017
10074
  }, {
@@ -7034,11 +10091,11 @@ __sfc_main.setup = (__props, __ctx) => {
7034
10091
  /**
7035
10092
  * 表格setCurrentRow
7036
10093
  */
7037
- setCurrentRow,
10094
+ setCurrentRow: setCurrentRow2,
7038
10095
  /**
7039
10096
  * 表格toggleRowExpansion
7040
10097
  */
7041
- toggleRowExpansion,
10098
+ toggleRowExpansion: toggleRowExpansion2,
7042
10099
  /**
7043
10100
  * 表格toggleAllSelection
7044
10101
  */
@@ -7046,11 +10103,11 @@ __sfc_main.setup = (__props, __ctx) => {
7046
10103
  /**
7047
10104
  * 表格toggleRowSelection
7048
10105
  */
7049
- toggleRowSelection,
10106
+ toggleRowSelection: toggleRowSelection2,
7050
10107
  /**
7051
10108
  * 表格clearSelection
7052
10109
  */
7053
- clearSelection,
10110
+ clearSelection: clearSelection2,
7054
10111
  /**
7055
10112
  * 表单重置
7056
10113
  */
@@ -7159,11 +10216,13 @@ __sfc_main.setup = (__props, __ctx) => {
7159
10216
  };
7160
10217
  __sfc_main.components = Object.assign({
7161
10218
  RenderComponent,
10219
+ VirtualScroll: __vue_component__$2,
10220
+ VirtualColumn: __vue_component__,
7162
10221
  ColumnCheckDialog,
7163
10222
  ColumnCheckDrawer
7164
10223
  }, __sfc_main.components);
7165
- var _sfc_render = function render3() {
7166
- var _a, _b;
10224
+ var _sfc_render = function render4() {
10225
+ var _a, _b, _c2, _d;
7167
10226
  var _vm = this, _c = _vm._self._c;
7168
10227
  _vm._self._setupProxy;
7169
10228
  return _c("div", {
@@ -7177,14 +10236,14 @@ var _sfc_render = function render3() {
7177
10236
  "onSearch": _vm.searchApi
7178
10237
  }
7179
10238
  }, "nf-search-form", _vm.searchFormAttrer, false), _vm.searchFormEvents), [_vm._l(((_a2 = _vm.nfSearchFormRef) == null ? void 0 : _a2.renderSearchFormItemOptions) || [], function(item) {
7180
- var _a3, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B;
10239
+ var _a3, _b2, _c3, _d2, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B;
7181
10240
  return [((_a3 = item.tooltip) == null ? void 0 : _a3.slot) ? _vm._t(item.tooltip.slot, null, {
7182
10241
  "slot": item.tooltip.slot
7183
10242
  }) : _vm._e(), item.slot ? _vm._t(item.slot, null, {
7184
10243
  "slot": item.slot,
7185
10244
  "formData": _vm.nfSearchFormModel
7186
- }) : _vm._e(), ((_b2 = item.inputSlot) == null ? void 0 : _b2.prepend) ? _vm._t((_c2 = item.inputSlot) == null ? void 0 : _c2.prepend, null, {
7187
- "slot": (_d = item.inputSlot) == null ? void 0 : _d.prepend
10245
+ }) : _vm._e(), ((_b2 = item.inputSlot) == null ? void 0 : _b2.prepend) ? _vm._t((_c3 = item.inputSlot) == null ? void 0 : _c3.prepend, null, {
10246
+ "slot": (_d2 = item.inputSlot) == null ? void 0 : _d2.prepend
7188
10247
  }) : _vm._e(), ((_e = item.inputSlot) == null ? void 0 : _e.append) ? _vm._t((_f = item.inputSlot) == null ? void 0 : _f.append, null, {
7189
10248
  "slot": (_g = item.inputSlot) == null ? void 0 : _g.append
7190
10249
  }) : _vm._e(), ((_h = item.inputSlot) == null ? void 0 : _h.suffix) ? _vm._t((_i = item.inputSlot) == null ? void 0 : _i.suffix, null, {
@@ -7233,7 +10292,7 @@ var _sfc_render = function render3() {
7233
10292
  }
7234
10293
  }
7235
10294
  }, [_vm._v(" " + _vm._s(_vm.columnDisplayBtnText) + " ")])];
7236
- }) : _vm._e(), _c("el-table", _vm._g(_vm._b({
10295
+ }) : _vm._e(), !_vm.virtualized ? _c("el-table", _vm._g(_vm._b({
7237
10296
  key: _vm.elTableRefKey,
7238
10297
  ref: "elTableRef",
7239
10298
  class: {
@@ -7377,13 +10436,170 @@ var _sfc_render = function render3() {
7377
10436
  })];
7378
10437
  }, {
7379
10438
  "slot": "empty"
7380
- })], 2), _c("div", {
10439
+ })], 2) : _c("virtual-scroll", _vm._b({
10440
+ on: {
10441
+ "change": _vm.handleVirtualChange
10442
+ }
10443
+ }, "virtual-scroll", {
10444
+ ..._vm.wrapperProps
10445
+ }, false), [_c("el-table", _vm._g(_vm._b({
10446
+ key: _vm.cStorageKey,
10447
+ ref: "elTableRef",
10448
+ class: {
10449
+ "nf-table-container": true,
10450
+ "nf-default-table-border": !_vm.nfTableBorder && !((_c2 = _vm.tableAttrs) == null ? void 0 : _c2.border)
10451
+ },
10452
+ attrs: {
10453
+ "data": _vm.tableData,
10454
+ "fit": ((_d = _vm.tableAttrer) == null ? void 0 : _d.fit) ?? true,
10455
+ "height": _vm.elTableHeight
10456
+ }
10457
+ }, "el-table", _vm.tableAttrer, false), _vm.tableEventer), [_vm._l(_vm.tableColumns, function(column) {
10458
+ return [column.type && _vm.isShow(column) ? [column.type === "selection" ? _c("virtual-column", _vm._b({
10459
+ key: column.key || column.prop || column.type,
10460
+ attrs: {
10461
+ "type": "selection",
10462
+ "prop": column.prop,
10463
+ "label": _vm.resolveValue(column.label)
10464
+ }
10465
+ }, "virtual-column", column.attr, false)) : column.type !== "expand" ? _c("el-table-column", _vm._b({
10466
+ key: column.key || column.prop || column.type,
10467
+ attrs: {
10468
+ "type": column.type,
10469
+ "prop": column.prop,
10470
+ "label": _vm.resolveValue(column.label)
10471
+ }
10472
+ }, "el-table-column", column.attr, false)) : _c("el-table-column", _vm._b({
10473
+ key: column.key || column.prop || column.type,
10474
+ attrs: {
10475
+ "type": column.type,
10476
+ "prop": column.prop,
10477
+ "label": _vm.resolveValue(column.label)
10478
+ },
10479
+ scopedSlots: _vm._u([{
10480
+ key: "default",
10481
+ fn: function(scope) {
10482
+ return column.slot ? [_vm._t(column.slot, null, {
10483
+ "row": scope.row,
10484
+ "index": scope.$index
10485
+ })] : void 0;
10486
+ }
10487
+ }], null, true)
10488
+ }, "el-table-column", column.attr, false))] : !column.type && _vm.isShow(column) ? _c("el-table-column", _vm._b({
10489
+ key: column.key || column.prop || column.type,
10490
+ attrs: {
10491
+ "type": column.type,
10492
+ "prop": column.prop,
10493
+ "label": _vm.resolveValue(column.label)
10494
+ },
10495
+ scopedSlots: _vm._u([{
10496
+ key: "header",
10497
+ fn: function(scope) {
10498
+ return [_vm.columnEdit && column.prop === _vm.operationPropKey && _vm.columnPosition === "embed" ? _vm._t("operationIconColumnCheck", function() {
10499
+ return [_c("span", {
10500
+ staticStyle: {
10501
+ "white-space": "nowrap"
10502
+ }
10503
+ }, [_vm._v(" " + _vm._s(_vm.resolveValue(column.label)) + " ")]), _c("el-tooltip", {
10504
+ attrs: {
10505
+ "popper-class": "actionTooltipRef",
10506
+ "placement": "top",
10507
+ "effect": "dark",
10508
+ "content": _vm.columnDisplayBtnText
10509
+ }
10510
+ }, [_c("i", {
10511
+ staticClass: "iconfont icon-liebiao_xianshiliemu operation-icon-column-check",
10512
+ on: {
10513
+ "click": function($event) {
10514
+ _vm.nfColumCheckDialogVisible = true;
10515
+ }
10516
+ }
10517
+ })])];
10518
+ }, {
10519
+ "column": column
10520
+ }) : column.labelTooltip ? [_c("el-tooltip", {
10521
+ attrs: {
10522
+ "placement": column.labelTooltipPlacement || "right",
10523
+ "effect": "dark"
10524
+ }
10525
+ }, [_c("div", {
10526
+ attrs: {
10527
+ "slot": "content"
10528
+ },
10529
+ slot: "content"
10530
+ }, [_vm._v(_vm._s(column.labelTooltip))]), _c("span", {
10531
+ staticClass: "bottom-line",
10532
+ staticStyle: {
10533
+ "white-space": "nowrap"
10534
+ }
10535
+ }, [_vm._v(" " + _vm._s(_vm.resolveValue(column.label)) + " ")])])] : column.headerSlot ? [_vm._t(column.headerSlot, null, {
10536
+ "$index": scope.$index,
10537
+ "column": scope.column
10538
+ })] : _c("span", [_vm._v(" " + _vm._s(_vm.resolveValue(column.label)) + " ")])];
10539
+ }
10540
+ }, {
10541
+ key: "default",
10542
+ fn: function(scope) {
10543
+ var _a2;
10544
+ return [column.slot ? _vm._t(column.slot, null, {
10545
+ "row": scope.row,
10546
+ "index": scope.$index
10547
+ }) : column.render ? _c("render-component", {
10548
+ attrs: {
10549
+ "render": column.render,
10550
+ "row": scope.row
10551
+ }
10552
+ }) : column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _c("nf-action", {
10553
+ attrs: {
10554
+ "span": column.operationSpan || 0,
10555
+ "unique": scope.index
10556
+ }
10557
+ }, [_vm._l(_vm.getOperationListLocal(column, scope), function(item, index2) {
10558
+ return [!_vm.resolveValue(item.destroy, scope.row, scope) ? _c("nf-button", _vm._g({
10559
+ key: item.key || index2,
10560
+ class: _vm.resolveValue(item.class, scope.row, scope),
10561
+ style: _vm.resolveValue(item.style, scope.row, scope),
10562
+ attrs: {
10563
+ "size": _vm.resolveValue(item.size || "mini", scope.row, scope),
10564
+ "type": _vm.resolveValue(item.type || "primary", scope.row, scope, scope.row, scope),
10565
+ "text": _vm.resolveValue(item.text === void 0 ? true : item.text, scope.row, scope),
10566
+ "disabled": _vm.resolveValue(item.disabled, scope.row, scope),
10567
+ "loading": _vm.resolveValue(item.loading, scope.row, scope),
10568
+ "plain": _vm.resolveValue(item.plain, scope.row, scope),
10569
+ "icon": _vm.resolveValue(item.icon, scope.row, scope),
10570
+ "round": _vm.resolveValue(item.round, scope.row, scope),
10571
+ "circle": _vm.resolveValue(item.circle, scope.row, scope)
10572
+ }
10573
+ }, _vm.eventsOperationListBtns(item, scope)), [_vm._v(_vm._s(_vm.resolveValue(item.name, scope.row, scope)) + " ")]) : _vm._e()];
10574
+ })], 2) : ((_a2 = column.attr) == null ? void 0 : _a2.formatter) ? _c("span", [_vm._v(" " + _vm._s(column.attr.formatter(scope.row, column, scope.row[column.prop], scope.$index)) + " ")]) : column.optionsEnum ? [column.optionsTag[scope.row[column.prop]] ? _c("nf-tag", {
10575
+ attrs: {
10576
+ "type": column.optionsTag[scope.row[column.prop]],
10577
+ "value": column.optionsEnum[scope.row[column.prop]]
10578
+ }
10579
+ }) : _c("span", [_vm._v(" " + _vm._s(column.optionsEnum[scope.row[column.prop]]) + " ")])] : _c("span", [_vm._v(" " + _vm._s(scope.row[column.prop]) + _vm._s(column.unit) + " ")])];
10580
+ }
10581
+ }], null, true)
10582
+ }, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2) : _vm._e()];
10583
+ }), _vm._t("append", null, {
10584
+ "slot": "append"
10585
+ }), _vm._t("empty", function() {
10586
+ return [_c("nf-empty", {
10587
+ attrs: {
10588
+ "slot": "empty",
10589
+ "image-size": _vm.emptyImageSize,
10590
+ "description": _vm.emptyText
10591
+ },
10592
+ slot: "empty"
10593
+ })];
10594
+ }, {
10595
+ "slot": "empty"
10596
+ })], 2)], 1), _c("div", {
7381
10597
  ref: "nfTableActionContainerRef",
7382
10598
  staticClass: "nf-action-box nf-clearfix"
7383
10599
  }, [_vm._t("actionBar", function() {
7384
10600
  var _a2;
7385
10601
  return [((_a2 = _vm.actionBarOptList) == null ? void 0 : _a2.length) && !_vm.hasActionBarSlot ? [_vm._l(_vm.actionBarOptList, function(item, index2) {
7386
- var _a3, _b2, _c2, _d, _e, _f, _g, _h, _i, _j;
10602
+ var _a3, _b2, _c3, _d2, _e, _f, _g, _h, _i, _j;
7387
10603
  return [item.element === "el-button" ? _c("nf-button", _vm._g({
7388
10604
  key: item.key || index2,
7389
10605
  class: _vm.resolveValue(item.class),
@@ -7654,9 +10870,9 @@ var _sfc_render = function render3() {
7654
10870
  },
7655
10871
  expression: "item.value"
7656
10872
  }
7657
- }, item.events), [((_c2 = item.slot) == null ? void 0 : _c2.prefix) ? _vm._t(item.slot.prefix, null, {
10873
+ }, item.events), [((_c3 = item.slot) == null ? void 0 : _c3.prefix) ? _vm._t(item.slot.prefix, null, {
7658
10874
  "slot": "prefix"
7659
- }) : _vm._e(), ((_d = item.slot) == null ? void 0 : _d.suffix) ? _vm._t(item.slot.suffix, null, {
10875
+ }) : _vm._e(), ((_d2 = item.slot) == null ? void 0 : _d2.suffix) ? _vm._t(item.slot.suffix, null, {
7660
10876
  "slot": "suffix"
7661
10877
  }) : _vm._e(), ((_e = item.slot) == null ? void 0 : _e.prepend) ? _vm._t(item.slot.prepend, null, {
7662
10878
  "slot": "prepend"
@@ -7848,7 +11064,7 @@ var _sfc_render = function render3() {
7848
11064
  })], 2) : _vm._e()], 2);
7849
11065
  };
7850
11066
  var _sfc_staticRenderFns = [];
7851
- var __component__ = /* @__PURE__ */ normalizeComponent(__sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, null, null, null);
11067
+ var __component__ = /* @__PURE__ */ normalizeComponent$1(__sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, null, null, null);
7852
11068
  const NfTable = __component__.exports;
7853
11069
  NfTable.install = (app) => {
7854
11070
  if (!app.$openMessage) {