@94ai/nf-table 8.1.1 → 8.1.3

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