@opentinyvue/vue-grid 3.26.0 → 3.28.0

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.
package/lib/index.js CHANGED
@@ -4,8 +4,8 @@ import { Interceptor, StoreMap } from '@opentinyvue/vue-renderless/grid/core';
4
4
  import { debounce, PopupManager, PopperJS, extend, browserInfo, isObject, isEmptyObject, isServer, throttle, addClass, removeClass, getDataset, random, isNull, getActualTarget, fastdom, toDecimal, logger, tryToCurrency, tryToDecimal, tryToInt, toFileSize, truncate, toRate, isNumber as isNumber$1, toBoolValue, toDate, getDateWithNewTimezone, isDate, formatDateByPattern, toDateStr, on, Validator as Validator$1, getObj, getStyle, preventDefault, off, callInterceptor, hasClass } from '@opentinyvue/utils';
5
5
  import { iconError, iconSortTriangleDescending, iconSortTriangleAscending, iconSortTriangle, iconUnfilter, iconEdit, iconConmentRefresh, iconMinscreen, iconFullscreen, iconSetting, iconChevronRight, iconChevronDown, iconGridNoData, iconRadio, iconRadioselected, iconSearch, iconCheckedSur, iconCheck, iconHalfselect, iconArrowBottom, IconEllipsis, iconClose, iconYes, iconExpand, iconPutAway, iconEllipsis, iconMarkOn } from '@opentinyvue/vue-icon';
6
6
  import { $prefix, hooks, defineComponent, h, $install, isVue2, isVnode, $props, mergeClass, resolveTheme, useInstanceSlots, useRelation, emitter, resolveMode, useBreakpoint, setup as setup$1 } from '@opentinyvue/vue-common';
7
- import { uniqueId, toNumber as toNumber$1, isBoolean, each, isObject as isObject$1, isFunction, isArray, findIndexOf, get, set, clone, clear, destructuring, mapTree, has, isUndefined, find as find$1, isEqual, filterTree, arrayEach, isNumber, findTree as findTree$1, sum, template, assign, objectMap, eachTree, sortBy, isString, remove, toStringJSON, toArray, arrayIndexOf } from '@opentinyvue/vue-renderless/grid/static/';
8
- import { getFuncText, getDomNode, getRowid, getEventTargetNode, isScale, emitEvent, hasChildrenList, getListeners, getOffsetPos, getFilters, getColumnConfig, formatText, getRowkey, dfsCopy, getRowUniqueId, setCellValue, getColumnList, repairFixed, rowToVisible, colToVisible, getCell, assemColumn, GlobalEvent, getCellValue, updateCellTitle, isPx, getClass, getRowNodes, getCellNodeIndex } from '@opentinyvue/vue-renderless/grid/utils';
7
+ import { uniqueId, toNumber as toNumber$1, isBoolean, each, isObject as isObject$1, isFunction, isArray, findIndexOf, get, set, clone, clear, destructuring, mapTree, eachTree, has, isUndefined, isEqual, find as find$1, filterTree, arrayEach, isNumber, findTree as findTree$1, sum, template, assign, objectMap, sortBy, isString, remove, toStringJSON, toArray, arrayIndexOf } from '@opentinyvue/vue-renderless/grid/static/';
8
+ import { getFuncText, getDomNode, getRowid, getEventTargetNode, isScale, emitEvent, hasChildrenList, getListeners, getOffsetPos, getFilters, getColumnConfig, formatText, getRowkey, getRowUniqueId, setCellValue, getColumnList, repairFixed, rowToVisible, colToVisible, getCell, assemColumn, GlobalEvent, getCellValue, updateCellTitle, isPx, getClass, getRowNodes, getCellNodeIndex } from '@opentinyvue/vue-renderless/grid/utils';
9
9
  import Tooltip$1 from '@opentinyvue/vue-tooltip';
10
10
  import { createVNode, mergeProps, isVNode, createTextVNode, resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, createCommentVNode, normalizeStyle, Fragment, renderList } from 'vue';
11
11
  import { toNumber, findTree, find, isEqual as isEqual$1, arrayEach as arrayEach$1 } from '@opentinyvue/vue-renderless/grid/static';
@@ -225,6 +225,7 @@ function _extends() {
225
225
  var GlobalConfig$1 = {
226
226
  validConfig: {
227
227
  message: "tooltip",
228
+ highlightError: false,
228
229
  icon: iconError()
229
230
  },
230
231
  editConfig: {
@@ -1794,7 +1795,7 @@ var useData = function useData2(props) {
1794
1795
  }], function(_ref15) {
1795
1796
  _ref15[0]; var length = _ref15[1];
1796
1797
  tiledLength.value = length;
1797
- $table == null ? void 0 : $table.handleDataChange();
1798
+ $table.updateRawData(props.data);
1798
1799
  });
1799
1800
  return {
1800
1801
  tiledLength
@@ -1817,7 +1818,7 @@ var calcHeader = function calcHeader2(collectColumn2) {
1817
1818
  levelMap.set(item, level);
1818
1819
  _traverseTree(item.children, level + 1, item);
1819
1820
  });
1820
- } else {
1821
+ } else if (parent) {
1821
1822
  leafColumns.push(parent);
1822
1823
  }
1823
1824
  };
@@ -1903,12 +1904,12 @@ var useHeader = function useHeader2(props, bodyVm, headerRowHeight) {
1903
1904
  };
1904
1905
  };
1905
1906
  var getEventSource = function getEventSource2(e, $table) {
1906
- var _tableEl$dataset, _$table$getColumnNode, _rowEl$dataset, _rowEl$dataset$rowid;
1907
+ var _tableEl$dataset, _$table$getColumnNode, _rowEl$dataset, _rowid;
1907
1908
  var target = e.target;
1908
1909
  var tableEl = target.closest(".tiny-grid__body");
1909
1910
  if (((_tableEl$dataset = tableEl.dataset) == null ? void 0 : _tableEl$dataset.tableid) !== String($table.id)) return;
1910
1911
  var cellEl = target.closest(".tiny-grid-header__column");
1911
- var rowEl, part, rowType, row2, column;
1912
+ var rowEl, part, rowType, row2, column, rowid2;
1912
1913
  if (cellEl) {
1913
1914
  rowEl = cellEl.parentNode;
1914
1915
  part = "header";
@@ -1921,12 +1922,17 @@ var getEventSource = function getEventSource2(e, $table) {
1921
1922
  }
1922
1923
  if (!part || !cellEl || !rowEl) return;
1923
1924
  column = (_$table$getColumnNode = $table.getColumnNode(cellEl)) == null ? void 0 : _$table$getColumnNode.item;
1924
- if ((_rowEl$dataset = rowEl.dataset) != null && (_rowEl$dataset$rowid = _rowEl$dataset.rowid) != null && _rowEl$dataset$rowid.startsWith("row_g_")) {
1925
+ rowid2 = (_rowEl$dataset = rowEl.dataset) == null ? void 0 : _rowEl$dataset.rowid;
1926
+ if ((_rowid = rowid2) != null && _rowid.startsWith("row_g_")) {
1925
1927
  rowType = "virtual";
1926
1928
  } else if (part === "body") {
1927
- var _$table$getRowNode;
1928
1929
  rowType = "normal";
1929
- row2 = (_$table$getRowNode = $table.getRowNode(rowEl)) == null ? void 0 : _$table$getRowNode.item;
1930
+ if ($table.editStore.insertMap.has(rowid2)) {
1931
+ row2 = $table.editStore.insertMap.get(rowid2);
1932
+ } else {
1933
+ var _$table$getRowNode;
1934
+ row2 = (_$table$getRowNode = $table.getRowNode(rowEl)) == null ? void 0 : _$table$getRowNode.item;
1935
+ }
1930
1936
  }
1931
1937
  return {
1932
1938
  part,
@@ -1997,6 +2003,38 @@ var getEventParams = function getEventParams2(_ref17, $table) {
1997
2003
  var isOperateMouse = function isOperateMouse2($table) {
1998
2004
  return $table._isResize || $table.lastScrollTime && Date.now() < $table.lastScrollTime + $table.optimizeOpts.delayHover;
1999
2005
  };
2006
+ var hideAlignLines = function hideAlignLines2($table, cell) {
2007
+ var _$table$mouseConfig;
2008
+ if (!((_$table$mouseConfig = $table.mouseConfig) != null && _$table$mouseConfig.hover) || cell) {
2009
+ return;
2010
+ }
2011
+ var xBar = $table.elemStore["main-body-alignXBar"];
2012
+ var yBar = $table.elemStore["main-body-alignYBar"];
2013
+ if (xBar) {
2014
+ xBar.style.display = "none";
2015
+ }
2016
+ if (yBar) {
2017
+ yBar.style.display = "none";
2018
+ }
2019
+ };
2020
+ var showAlignLines = function showAlignLines2($table, cell) {
2021
+ var _$table$mouseConfig2;
2022
+ if (!((_$table$mouseConfig2 = $table.mouseConfig) != null && _$table$mouseConfig2.hover)) {
2023
+ return;
2024
+ }
2025
+ var xBar = $table.elemStore["main-body-alignXBar"];
2026
+ var yBar = $table.elemStore["main-body-alignYBar"];
2027
+ if (xBar) {
2028
+ xBar.style.display = "block";
2029
+ xBar.style.top = cell.offsetTop - 1 + "px";
2030
+ xBar.style.setProperty("--after-top-offset", cell.offsetHeight + "px");
2031
+ }
2032
+ if (yBar) {
2033
+ yBar.style.display = "block";
2034
+ yBar.style.left = cell.offsetLeft - 1 + "px";
2035
+ yBar.style.setProperty("--after-left-offset", cell.offsetWidth + "px");
2036
+ }
2037
+ };
2000
2038
  var useCellEvent = function useCellEvent2(_ref21) {
2001
2039
  var table = _ref21.table, $table = _ref21.$table;
2002
2040
  var isBound = false;
@@ -2044,7 +2082,7 @@ var useCellEvent = function useCellEvent2(_ref21) {
2044
2082
  var source = getEventSource(e, $table);
2045
2083
  if (source) {
2046
2084
  var params = getEventParams(source, $table);
2047
- var _$table$mouseConfig = $table.mouseConfig, mouseConfig = _$table$mouseConfig === void 0 ? {} : _$table$mouseConfig;
2085
+ var _$table$mouseConfig3 = $table.mouseConfig, mouseConfig = _$table$mouseConfig3 === void 0 ? {} : _$table$mouseConfig3;
2048
2086
  if (source.part === "header" && mouseConfig.checked) {
2049
2087
  $table.triggerHeaderCellMousedownEvent(e, params);
2050
2088
  }
@@ -2062,7 +2100,7 @@ var useCellEvent = function useCellEvent2(_ref21) {
2062
2100
  var satisfy = function satisfy2(equal, trigger2) {
2063
2101
  return trigger2 === "row" || equal(column) && trigger2 === "cell";
2064
2102
  };
2065
- var editConfig = $table.editConfig, _$table$expandConfig = $table.expandConfig, expandConfig = _$table$expandConfig === void 0 ? {} : _$table$expandConfig, highlightCurrentColumn = $table.highlightCurrentColumn, highlightCurrentRow = $table.highlightCurrentRow, _$table$mouseConfig2 = $table.mouseConfig, mouseConfig = _$table$mouseConfig2 === void 0 ? {} : _$table$mouseConfig2, _$table$radioConfig = $table.radioConfig, radioConfig = _$table$radioConfig === void 0 ? {} : _$table$radioConfig, _$table$selectConfig = $table.selectConfig, selectConfig = _$table$selectConfig === void 0 ? {} : _$table$selectConfig, sortOpts2 = $table.sortOpts, tableListeners = $table.tableListeners, _$table$treeConfig = $table.treeConfig, treeConfig = _$table$treeConfig === void 0 ? {} : _$table$treeConfig;
2103
+ var editConfig = $table.editConfig, _$table$expandConfig = $table.expandConfig, expandConfig = _$table$expandConfig === void 0 ? {} : _$table$expandConfig, highlightCurrentColumn = $table.highlightCurrentColumn, highlightCurrentRow = $table.highlightCurrentRow, _$table$mouseConfig4 = $table.mouseConfig, mouseConfig = _$table$mouseConfig4 === void 0 ? {} : _$table$mouseConfig4, _$table$radioConfig = $table.radioConfig, radioConfig = _$table$radioConfig === void 0 ? {} : _$table$radioConfig, _$table$selectConfig = $table.selectConfig, selectConfig = _$table$selectConfig === void 0 ? {} : _$table$selectConfig, sortOpts2 = $table.sortOpts, tableListeners = $table.tableListeners, _$table$treeConfig = $table.treeConfig, treeConfig = _$table$treeConfig === void 0 ? {} : _$table$treeConfig;
2066
2104
  if (source.part === "header" && (highlightCurrentColumn || tableListeners["header-cell-click"] || mouseConfig.checked || sortOpts2.trigger === "cell")) {
2067
2105
  $table.triggerHeaderCellClickEvent(e, params);
2068
2106
  }
@@ -2194,6 +2232,7 @@ var useCellEvent = function useCellEvent2(_ref21) {
2194
2232
  if (tableListeners["cell-mouseleave"]) {
2195
2233
  emitEvent($table, "cell-mouseleave", [params, e]);
2196
2234
  }
2235
+ hideAlignLines($table, curCell);
2197
2236
  }
2198
2237
  }
2199
2238
  if (curCell) {
@@ -2203,6 +2242,7 @@ var useCellEvent = function useCellEvent2(_ref21) {
2203
2242
  if (tableListeners["cell-mouseenter"]) {
2204
2243
  emitEvent($table, "cell-mouseenter", [_params, _e]);
2205
2244
  }
2245
+ showAlignLines($table, curCell);
2206
2246
  }
2207
2247
  }
2208
2248
  });
@@ -2471,6 +2511,69 @@ var adjustColspan = function adjustColspan2(table, pos, isLeft) {
2471
2511
  }
2472
2512
  }
2473
2513
  };
2514
+ var useNormalData = function useNormalData2(_ref34) {
2515
+ var _hooks$getCurrentInst4;
2516
+ var props = _ref34.props, tableFullColumn = _ref34.tableFullColumn;
2517
+ var $table = (_hooks$getCurrentInst4 = hooks.getCurrentInstance()) == null ? void 0 : _hooks$getCurrentInst4.proxy;
2518
+ var rawData = hooks.ref([]);
2519
+ var rawDataVersion = hooks.ref(0);
2520
+ var editorColumns = hooks.ref([]);
2521
+ var editorColumnKey = hooks.ref("");
2522
+ hooks.watch(tableFullColumn, function(_tableFullColumn) {
2523
+ var columns2 = [];
2524
+ var columnKeys = [];
2525
+ for (var i = 0; i < _tableFullColumn.length; i++) {
2526
+ var column = _tableFullColumn[i];
2527
+ if (column.property && column.editor) {
2528
+ columns2.push(column);
2529
+ columnKeys.push(column.propety);
2530
+ }
2531
+ }
2532
+ var keyString = columnKeys.sort().join();
2533
+ if (editorColumnKey.value !== keyString) {
2534
+ editorColumnKey.value = keyString;
2535
+ editorColumns.value = columns2;
2536
+ }
2537
+ });
2538
+ hooks.watch(editorColumns, function(_editorColumns) {
2539
+ if (props.editConfig && _editorColumns.length > 0) {
2540
+ var _insertData = $table.editStore.insertList || [];
2541
+ var _rawData = rawData.value || [];
2542
+ var _data = [].concat(_insertData, _rawData);
2543
+ if (Array.isArray(_data)) {
2544
+ _data.forEach(function(row2) {
2545
+ return $table.defineField(row2, false, _editorColumns, true);
2546
+ });
2547
+ }
2548
+ }
2549
+ });
2550
+ hooks.watch(rawData, function(_rawData) {
2551
+ var _editorColumns = editorColumns.value;
2552
+ if (props.editConfig && _editorColumns.length > 0) {
2553
+ var _data = _rawData || [];
2554
+ if (Array.isArray(_data)) {
2555
+ _data.forEach(function(row2) {
2556
+ return $table.defineField(row2, false, _editorColumns);
2557
+ });
2558
+ }
2559
+ }
2560
+ rawDataVersion.value += 1;
2561
+ });
2562
+ hooks.watch(rawDataVersion, function() {
2563
+ var optimizeOpts = $table.optimizeOpts;
2564
+ var scrollY = optimizeOpts.scrollY;
2565
+ var _rawData = rawData.value || [];
2566
+ var tableFullData = Array.isArray(_rawData) ? _rawData.slice(0) : [];
2567
+ $table.tableFullData = tableFullData;
2568
+ $table.scrollYLoad = scrollY && scrollY.gt > 0 && scrollY.gt <= tableFullData.length;
2569
+ $table.updateCache(true, props.saveSource === "deep");
2570
+ $table.handleDataChange();
2571
+ });
2572
+ return {
2573
+ rawData,
2574
+ rawDataVersion
2575
+ };
2576
+ };
2474
2577
  var toRaw = hooks.toRaw;
2475
2578
  var VIRTUAL_ROW_KEY = "_$virtual_";
2476
2579
  var difference$1 = function difference$12(arr, other) {
@@ -2570,7 +2673,7 @@ var orderingGroupBy = function orderingGroupBy2(arr, key, equals, active, rowKey
2570
2673
  };
2571
2674
  var buildRowGroupFullData = function buildRowGroupFullData2(fullData, _vm) {
2572
2675
  var treeConfig = _vm.treeConfig, rowGroup = _vm.rowGroup;
2573
- var _ref34 = rowGroup || {}, field = _ref34.field, equals = _ref34.equals, activeMethod = _ref34.activeMethod;
2676
+ var _ref35 = rowGroup || {}, field = _ref35.field, equals = _ref35.equals, activeMethod = _ref35.activeMethod;
2574
2677
  _vm.hasVirtualRow = !treeConfig && rowGroup && field && fullData.length > 0;
2575
2678
  if (_vm.hasVirtualRow) {
2576
2679
  _vm.groupFullData = orderingGroupBy(fullData, field, equals || isEqual$1, activeMethod, getRowkey(_vm));
@@ -2594,14 +2697,14 @@ var handleRowGroupFold = function handleRowGroupFold2(row2, _vm) {
2594
2697
  buildRenderGraph(_vm);
2595
2698
  _vm.handleTableData().then(_vm.recalculate);
2596
2699
  };
2597
- var getFixedStyle = function getFixedStyle2(_ref35, _ref36) {
2598
- var fixedDetails = _ref35.fixedDetails;
2599
- var overflowX = _ref36.overflowX;
2700
+ var getFixedStyle = function getFixedStyle2(_ref36, _ref37) {
2701
+ var fixedDetails = _ref36.fixedDetails;
2702
+ var overflowX = _ref37.overflowX;
2600
2703
  return fixedDetails && overflowX ? fixedDetails.getStyle() : {};
2601
2704
  };
2602
- var getFixedClass = function getFixedClass2(_ref37, _ref38) {
2603
- var fixedDetails = _ref37.fixedDetails;
2604
- var overflowX = _ref38.overflowX;
2705
+ var getFixedClass = function getFixedClass2(_ref38, _ref39) {
2706
+ var fixedDetails = _ref38.fixedDetails;
2707
+ var overflowX = _ref39.overflowX;
2605
2708
  return _extends({
2606
2709
  "fixed__column": fixedDetails && overflowX
2607
2710
  }, fixedDetails && overflowX ? fixedDetails.getClass() : {});
@@ -2728,22 +2831,22 @@ var renderBorder = function renderBorder2(type) {
2728
2831
  "class": "tiny-grid-border-left"
2729
2832
  }, null)]);
2730
2833
  };
2731
- function renderColumn(_ref39) {
2732
- var _normalRows$rowid, _ref41;
2733
- var $columnIndex = _ref39.$columnIndex, $table = _ref39.$table, _vm = _ref39._vm, column = _ref39.column, id3 = _ref39.id, row2 = _ref39.row, rowid2 = _ref39.rowid, seq = _ref39.seq, used = _ref39.used;
2834
+ function renderColumn(_ref40) {
2835
+ var _normalRows$rowid, _ref42;
2836
+ var $columnIndex = _ref40.$columnIndex, $table = _ref40.$table, _vm = _ref40._vm, column = _ref40.column, id3 = _ref40.id, row2 = _ref40.row, rowid2 = _ref40.rowid, seq = _ref40.seq, used = _ref40.used;
2734
2837
  var allAlign = $table.align, cellClassName = $table.cellClassName, _$table$dropConfig = $table.dropConfig, dropConfig = _$table$dropConfig === void 0 ? {} : _$table$dropConfig, editConfig = $table.editConfig, editRules = $table.editRules, editStore = $table.editStore;
2735
2838
  var height2 = $table.height, rowId = $table.rowId, scrollXLoad = $table.scrollXLoad, scrollYLoad = $table.scrollYLoad, validOpts2 = $table.validOpts, validStore = $table.validStore, validatedMap = $table.validatedMap;
2736
2839
  var normalRows = _vm.normalRows;
2737
- var _ref40 = ((_normalRows$rowid = normalRows[rowid2]) == null ? void 0 : _normalRows$rowid[column.id]) || {}, _ref40$attrs = _ref40.attrs, attrs = _ref40$attrs === void 0 ? {
2840
+ var _ref41 = ((_normalRows$rowid = normalRows[rowid2]) == null ? void 0 : _normalRows$rowid[column.id]) || {}, _ref41$attrs = _ref41.attrs, attrs = _ref41$attrs === void 0 ? {
2738
2841
  rowspan: 1,
2739
2842
  colspan: 1,
2740
2843
  visible: true
2741
- } : _ref40$attrs, _ref40$params = _ref40.params, params = _ref40$params === void 0 ? {
2844
+ } : _ref41$attrs, _ref41$params = _ref41.params, params = _ref41$params === void 0 ? {
2742
2845
  $table,
2743
2846
  row: row2,
2744
2847
  column
2745
- } : _ref40$params;
2746
- var isMessageDefault = validOpts2.isMessageDefault, isMessageInline = validOpts2.isMessageInline;
2848
+ } : _ref41$params;
2849
+ var isMessageDefault = validOpts2.isMessageDefault, isMessageInline = validOpts2.isMessageInline, highlightError = validOpts2.highlightError;
2747
2850
  var actived = editStore.actived;
2748
2851
  var validated = validatedMap[column.id + "-" + row2[rowId]];
2749
2852
  var validError = validStore.row === row2 && validStore.column === column;
@@ -2770,7 +2873,7 @@ function renderColumn(_ref39) {
2770
2873
  "data-colindex": $columnIndex,
2771
2874
  "rowspan": attrs.rowspan > 1 ? attrs.rowspan : void 0,
2772
2875
  "colspan": attrs.colspan > 1 ? attrs.colspan : void 0,
2773
- "class": ["tiny-grid-body__column", column.id, (_ref41 = {}, _ref41["col__" + cellAlign] = cellAlign, _ref41["col__edit"] = editor, _ref41["col__index"] = column.type === "index", _ref41["col__radio"] = column.type === "radio", _ref41["col__selection"] = column.type === "selection", _ref41["col__ellipsis"] = cellOverflowHint, _ref41["edit__visible"] = editor && editor.type === "visible", _ref41["col__dirty"] = isDirty, _ref41["col__actived"] = columnActived, _ref41["col__valid-error"] = validError && validated, _ref41["col__valid-success"] = columnActived ? !validError && !validated : isDirty && !validated, _ref41["col__treenode"] = column.treeNode, _ref41), getClass(className, params), getClass(cellClassName, params), getFixedClass(column, $table), attrs._stickyClass || ""]
2876
+ "class": ["tiny-grid-body__column", column.id, (_ref42 = {}, _ref42["col__" + cellAlign] = cellAlign, _ref42["col__edit"] = editor, _ref42["col__index"] = column.type === "index", _ref42["col__radio"] = column.type === "radio", _ref42["col__selection"] = column.type === "selection", _ref42["col__ellipsis"] = cellOverflowHint, _ref42["edit__visible"] = editor && editor.type === "visible", _ref42["col__dirty"] = isDirty, _ref42["col__actived"] = columnActived, _ref42["col__highlight-error"] = highlightError && validated, _ref42["col__valid-error"] = validError && validated, _ref42["col__valid-success"] = columnActived ? !validError && !validated : isDirty && !validated, _ref42["col__treenode"] = column.treeNode, _ref42), getClass(className, params), getClass(cellClassName, params), getFixedClass(column, $table), attrs._stickyClass || ""]
2774
2877
  }, [[
2775
2878
  // 行拖拽手柄
2776
2879
  dropConfig.rowHandle === "index" && column.type === "index" ? createVNode("div", {
@@ -2803,7 +2906,7 @@ function renderHeaderRows(_vm) {
2803
2906
  var $table = _vm.$parent, headerTable = _vm.headerTable;
2804
2907
  var headerCellClassName = $table.headerCellClassName, headerRowClassName = $table.headerRowClassName, headerSuffixIconAbsolute = $table.headerSuffixIconAbsolute;
2805
2908
  var allAlign = $table.align, border = $table.border, allHeaderAlign = $table.headerAlign, resizable = $table.resizable;
2806
- var editConfig = $table.editConfig, operationColumnResizable = $table.operationColumnResizable, _$table$mouseConfig3 = $table.mouseConfig, mouseConfig = _$table$mouseConfig3 === void 0 ? {} : _$table$mouseConfig3, _$table$dropConfig2 = $table.dropConfig, dropConfig = _$table$dropConfig2 === void 0 ? {} : _$table$dropConfig2;
2909
+ var editConfig = $table.editConfig, operationColumnResizable = $table.operationColumnResizable, _$table$mouseConfig5 = $table.mouseConfig, mouseConfig = _$table$mouseConfig5 === void 0 ? {} : _$table$mouseConfig5, _$table$dropConfig2 = $table.dropConfig, dropConfig = _$table$dropConfig2 === void 0 ? {} : _$table$dropConfig2;
2807
2910
  return headerTable.map(function(cols, $rowIndex) {
2808
2911
  return createVNode("tr", {
2809
2912
  "data-rowindex": $rowIndex,
@@ -2811,9 +2914,9 @@ function renderHeaderRows(_vm) {
2811
2914
  $table,
2812
2915
  $rowIndex
2813
2916
  }) : headerRowClassName : ""]
2814
- }, [cols.map(function(_ref42, $columnIndex) {
2815
- var _column$children, _ref43;
2816
- var id3 = _ref42.id, column = _ref42.column, colspan = _ref42.colspan, rowspan = _ref42.rowspan, height2 = _ref42.height, top = _ref42.top;
2917
+ }, [cols.map(function(_ref43, $columnIndex) {
2918
+ var _column$children, _ref44;
2919
+ var id3 = _ref43.id, column = _ref43.column, colspan = _ref43.colspan, rowspan = _ref43.rowspan, height2 = _ref43.height, top = _ref43.top;
2817
2920
  var isColGroup = (_column$children = column.children) == null ? void 0 : _column$children.length;
2818
2921
  var headerAlign = column.headerAlign, align = column.align, headerClassName = column.headerClassName;
2819
2922
  var _getConfigOverflow3 = getConfigOverflow(column, $table), headerTip = _getConfigOverflow3.headerTip, headerOverflowTitle = _getConfigOverflow3.headerOverflowTitle, headerOverflowTooltip = _getConfigOverflow3.headerOverflowTooltip, headerOverflowEllipsis = _getConfigOverflow3.headerOverflowEllipsis, headerOverflowHint = _getConfigOverflow3.headerOverflowHint;
@@ -2842,7 +2945,7 @@ function renderHeaderRows(_vm) {
2842
2945
  top: top + "px",
2843
2946
  zIndex: column.fixed ? 20 : 10
2844
2947
  }],
2845
- "class": ["tiny-grid-header__column", column.id, (_ref43 = {}, _ref43["col__" + headAlign] = headAlign, _ref43["col__fixed"] = column.fixed, _ref43["col__index"] = column.type === "index", _ref43["col__radio"] = column.type === "radio", _ref43["col__selection"] = column.type === "selection", _ref43["col__group"] = isColGroup, _ref43["col__ellipsis"] = headerOverflowHint, _ref43["is__sortable"] = !["index", "radio", "selection"].includes(column.type) && column.sortable, _ref43["is__editable"] = column.editor, _ref43["is__filter"] = isObject(column.filter), _ref43["filter__active"] = column.filter && column.filter.hasFilter, _ref43["is__multilevel"] = rowspan > 1, _ref43), getClass(headerClassName, params), getClass(headerCellClassName, params), getFixedClass(column, $table)]
2948
+ "class": ["tiny-grid-header__column", column.id, (_ref44 = {}, _ref44["col__" + headAlign] = headAlign, _ref44["col__fixed"] = column.fixed, _ref44["col__index"] = column.type === "index", _ref44["col__radio"] = column.type === "radio", _ref44["col__selection"] = column.type === "selection", _ref44["col__group"] = isColGroup, _ref44["col__ellipsis"] = headerOverflowHint, _ref44["is__sortable"] = !["index", "radio", "selection"].includes(column.type) && column.sortable, _ref44["is__editable"] = column.editor, _ref44["is__filter"] = isObject(column.filter), _ref44["filter__active"] = column.filter && column.filter.hasFilter, _ref44["is__multilevel"] = rowspan > 1, _ref44), getClass(headerClassName, params), getClass(headerCellClassName, params), getFixedClass(column, $table)]
2846
2949
  }, [[
2847
2950
  !isColGroup && !(isBoolean(column.resizable) ? column.resizable : resizable) && column.type !== "index" ? createVNode("div", {
2848
2951
  "class": {
@@ -2892,20 +2995,20 @@ function renderFooterRows(_vm) {
2892
2995
  $table,
2893
2996
  $rowIndex
2894
2997
  }) : footerRowClassName : ""]
2895
- }, [columnPool.map(function(_ref44, $columnIndex) {
2896
- var _footerRows$$rowIndex, _ref46;
2897
- var id3 = _ref44.id, column = _ref44.item, used = _ref44.used;
2998
+ }, [columnPool.map(function(_ref45, $columnIndex) {
2999
+ var _footerRows$$rowIndex, _ref47;
3000
+ var id3 = _ref45.id, column = _ref45.item, used = _ref45.used;
2898
3001
  var footerAlign = column.footerAlign, align = column.align, footerClassName = column.footerClassName;
2899
3002
  var ftAlign = footerAlign || align || allFooterAlign || allAlign;
2900
3003
  var _getConfigOverflow4 = getConfigOverflow(column, $table), cellOverflowHint = _getConfigOverflow4.cellOverflowHint;
2901
- var _ref45 = ((_footerRows$$rowIndex = footerRows[$rowIndex]) == null ? void 0 : _footerRows$$rowIndex[column.id]) || {}, _ref45$attrs = _ref45.attrs, attrs = _ref45$attrs === void 0 ? {
3004
+ var _ref46 = ((_footerRows$$rowIndex = footerRows[$rowIndex]) == null ? void 0 : _footerRows$$rowIndex[column.id]) || {}, _ref46$attrs = _ref46.attrs, attrs = _ref46$attrs === void 0 ? {
2902
3005
  rowspan: 1,
2903
3006
  colspan: 1,
2904
3007
  visible: true
2905
- } : _ref45$attrs, _ref45$params = _ref45.params, params = _ref45$params === void 0 ? {
3008
+ } : _ref46$attrs, _ref46$params = _ref46.params, params = _ref46$params === void 0 ? {
2906
3009
  $table,
2907
3010
  column
2908
- } : _ref45$params;
3011
+ } : _ref46$params;
2909
3012
  var rowspan = (attrs == null ? void 0 : attrs.rowspan) || 1;
2910
3013
  var tdBottom = trBottom - (rowspan > 1 ? (rowspan - 1) * rowHeight : 0);
2911
3014
  params.$columnIndex = $columnIndex;
@@ -2920,7 +3023,7 @@ function renderFooterRows(_vm) {
2920
3023
  zIndex: column.fixed ? 20 : 10,
2921
3024
  display: used && attrs.visible ? void 0 : "none"
2922
3025
  }],
2923
- "class": ["tiny-grid-footer__column", column.id, (_ref46 = {}, _ref46["col__" + ftAlign] = ftAlign, _ref46["col__ellipsis"] = cellOverflowHint, _ref46["filter__active"] = column.filter && column.filter.hasFilter, _ref46), getClass(footerClassName, params), getClass(footerCellClassName, params), getFixedClass(column, $table), attrs._stickyClass || ""]
3026
+ "class": ["tiny-grid-footer__column", column.id, (_ref47 = {}, _ref47["col__" + ftAlign] = ftAlign, _ref47["col__ellipsis"] = cellOverflowHint, _ref47["filter__active"] = column.filter && column.filter.hasFilter, _ref47), getClass(footerClassName, params), getClass(footerCellClassName, params), getFixedClass(column, $table), attrs._stickyClass || ""]
2924
3027
  }, [createVNode("div", {
2925
3028
  "class": {
2926
3029
  "tiny-grid-cell": true,
@@ -2937,17 +3040,13 @@ function renderRows(_vm) {
2937
3040
  var expandMethod = expandConfig.activeMethod;
2938
3041
  var startIndex = scrollYStore.startIndex;
2939
3042
  var isOrdered = treeConfig ? !!treeOrdered : false;
2940
- var _ref47 = treeConfig || {}, hideMethod = _ref47.hideMethod;
3043
+ var _ref48 = treeConfig || {}, hideMethod = _ref48.hideMethod;
2941
3044
  var actived = editStore.actived;
2942
3045
  var rows = [];
2943
3046
  var seqCount = {
2944
3047
  value: 0
2945
3048
  };
2946
3049
  var $seq = "";
2947
- var lastVisibleIndex = rowPool.findLastIndex(function(_ref48) {
2948
- var used = _ref48.used;
2949
- return Boolean(used);
2950
- });
2951
3050
  rowPool.forEach(function(_ref49, $rowIndex) {
2952
3051
  var id3 = _ref49.id, _ref49$item = _ref49.item, row2 = _ref49$item.payload, rowLevel = _ref49$item.level, used = _ref49.used;
2953
3052
  var rowActived = editConfig && actived.row === row2;
@@ -2986,8 +3085,7 @@ function renderRows(_vm) {
2986
3085
  isSkipRowRender,
2987
3086
  row: row2,
2988
3087
  rowActived,
2989
- rowClassName,
2990
- lastVisibleIndex
3088
+ rowClassName
2991
3089
  };
2992
3090
  Object.assign(args, {
2993
3091
  rowIndex,
@@ -3084,7 +3182,7 @@ function renderRowAfter(_ref50) {
3084
3182
  function renderRow(args) {
3085
3183
  var _ref51;
3086
3184
  var $rowIndex = args.$rowIndex, $seq = args.$seq, $table = args.$table, _vm = args._vm, editStore = args.editStore, id3 = args.id, isSkipRowRender = args.isSkipRowRender, row2 = args.row, rowActived = args.rowActived, rowClassName = args.rowClassName;
3087
- var rowIndex = args.rowIndex, rowLevel = args.rowLevel, rowid2 = args.rowid, rows = args.rows, selection = args.selection, selectRow = args.selectRow, seq = args.seq, treeConfig = args.treeConfig, used = args.used, lastVisibleIndex = args.lastVisibleIndex;
3185
+ var rowIndex = args.rowIndex, rowLevel = args.rowLevel, rowid2 = args.rowid, rows = args.rows, selection = args.selection, selectRow = args.selectRow, seq = args.seq, treeConfig = args.treeConfig, used = args.used;
3088
3186
  if (isSkipRowRender) {
3089
3187
  return;
3090
3188
  }
@@ -3106,7 +3204,7 @@ function renderRow(args) {
3106
3204
  "style": {
3107
3205
  display: used ? void 0 : "none"
3108
3206
  },
3109
- "class": ["tiny-grid-body__row", (_ref51 = {}, _ref51["row__level-" + rowLevel] = treeConfig, _ref51["row__new"] = editStore.insertList.includes(row2), _ref51["row__selected"] = selection.includes(row2), _ref51["row__radio"] = selectRow === row2, _ref51["row__actived"] = rowActived, _ref51["row__last-visible"] = lastVisibleIndex === $rowIndex, _ref51), rowClassName ? isFunction(rowClassName) ? rowClassName({
3207
+ "class": ["tiny-grid-body__row", (_ref51 = {}, _ref51["row__level-" + rowLevel] = treeConfig, _ref51["row__new"] = editStore.insertList.includes(row2), _ref51["row__selected"] = selection.includes(row2), _ref51["row__radio"] = selectRow === row2, _ref51["row__actived"] = rowActived, _ref51), rowClassName ? isFunction(rowClassName) ? rowClassName({
3110
3208
  $table,
3111
3209
  $seq,
3112
3210
  seq,
@@ -3335,9 +3433,9 @@ var Body = /* @__PURE__ */ defineComponent({
3335
3433
  footerData: Array
3336
3434
  },
3337
3435
  setup: function setup3(props, _ref57) {
3338
- var _hooks$getCurrentInst4;
3436
+ var _hooks$getCurrentInst5;
3339
3437
  var slots = _ref57.slots;
3340
- var vm = (_hooks$getCurrentInst4 = hooks.getCurrentInstance()) == null ? void 0 : _hooks$getCurrentInst4.proxy;
3438
+ var vm = (_hooks$getCurrentInst5 = hooks.getCurrentInstance()) == null ? void 0 : _hooks$getCurrentInst5.proxy;
3341
3439
  var $table = vm == null ? void 0 : vm.$parent;
3342
3440
  var rowHeight = hooks.computed(function() {
3343
3441
  return $table.rowHeight;
@@ -3357,6 +3455,8 @@ var Body = /* @__PURE__ */ defineComponent({
3357
3455
  var thead = hooks.ref();
3358
3456
  var tbody = hooks.ref();
3359
3457
  var ySpace = hooks.ref();
3458
+ var alignXBar = hooks.ref();
3459
+ var alignYBar = hooks.ref();
3360
3460
  hooks.watch(wrapperScrollLeft, function(wrapperScrollLeft2) {
3361
3461
  var el = stickyWrapper.value;
3362
3462
  if (!el) return;
@@ -3382,13 +3482,15 @@ var Body = /* @__PURE__ */ defineComponent({
3382
3482
  $table
3383
3483
  });
3384
3484
  var _useCellSpan = useCellSpan(vm, props), normalRows = _useCellSpan.normalRows, footerRows = _useCellSpan.footerRows;
3385
- hooks.watch([body, table, thead, tbody, ySpace], function() {
3485
+ hooks.watch([body, table, thead, tbody, ySpace, alignXBar, alignYBar], function() {
3386
3486
  var elemStore = $table.elemStore;
3387
3487
  elemStore["main-body-wrapper"] = body.value;
3388
3488
  elemStore["main-body-table"] = table.value;
3389
3489
  elemStore["main-body-headerList"] = thead.value;
3390
3490
  elemStore["main-body-list"] = tbody.value;
3391
3491
  elemStore["main-body-ySpace"] = ySpace.value;
3492
+ elemStore["main-body-alignXBar"] = alignXBar.value;
3493
+ elemStore["main-body-alignYBar"] = alignYBar.value;
3392
3494
  });
3393
3495
  var bodyClientWidth = hooks.ref(0);
3394
3496
  var resizeObserver = new ResizeObserver(function(entries) {
@@ -3463,6 +3565,8 @@ var Body = /* @__PURE__ */ defineComponent({
3463
3565
  thead,
3464
3566
  tbody,
3465
3567
  ySpace,
3568
+ alignXBar,
3569
+ alignYBar,
3466
3570
  normalRows,
3467
3571
  footerRows,
3468
3572
  resetStickyWrapperScrollPos
@@ -3488,6 +3592,19 @@ var Body = /* @__PURE__ */ defineComponent({
3488
3592
  maxHeight: bodyWrapperMaxHeight ? bodyWrapperMaxHeight + "px" : void 0
3489
3593
  }
3490
3594
  }, [[
3595
+ mouseConfig != null && mouseConfig.hover ? [createVNode("div", {
3596
+ "ref": "alignYBar",
3597
+ "class": "tiny-grid-body__hover-align-y-bar",
3598
+ "style": {
3599
+ height: containerScrollHeight + "px"
3600
+ }
3601
+ }, null), createVNode("div", {
3602
+ "ref": "alignXBar",
3603
+ "class": "tiny-grid-body__hover-align-x-bar",
3604
+ "style": {
3605
+ width: containerScrollWidth + "px"
3606
+ }
3607
+ }, null)] : null,
3491
3608
  createVNode("div", {
3492
3609
  "class": "tiny-grid-body__x-space",
3493
3610
  "style": {
@@ -7456,19 +7573,26 @@ var Methods$d = {
7456
7573
  clearAll: function clearAll(silent) {
7457
7574
  var _this$$grid$fetchOpti = this.$grid.fetchOption, fetchOption = _this$$grid$fetchOpti === void 0 ? {} : _this$$grid$fetchOpti;
7458
7575
  var isReloadFilter = fetchOption.isReloadFilter, _fetchOption$isReload = fetchOption.isReloadScroll, isReloadScroll = _fetchOption$isReload === void 0 ? false : _fetchOption$isReload;
7459
- var functionNames = ["clearScroll", "clearSort", "clearCurrentRow", "clearCurrentColumn", "clearSelection", "clearRowExpand", "clearTreeExpand"];
7460
- if (isReloadScroll) {
7461
- functionNames = functionNames.filter(function(i) {
7462
- return i !== "clearScroll";
7463
- });
7576
+ this.clearSort();
7577
+ this.clearCurrentRow();
7578
+ this.clearCurrentColumn();
7579
+ this.clearSelection();
7580
+ this.clearRowExpand();
7581
+ this.clearTreeExpand();
7582
+ this.clearValidateMap();
7583
+ if (!isReloadScroll) {
7584
+ this.clearScroll();
7464
7585
  }
7465
- run(functionNames, this);
7466
7586
  this.cellStatus.clear();
7467
7587
  if (typeof isReloadFilter === "undefined" ? Grid$1._filter : !isReloadFilter) {
7468
7588
  this.clearFilter(silent);
7469
7589
  }
7470
7590
  if (this.keyboardConfig || this.mouseConfig) {
7471
- run(["clearIndexChecked", "clearHeaderChecked", "clearChecked", "clearSelected", "clearCopyed"], this);
7591
+ this.clearIndexChecked();
7592
+ this.clearHeaderChecked();
7593
+ this.clearChecked();
7594
+ this.clearSelected();
7595
+ this.clearCopyed();
7472
7596
  }
7473
7597
  return this.clearActived();
7474
7598
  },
@@ -7477,7 +7601,8 @@ var Methods$d = {
7477
7601
  var next = function next2() {
7478
7602
  _this15.tableData = [];
7479
7603
  _this15.cellStatus.clear();
7480
- return _this15.loadTableData(data7 || _this15.tableFullData);
7604
+ _this15.clearValidateMap();
7605
+ return _this15.updateRawData(data7 || _this15.tableFullData);
7481
7606
  };
7482
7607
  return this.$nextTick().then(next);
7483
7608
  },
@@ -7529,18 +7654,10 @@ var Methods$d = {
7529
7654
  // 全量加载表格数据
7530
7655
  loadTableData: function loadTableData(datas, notRefresh) {
7531
7656
  var _this17 = this;
7532
- var editStore = this.editStore, height2 = this.height, maxHeight = this.maxHeight, lastScrollLeft = this.lastScrollLeft, lastScrollTop = this.lastScrollTop, optimizeOpts = this.optimizeOpts;
7533
- var scrollY = optimizeOpts.scrollY;
7534
- var tableFullData = isArray(datas) ? datas.slice(0) : [];
7535
- var scrollYLoad = scrollY && scrollY.gt > 0 && scrollY.gt <= tableFullData.length;
7657
+ var editStore = this.editStore, height2 = this.height, maxHeight = this.maxHeight, lastScrollLeft = this.lastScrollLeft, lastScrollTop = this.lastScrollTop, scrollYLoad = this.scrollYLoad;
7536
7658
  editStore.insertList = [];
7659
+ editStore.insertMap = /* @__PURE__ */ new Map();
7537
7660
  editStore.removeList = [];
7538
- Object.assign(this, {
7539
- tableFullData,
7540
- tableSynchData: datas,
7541
- scrollYLoad
7542
- });
7543
- this.updateCache(true, true);
7544
7661
  if (scrollYLoad && !(height2 || maxHeight)) {
7545
7662
  error("ui.grid.error.scrollYHeight");
7546
7663
  }
@@ -7556,31 +7673,51 @@ var Methods$d = {
7556
7673
  lastScrollTop
7557
7674
  });
7558
7675
  }
7676
+ }).then(function() {
7677
+ var _this17$resolveMap$lo;
7678
+ if (((_this17$resolveMap$lo = _this17.resolveMap.loadDataResolve) == null ? void 0 : _this17$resolveMap$lo.data) === datas) {
7679
+ _this17.resolveMap.loadDataResolve.resolveQueue.forEach(function(resolve) {
7680
+ return resolve();
7681
+ });
7682
+ _this17.resolveMap.loadDataResolve = null;
7683
+ }
7559
7684
  });
7560
7685
  },
7561
7686
  // 重新加载数据
7562
7687
  reloadData: function reloadData(datas) {
7563
7688
  var _this18 = this;
7564
7689
  return this.clearAll().then(function() {
7565
- return _this18.loadTableData(datas);
7690
+ return _this18.updateRawData(datas);
7566
7691
  });
7567
7692
  },
7568
7693
  // 加载全量数据
7569
7694
  loadData: function loadData(datas) {
7570
7695
  var _this19 = this;
7571
7696
  return new Promise(function(resolve) {
7572
- _this19.loadTableData(datas);
7573
- resolve();
7697
+ _this19.updateRawData(datas);
7698
+ if (_this19.resolveMap.loadDataResolve) {
7699
+ _this19.resolveMap.loadDataResolve.data = datas;
7700
+ _this19.resolveMap.loadDataResolve.resolveQueue.push(resolve);
7701
+ } else {
7702
+ _this19.resolveMap.loadDataResolve = {
7703
+ data: datas,
7704
+ resolveQueue: [resolve]
7705
+ };
7706
+ }
7574
7707
  });
7575
7708
  },
7709
+ updateRawData: function updateRawData(datas) {
7710
+ this.rawData = datas;
7711
+ this.rawDataVersion += 1;
7712
+ },
7576
7713
  getOriginRow: function getOriginRow(row2) {
7577
- var backupMap = this.backupMap;
7578
- return backupMap.has(row2) ? backupMap.get(row2) : null;
7714
+ var rowid2 = getRowid(this, row2);
7715
+ return rowid2 ? this.rowidCacheMap.get(rowid2) : null;
7579
7716
  },
7580
7717
  setOriginRow: function setOriginRow(row2, record) {
7581
- var backupMap = this.backupMap;
7582
- if (backupMap.has(row2) && record) {
7583
- backupMap.set(row2, record);
7718
+ var rowid2 = getRowid(this, row2);
7719
+ if (rowid2 && record) {
7720
+ this.rowidCacheMap.set(rowid2, record);
7584
7721
  }
7585
7722
  },
7586
7723
  reloadRow: function reloadRow(row2, record, field) {
@@ -7654,14 +7791,14 @@ var Methods$d = {
7654
7791
  if (deepCopy === void 0) {
7655
7792
  deepCopy = false;
7656
7793
  }
7657
- var tableFullData = this.tableFullData, treeConfig = this.treeConfig, treeOrdered = this.treeOrdered;
7794
+ var tableFullData = this.tableFullData, treeConfig = this.treeConfig, treeOrdered = this.treeOrdered, editConfig = this.editConfig, _this$saveSource = this.saveSource, saveSource = _this$saveSource === void 0 ? false : _this$saveSource;
7658
7795
  var rowKey = getRowkey(this);
7659
7796
  var _ref157 = treeConfig || {}, childrenKey = _ref157.children, _ref157$temporaryInde = _ref157.temporaryIndex, temporaryIndex = _ref157$temporaryInde === void 0 ? "_$index_" : _ref157$temporaryInde;
7660
7797
  var isTreeOrderedFalse = treeConfig && !treeOrdered;
7661
- var backupMap = /* @__PURE__ */ new WeakMap();
7662
- this.fullDataRowIdData = {};
7663
- this.fullDataRowMap.clear();
7664
- var copyRow = function copyRow2(row2, index2, parent) {
7798
+ var fullDataRowIdData = this.fullDataRowIdData = {};
7799
+ var fullDataRowMap = this.fullDataRowMap;
7800
+ fullDataRowMap.clear();
7801
+ eachTree(tableFullData, function(row2, index2, _array, _path, parent) {
7665
7802
  var rowId = getRowid(_this22, row2);
7666
7803
  if (!rowId) {
7667
7804
  rowId = getRowUniqueId();
@@ -7672,31 +7809,78 @@ var Methods$d = {
7672
7809
  rowid: rowId,
7673
7810
  index: index2
7674
7811
  };
7675
- _this22.fullDataRowIdData[rowId] = rowCache;
7676
- _this22.fullDataRowMap.set(hooks.toRaw(row2), rowCache);
7677
- if (backup) {
7678
- var _ref158;
7679
- if (isTreeOrderedFalse) {
7680
- var parentIndex;
7681
- if (parent) {
7682
- parentIndex = get(parent, temporaryIndex);
7683
- }
7684
- set(row2, temporaryIndex, (parentIndex ? parentIndex + "." : "") + (index2 + 1));
7812
+ if (fullDataRowIdData[rowId]) {
7813
+ warn("ui.grid.error.duplicateRowId", rowId);
7814
+ }
7815
+ fullDataRowIdData[rowId] = rowCache;
7816
+ fullDataRowMap.set(_this22.getRaw(row2), rowCache);
7817
+ if (isTreeOrderedFalse) {
7818
+ var parentIndex;
7819
+ if (parent) {
7820
+ parentIndex = get(parent, temporaryIndex);
7685
7821
  }
7686
- var childrenField = treeConfig ? (_ref158 = {}, _ref158[childrenKey] = void 0, _ref158) : {};
7687
- var backupRow = deepCopy ? clone(_extends({}, row2, childrenField), true) : _extends({}, row2, childrenField);
7688
- backupMap.set(row2, backupRow);
7689
- return backupRow;
7822
+ set(row2, temporaryIndex, (parentIndex ? parentIndex + "." : "") + (index2 + 1));
7690
7823
  }
7691
- };
7692
- var backupData = dfsCopy(tableFullData, copyRow, void 0, treeConfig, childrenKey);
7693
- if (backup) {
7694
- Object.assign(this, {
7695
- tableSourceData: backupData,
7696
- backupMap
7824
+ }, treeConfig);
7825
+ if (backup && (editConfig || saveSource)) {
7826
+ requestIdleCallback(function() {
7827
+ var rowidCacheMap = /* @__PURE__ */ new Map();
7828
+ var callback = function callback2(row2) {
7829
+ var _extends6;
7830
+ return rowidCacheMap.set(getRowid(_this22, row2), clone(childrenKey ? _extends({}, row2, (_extends6 = {}, _extends6[childrenKey] = null, _extends6)) : _extends({}, row2), deepCopy));
7831
+ };
7832
+ eachTree(tableFullData, callback, treeConfig);
7833
+ _this22.rowidCacheMap = rowidCacheMap;
7697
7834
  });
7698
7835
  }
7699
7836
  },
7837
+ getRaw: function getRaw(object) {
7838
+ var hooks_vue = hooks;
7839
+ return !isVue2 && hooks_vue.isProxy(object) ? hooks.toRaw(object) : object;
7840
+ },
7841
+ /**
7842
+ * 递归地将 Proxy 对象(如 Vue 3 的响应式对象)转换为普通对象。
7843
+ * @param {any} data 待处理的数据
7844
+ * @returns {any} 转换后的普通对象或原始数据
7845
+ */
7846
+ deepUnwrap: function deepUnwrap(data7) {
7847
+ if (data7 === null || typeof data7 !== "object") {
7848
+ return data7;
7849
+ }
7850
+ if (data7 instanceof Map) {
7851
+ return this.cloneMapAndUnwrap(data7);
7852
+ }
7853
+ if (data7 instanceof Set) {
7854
+ return new Set(Array.from(data7).map(this.deepUnwrap));
7855
+ }
7856
+ if (Array.isArray(data7)) {
7857
+ return data7.map(this.deepUnwrap);
7858
+ }
7859
+ var result = {};
7860
+ for (var key in data7) {
7861
+ if (Object.prototype.hasOwnProperty.call(data7, key)) {
7862
+ result[key] = this.deepUnwrap(data7[key]);
7863
+ }
7864
+ }
7865
+ return result;
7866
+ },
7867
+ /**
7868
+ * 复制 Map,并递归地将 Map 的值中包含的 Proxy 转换为普通对象。
7869
+ * @param {Map<any, any>} originalMap 原始 Map
7870
+ * @returns {Map<any, any>} 复制并解包后的新 Map
7871
+ */
7872
+ cloneMapAndUnwrap: function cloneMapAndUnwrap(originalMap) {
7873
+ if (!(originalMap instanceof Map)) {
7874
+ return originalMap;
7875
+ }
7876
+ var newMap = /* @__PURE__ */ new Map();
7877
+ for (var _iterator0 = _createForOfIteratorHelperLoose(originalMap.entries()), _step0; !(_step0 = _iterator0()).done; ) {
7878
+ var _step0$value = _step0.value, key = _step0$value[0], value = _step0$value[1];
7879
+ var unwrappedValue = this.deepUnwrap(value);
7880
+ newMap.set(key, unwrappedValue);
7881
+ }
7882
+ return newMap;
7883
+ },
7700
7884
  // 更新列的 Map
7701
7885
  cacheColumnMap: function cacheColumnMap(options) {
7702
7886
  var fullColumnMap = this.fullColumnMap;
@@ -7724,9 +7908,7 @@ var Methods$d = {
7724
7908
  return null;
7725
7909
  },
7726
7910
  getColumnNode: function getColumnNode(cell) {
7727
- if (!cell) {
7728
- return null;
7729
- }
7911
+ if (!cell) return null;
7730
7912
  var fullColumnIdData = this.fullColumnIdData, tableFullColumn = this.tableFullColumn;
7731
7913
  var dataColid = cell.dataset.colid;
7732
7914
  var colCache = fullColumnIdData[dataColid];
@@ -7740,31 +7922,41 @@ var Methods$d = {
7740
7922
  return null;
7741
7923
  },
7742
7924
  getRowIndex: function getRowIndex(row2) {
7743
- var rawRow = hooks.toRaw(row2);
7744
7925
  var fullDataRowMap = this.fullDataRowMap;
7745
- return fullDataRowMap.has(rawRow) ? fullDataRowMap.get(rawRow).index : -1;
7926
+ row2 = this.getRaw(row2);
7927
+ return fullDataRowMap.has(row2) ? fullDataRowMap.get(row2).index : -1;
7746
7928
  },
7747
7929
  getColumnIndex: function getColumnIndex(column) {
7748
7930
  var fullColumnMap = this.fullColumnMap;
7749
- return fullColumnMap.has(column) ? fullColumnMap.get(column).index : -1;
7931
+ return fullColumnMap.has(column) ? fullColumnMap.get(column).columnIndex : -1;
7750
7932
  },
7751
7933
  hasIndexColumn: function hasIndexColumn(column) {
7752
7934
  return (column == null ? void 0 : column.type) === "index";
7753
7935
  },
7754
- defineField: function defineField(row2, copy) {
7755
- if (!row2 || typeof row2 !== "object") {
7756
- return row2;
7757
- }
7936
+ defineField: function defineField(row2, copy, editorColumns, cache) {
7937
+ var _this23 = this;
7938
+ if (!row2 || typeof row2 !== "object") return row2;
7758
7939
  if (copy) {
7759
7940
  row2 = clone(row2, true);
7760
7941
  }
7761
7942
  var rowKey = getRowkey(this);
7762
- this.visibleColumn.forEach(function(_ref159) {
7763
- var property = _ref159.property, editor = _ref159.editor;
7943
+ var columns2 = editorColumns || this.visibleColumn;
7944
+ columns2.forEach(function(column) {
7945
+ var property = column.property, editor = column.editor;
7764
7946
  var propNotExist = property && !has(row2, property);
7765
7947
  var propDefaultValue = editor && !isUndefined(editor.defaultValue) ? editor.defaultValue : null;
7766
7948
  if (propNotExist) {
7767
- set(row2, property, propDefaultValue);
7949
+ if (cache) {
7950
+ var originRow = _this23.getOriginRow(row2);
7951
+ if (originRow) {
7952
+ originRow[property] = propDefaultValue;
7953
+ }
7954
+ }
7955
+ if (isVue2) {
7956
+ _this23.$set(row2, property, propDefaultValue);
7957
+ } else {
7958
+ set(row2, property, propDefaultValue);
7959
+ }
7768
7960
  }
7769
7961
  });
7770
7962
  var rowId = get(row2, rowKey);
@@ -7774,11 +7966,8 @@ var Methods$d = {
7774
7966
  return row2;
7775
7967
  },
7776
7968
  isTemporaryRow: function isTemporaryRow(row2) {
7777
- var _this23 = this;
7778
7969
  var rowid2 = getRowid(this, row2);
7779
- return find$1(this.temporaryRows, function(r) {
7780
- return rowid2 === getRowid(_this23, r);
7781
- });
7970
+ return this.editStore.insertMap.has(rowid2);
7782
7971
  },
7783
7972
  createData: function createData(records, copy) {
7784
7973
  var _this24 = this;
@@ -7818,7 +8007,7 @@ var Methods$d = {
7818
8007
  return this.$nextTick();
7819
8008
  },
7820
8009
  hasRowInsert: function hasRowInsert(row2) {
7821
- return this.editStore.insertList.includes(row2);
8010
+ return this.isTemporaryRow(row2);
7822
8011
  },
7823
8012
  compareRow: function compareRow(row2, originalRow, field) {
7824
8013
  var value = get(row2, field);
@@ -7844,20 +8033,20 @@ var Methods$d = {
7844
8033
  },
7845
8034
  hasRowChange: function hasRowChange(row2, field) {
7846
8035
  var _editConfig$insertCha;
7847
- var treeConfig = this.treeConfig, visibleColumn = this.visibleColumn, backupMap = this.backupMap, editConfig = this.editConfig;
8036
+ var treeConfig = this.treeConfig, visibleColumn = this.visibleColumn, _this$editConfig2 = this.editConfig, editConfig = _this$editConfig2 === void 0 ? {} : _this$editConfig2;
7848
8037
  var insertChanged = (_editConfig$insertCha = editConfig == null ? void 0 : editConfig.insertChanged) != null ? _editConfig$insertCha : false;
7849
8038
  var argsLength = arguments.length;
7850
8039
  var originRow;
7851
8040
  if (this.isTemporaryRow(row2)) {
7852
8041
  return insertChanged;
7853
8042
  }
7854
- var cacheRow = backupMap.get(row2);
8043
+ var cacheRow = this.getOriginRow(row2);
7855
8044
  if (cacheRow) {
7856
8045
  if (treeConfig) {
7857
- var _extends6, _extends7;
8046
+ var _extends7, _extends8;
7858
8047
  var children = treeConfig.children;
7859
- row2 = _extends({}, row2, (_extends6 = {}, _extends6[children] = null, _extends6));
7860
- originRow = _extends({}, cacheRow, (_extends7 = {}, _extends7[children] = null, _extends7));
8048
+ row2 = _extends({}, row2, (_extends7 = {}, _extends7[children] = null, _extends7));
8049
+ originRow = _extends({}, cacheRow, (_extends8 = {}, _extends8[children] = null, _extends8));
7861
8050
  } else {
7862
8051
  originRow = _extends({}, cacheRow);
7863
8052
  }
@@ -7904,7 +8093,7 @@ var Methods$d = {
7904
8093
  },
7905
8094
  // 获取表格所有数据
7906
8095
  getData: function getData(rowIndex) {
7907
- var allRows = this.data || this.tableSynchData;
8096
+ var allRows = this.rawData || [];
7908
8097
  if (!arguments.length) {
7909
8098
  return allRows.slice(0);
7910
8099
  }
@@ -7918,7 +8107,7 @@ var Methods$d = {
7918
8107
  var _this$selectConfig = this.selectConfig, selectConfig = _this$selectConfig === void 0 ? {} : _this$selectConfig, selection = this.selection;
7919
8108
  var tableFullData = this.tableFullData, treeConfig = this.treeConfig;
7920
8109
  var checkField = selectConfig.checkField;
7921
- var _ref160 = {}, _ref160$rowList = _ref160.rowList, rowList = _ref160$rowList === void 0 ? [] : _ref160$rowList;
8110
+ var _ref158 = {}, _ref158$rowList = _ref158.rowList, rowList = _ref158$rowList === void 0 ? [] : _ref158$rowList;
7922
8111
  if (checkField && treeConfig) {
7923
8112
  rowList = filterTree(tableFullData, function(row2) {
7924
8113
  return get(row2, checkField);
@@ -7947,8 +8136,8 @@ var Methods$d = {
7947
8136
  var tableData = this.tableFullData;
7948
8137
  var updateFilter = function updateFilter2(tableData2) {
7949
8138
  var remoteFilter = _this26.remoteFilter, visibleColumn = _this26.visibleColumn;
7950
- var filterColumn = visibleColumn.filter(function(_ref161) {
7951
- var filter2 = _ref161.filter;
8139
+ var filterColumn = visibleColumn.filter(function(_ref159) {
8140
+ var filter2 = _ref159.filter;
7952
8141
  return !!filter2;
7953
8142
  });
7954
8143
  return tableData2.filter(function(row2) {
@@ -7977,8 +8166,8 @@ var Methods$d = {
7977
8166
  } else {
7978
8167
  var sortedFlag = false;
7979
8168
  if (sortOpts2.multipleColumnSort) {
7980
- var sortColumns = visibleColumn.filter(function(_ref162) {
7981
- var order2 = _ref162.order;
8169
+ var sortColumns = visibleColumn.filter(function(_ref160) {
8170
+ var order2 = _ref160.order;
7982
8171
  return !!order2;
7983
8172
  });
7984
8173
  if (sortColumns.length > 1) {
@@ -8040,9 +8229,10 @@ var Methods$d = {
8040
8229
  return this.scrollLoad ? this.scrollLoad.pageSize || 10 : ((_this$_graphInfo = this._graphInfo) == null ? void 0 : _this$_graphInfo.graphed.length) || 0;
8041
8230
  },
8042
8231
  getRowById: function getRowById(rowid2) {
8043
- var fullDataRowIdData = this.fullDataRowIdData;
8044
- var rowCache = fullDataRowIdData[rowid2];
8045
- return rowCache ? rowCache.row : null;
8232
+ var _fullDataRowIdData$ro, _editStore$insertMap;
8233
+ var fullDataRowIdData = this.fullDataRowIdData, editStore = this.editStore;
8234
+ var rowCache = ((_fullDataRowIdData$ro = fullDataRowIdData[rowid2]) == null ? void 0 : _fullDataRowIdData$ro.row) || (editStore == null ? void 0 : (_editStore$insertMap = editStore.insertMap) == null ? void 0 : _editStore$insertMap.get(rowid2));
8235
+ return rowCache || null;
8046
8236
  },
8047
8237
  // 获取处理后的表格数据
8048
8238
  getTableData: function getTableData() {
@@ -8086,7 +8276,7 @@ var Methods$d = {
8086
8276
  });
8087
8277
  }
8088
8278
  if (hasCustomsOrColWidth && !isGroupOrNonSort) {
8089
- var _ref163 = {}, _ref163$collectColumn = _ref163.collectColumn, collectColumn2 = _ref163$collectColumn === void 0 ? [] : _ref163$collectColumn, _ref163$customMap = _ref163.customMap, customMap = _ref163$customMap === void 0 ? {} : _ref163$customMap, _ref163$orderColumn = _ref163.orderColumn, orderColumn = _ref163$orderColumn === void 0 ? [] : _ref163$orderColumn;
8279
+ var _ref161 = {}, _ref161$collectColumn = _ref161.collectColumn, collectColumn2 = _ref161$collectColumn === void 0 ? [] : _ref161$collectColumn, _ref161$customMap = _ref161.customMap, customMap = _ref161$customMap === void 0 ? {} : _ref161$customMap, _ref161$orderColumn = _ref161.orderColumn, orderColumn = _ref161$orderColumn === void 0 ? [] : _ref161$orderColumn;
8090
8280
  mapTree(customColumns, function(customCol) {
8091
8281
  var targetCol = find$1(fullColumn, function(item) {
8092
8282
  return customCol.property && item.property === customCol.property;
@@ -8152,7 +8342,8 @@ var Methods$d = {
8152
8342
  var options = {
8153
8343
  columnCaches: []
8154
8344
  };
8155
- var fullColumn = getColumnList(value, options);
8345
+ this.markColumnIndex = 0;
8346
+ var fullColumn = getColumnList(this, value, options);
8156
8347
  if (options.isGroup && options.hasFixed) {
8157
8348
  value.forEach(function(root) {
8158
8349
  return repairFixed(root);
@@ -8423,8 +8614,8 @@ var Methods$d = {
8423
8614
  }
8424
8615
  end && end();
8425
8616
  },
8426
- blurOutside: function blurOutside(_ref164, event) {
8427
- var row2 = _ref164.row, args = _ref164.args, column = _ref164.column;
8617
+ blurOutside: function blurOutside(_ref162, event) {
8618
+ var row2 = _ref162.row, args = _ref162.args, column = _ref162.column;
8428
8619
  var editConfig = this.editConfig, getEventTargetNode2 = this.getEventTargetNode, $el = this.$el;
8429
8620
  if (column && row2) {
8430
8621
  var editor = column.editor;
@@ -8484,7 +8675,7 @@ var Methods$d = {
8484
8675
  // 处理单选框默认勾选
8485
8676
  handleRadioDefChecked: function handleRadioDefChecked() {
8486
8677
  var fullDataRowIdData = this.fullDataRowIdData;
8487
- var _ref165 = this.radioConfig || {}, checkRowKey = _ref165.checkRowKey;
8678
+ var _ref163 = this.radioConfig || {}, checkRowKey = _ref163.checkRowKey;
8488
8679
  var rowid2 = checkRowKey && encodeURIComponent(checkRowKey);
8489
8680
  var rowCache = fullDataRowIdData[rowid2];
8490
8681
  if (rowid2 && rowCache) {
@@ -8494,7 +8685,7 @@ var Methods$d = {
8494
8685
  // 单选,行选中事件
8495
8686
  triggerRadioRowEvent: function triggerRadioRowEvent(event, params) {
8496
8687
  var selectRow = this.selectRow;
8497
- var _ref166 = this.radioConfig || {}, checkMethod = _ref166.checkMethod;
8688
+ var _ref164 = this.radioConfig || {}, checkMethod = _ref164.checkMethod;
8498
8689
  if (checkMethod && !checkMethod(params)) {
8499
8690
  return;
8500
8691
  }
@@ -8749,8 +8940,8 @@ var Methods$d = {
8749
8940
  this.groupExpandeds.push(row2);
8750
8941
  },
8751
8942
  // 展开行事件
8752
- triggerRowExpandEvent: function triggerRowExpandEvent(event, _ref167) {
8753
- var row2 = _ref167.row;
8943
+ triggerRowExpandEvent: function triggerRowExpandEvent(event, _ref165) {
8944
+ var row2 = _ref165.row;
8754
8945
  var rest = this.toggleRowExpansion(row2);
8755
8946
  var eventParams = {
8756
8947
  $table: this,
@@ -8767,7 +8958,7 @@ var Methods$d = {
8767
8958
  // 处理默认展开行
8768
8959
  handleDefaultRowExpand: function handleDefaultRowExpand() {
8769
8960
  var fullDataRowIdData = this.fullDataRowIdData, tableFullData = this.tableFullData;
8770
- var _ref168 = this.expandConfig || {}, expandAll = _ref168.expandAll, expandRowKeys = _ref168.expandRowKeys;
8961
+ var _ref166 = this.expandConfig || {}, expandAll = _ref166.expandAll, expandRowKeys = _ref166.expandRowKeys;
8771
8962
  if (expandAll) {
8772
8963
  this.expandeds = tableFullData.slice(0);
8773
8964
  return;
@@ -8788,7 +8979,7 @@ var Methods$d = {
8788
8979
  // 设置展开行,二个参数设置这一行展开与否;支持单行;支持多行
8789
8980
  setRowExpansion: function setRowExpansion(rows, expanded) {
8790
8981
  var expandeds = this.expandeds;
8791
- var _ref169 = this.expandConfig || {}, accordion = _ref169.accordion;
8982
+ var _ref167 = this.expandConfig || {}, accordion = _ref167.accordion;
8792
8983
  var isToggle = arguments.length === 1;
8793
8984
  var isAccordionCloseAll = false;
8794
8985
  if (!rows) {
@@ -8864,7 +9055,7 @@ var Methods$d = {
8864
9055
  var scrollXStore = this.scrollXStore, visibleColumn = this.visibleColumn;
8865
9056
  var offsetSize = scrollXStore.offsetSize, renderSize = scrollXStore.renderSize, startIndex = scrollXStore.startIndex, visibleIndex = scrollXStore.visibleIndex, visibleSize = scrollXStore.visibleSize;
8866
9057
  var scrollLeft = this.$refs.tableBody.$el.scrollLeft;
8867
- var _ref170 = {}, _ref170$preload = _ref170.preload, preload = _ref170$preload === void 0 ? false : _ref170$preload, _ref170$toVisibleInde = _ref170.toVisibleIndex, toVisibleIndex = _ref170$toVisibleInde === void 0 ? 0 : _ref170$toVisibleInde, _ref170$width = _ref170.width, width = _ref170$width === void 0 ? 0 : _ref170$width;
9058
+ var _ref168 = {}, _ref168$preload = _ref168.preload, preload = _ref168$preload === void 0 ? false : _ref168$preload, _ref168$toVisibleInde = _ref168.toVisibleIndex, toVisibleIndex = _ref168$toVisibleInde === void 0 ? 0 : _ref168$toVisibleInde, _ref168$width = _ref168.width, width = _ref168$width === void 0 ? 0 : _ref168$width;
8868
9059
  for (var i = 0; i < visibleColumn.length; i++) {
8869
9060
  width += visibleColumn[i].renderWidth;
8870
9061
  if (scrollLeft < width) {
@@ -9054,7 +9245,7 @@ var Methods$d = {
9054
9245
  return this.$nextTick();
9055
9246
  },
9056
9247
  scrollToRow: function scrollToRow(row2, column, isDelay, move) {
9057
- var hasRowCache = this.fullDataRowMap.has(hooks.toRaw(row2));
9248
+ var hasRowCache = this.fullDataRowMap.has(this.getRaw(row2));
9058
9249
  var isDelayArg = isDelay || isBoolean(column);
9059
9250
  row2 && hasRowCache && rowToVisible(this, row2);
9060
9251
  return this.scrollToColumn(column, isDelayArg, move);
@@ -9195,8 +9386,8 @@ var Methods$d = {
9195
9386
  return _this43.validCellRules(type, row2, column, cellValue).then(function() {
9196
9387
  refreshStatus();
9197
9388
  _this43.clearValidate();
9198
- }).catch(function(_ref171) {
9199
- var rule = _ref171.rule;
9389
+ }).catch(function(_ref169) {
9390
+ var rule = _ref169.rule;
9200
9391
  refreshStatus();
9201
9392
  _this43.showValidTooltip({
9202
9393
  rule,
@@ -9243,8 +9434,8 @@ var Methods$d = {
9243
9434
  return fetchColumns;
9244
9435
  }
9245
9436
  tableColumn2.forEach(function(col) {
9246
- var _ref172 = col.format || {}, async = _ref172.async;
9247
- var _ref173 = async || {}, fetch = _ref173.fetch, _ref173$splitConfig = _ref173.splitConfig, splitConfig = _ref173$splitConfig === void 0 ? {} : _ref173$splitConfig;
9437
+ var _ref170 = col.format || {}, async = _ref170.async;
9438
+ var _ref171 = async || {}, fetch = _ref171.fetch, _ref171$splitConfig = _ref171.splitConfig, splitConfig = _ref171$splitConfig === void 0 ? {} : _ref171$splitConfig;
9248
9439
  if (typeof fetch === "function") {
9249
9440
  var columnValues = [];
9250
9441
  tableData.forEach(function(row2) {
@@ -9304,8 +9495,8 @@ var Methods$d = {
9304
9495
  }, this));
9305
9496
  },
9306
9497
  // Publish methods 与工具栏对接
9307
- connect: function connect(_ref174) {
9308
- var toolbar = _ref174.toolbar;
9498
+ connect: function connect(_ref172) {
9499
+ var toolbar = _ref172.toolbar;
9309
9500
  this.$toolbar = toolbar;
9310
9501
  },
9311
9502
  // 检查触发源是否属于目标节点
@@ -9330,8 +9521,8 @@ var Methods$d = {
9330
9521
  return column.order ? column.order === "asc" ? "desc" : null : "asc";
9331
9522
  },
9332
9523
  handleDataChange: function handleDataChange() {
9333
- if (Array.isArray(this.data)) {
9334
- !this._isUpdateData && this.loadTableData(this.data);
9524
+ if (Array.isArray(this.rawData)) {
9525
+ !this._isUpdateData && this.loadTableData(this.rawData);
9335
9526
  this._isUpdateData = false;
9336
9527
  }
9337
9528
  },
@@ -9365,7 +9556,7 @@ var Methods$d = {
9365
9556
  // 尝试恢复滚动位置,规范了最大滚动位置的取值
9366
9557
  attemptRestoreScroll: function attemptRestoreScroll(options) {
9367
9558
  var _this46 = this;
9368
- var _ref175 = options || this, lastScrollTop = _ref175.lastScrollTop, lastScrollLeft = _ref175.lastScrollLeft;
9559
+ var _ref173 = options || this, lastScrollTop = _ref173.lastScrollTop, lastScrollLeft = _ref173.lastScrollLeft;
9369
9560
  var scrollXLoad = this.scrollXLoad, scrollYLoad = this.scrollYLoad, elemStore = this.elemStore;
9370
9561
  var tableBodyElem = elemStore["main-body-wrapper"];
9371
9562
  if ((lastScrollTop || lastScrollLeft) && tableBodyElem) {
@@ -9615,8 +9806,8 @@ var _sfc_main$7 = defineComponent({
9615
9806
  return typeof hidden === "boolean" && hidden || typeof hidden === "function" && hidden(row2);
9616
9807
  };
9617
9808
  var handleItemClick = function handleItemClick2(name) {
9618
- var buttonConfig = visibleButtons.find(function(_ref176) {
9619
- var buttonName = _ref176.name;
9809
+ var buttonConfig = visibleButtons.find(function(_ref174) {
9810
+ var buttonName = _ref174.name;
9620
9811
  return buttonName === name;
9621
9812
  });
9622
9813
  buttonConfig.click(window.event || {}, _extends({
@@ -10357,7 +10548,7 @@ function mergeScrollDirStore(scrollDir, scrollDirStore) {
10357
10548
  }
10358
10549
  function loadStatic(data7, _vm) {
10359
10550
  if (data7 && data7.length > 0) {
10360
- _vm.loadTableData(data7, true);
10551
+ _vm.updateRawData(data7);
10361
10552
  _vm.updateStyle();
10362
10553
  }
10363
10554
  }
@@ -10761,6 +10952,7 @@ var Table = defineComponent({
10761
10952
  columns: []
10762
10953
  },
10763
10954
  insertList: [],
10955
+ insertMap: /* @__PURE__ */ new Map(),
10764
10956
  removeList: [],
10765
10957
  // 选中源
10766
10958
  selected: {
@@ -10783,7 +10975,8 @@ var Table = defineComponent({
10783
10975
  id: "",
10784
10976
  multi: false,
10785
10977
  options: [],
10786
- visible: false
10978
+ visible: false,
10979
+ searchValue: ""
10787
10980
  },
10788
10981
  // 所有列已禁用
10789
10982
  headerCheckDisabled: false,
@@ -10841,15 +11034,7 @@ var Table = defineComponent({
10841
11034
  // 在编辑模式下 单元格在失去焦点验证的状态
10842
11035
  validatedMap: {},
10843
11036
  // 表格父容器的高度
10844
- parentHeight: 0,
10845
- // 水平滚动条的状态
10846
- horizonScroll: {
10847
- fixed: false,
10848
- threshold: 2,
10849
- max: 0,
10850
- isLeft: true,
10851
- isRight: false
10852
- }
11037
+ parentHeight: 0
10853
11038
  };
10854
11039
  },
10855
11040
  computed: {
@@ -10974,9 +11159,10 @@ var Table = defineComponent({
10974
11159
  // 选项式监控在vue2可以检测到顶层数组splice项替换/$set项替换
10975
11160
  // array.splice(index, 1, newItem)
10976
11161
  // this.$set(array, index, newItem)
11162
+ // 在数组中的行对象上动态添加字段也会触发此选项式监听
10977
11163
  data: function data5(array1, array2) {
10978
11164
  if (isVue2 && array1 === array2 && array1.length === array2.length) {
10979
- this.handleDataChange();
11165
+ this.updateRawData(this.data);
10980
11166
  }
10981
11167
  }
10982
11168
  },
@@ -10993,8 +11179,6 @@ var Table = defineComponent({
10993
11179
  fullColumnMap: /* @__PURE__ */ new Map(),
10994
11180
  fullDataRowIdData: {},
10995
11181
  fullDataRowMap: /* @__PURE__ */ new Map(),
10996
- // 临时插入数据集
10997
- temporaryRows: [],
10998
11182
  // 最后滚动位置
10999
11183
  lastScrollLeft: 0,
11000
11184
  lastScrollTop: 0,
@@ -11065,6 +11249,8 @@ var Table = defineComponent({
11065
11249
  var bodyWrapperHeight = hooks.ref();
11066
11250
  var bodyWrapperMinHeight = hooks.ref();
11067
11251
  var bodyWrapperMaxHeight = hooks.ref();
11252
+ var containerScrollWidth = hooks.ref(0);
11253
+ var containerScrollHeight = hooks.ref(0);
11068
11254
  var bodyTableWidth = hooks.ref();
11069
11255
  var scrollLoadScrollHeight = hooks.ref();
11070
11256
  var columnStore = hooks.ref({
@@ -11086,6 +11272,13 @@ var Table = defineComponent({
11086
11272
  // 百分比最小宽度列表集合
11087
11273
  scaleMinList: []
11088
11274
  });
11275
+ var horizonScroll = hooks.ref({
11276
+ fixed: false,
11277
+ threshold: 2,
11278
+ max: 0,
11279
+ isLeft: true,
11280
+ isRight: false
11281
+ });
11089
11282
  var bodyProps = hooks.computed(function() {
11090
11283
  return {
11091
11284
  collectColumn: collectColumn2.value,
@@ -11105,6 +11298,10 @@ var Table = defineComponent({
11105
11298
  };
11106
11299
  });
11107
11300
  var tableWrapper = hooks.ref();
11301
+ var _useNormalData = useNormalData({
11302
+ props,
11303
+ tableFullColumn
11304
+ }), rawData = _useNormalData.rawData, rawDataVersion = _useNormalData.rawDataVersion;
11108
11305
  var tinyTheme = hooks.ref(resolveTheme(props, context));
11109
11306
  var $table = hooks.getCurrentInstance().proxy;
11110
11307
  var $grid = hooks.inject("$grid", null);
@@ -11150,6 +11347,38 @@ var Table = defineComponent({
11150
11347
  columnStore
11151
11348
  });
11152
11349
  var _useData = useData(props), tiledLength = _useData.tiledLength;
11350
+ var updateFixedClasses = function updateFixedClasses2(isLeft, isRight) {
11351
+ if (!$table.$el) return;
11352
+ var el = $table.$el;
11353
+ var hasLeftClass = el.classList.contains("tiny-grid-fixed__left");
11354
+ var hasRightClass = el.classList.contains("tiny-grid-fixed__right");
11355
+ var shouldHaveLeft = !isLeft;
11356
+ var shouldHaveRight = !isRight;
11357
+ if (hasLeftClass !== shouldHaveLeft) {
11358
+ if (shouldHaveLeft) {
11359
+ el.classList.add("tiny-grid-fixed__left");
11360
+ } else {
11361
+ el.classList.remove("tiny-grid-fixed__left");
11362
+ }
11363
+ }
11364
+ if (hasRightClass !== shouldHaveRight) {
11365
+ if (shouldHaveRight) {
11366
+ el.classList.add("tiny-grid-fixed__right");
11367
+ } else {
11368
+ el.classList.remove("tiny-grid-fixed__right");
11369
+ }
11370
+ }
11371
+ };
11372
+ var resolveMap = {};
11373
+ hooks.watch(function() {
11374
+ var _horizonScroll$value, _horizonScroll$value2;
11375
+ return [(_horizonScroll$value = horizonScroll.value) == null ? void 0 : _horizonScroll$value.isLeft, (_horizonScroll$value2 = horizonScroll.value) == null ? void 0 : _horizonScroll$value2.isRight];
11376
+ }, function(_ref175) {
11377
+ var newIsLeft = _ref175[0], newIsRight = _ref175[1];
11378
+ hooks.nextTick(function() {
11379
+ return updateFixedClasses(newIsLeft, newIsRight);
11380
+ });
11381
+ });
11153
11382
  hooks.onMounted(function() {
11154
11383
  $table.addIntersectionObserver();
11155
11384
  if (tableWrapper.value) {
@@ -11157,6 +11386,18 @@ var Table = defineComponent({
11157
11386
  }
11158
11387
  hooks.nextTick(function() {
11159
11388
  $table.afterMounted = true;
11389
+ setTimeout(function() {
11390
+ if ($table.$el && $table.horizonScroll) {
11391
+ var _horizonScroll$value3, _horizonScroll$value4;
11392
+ var el = $table.$el;
11393
+ if (!((_horizonScroll$value3 = horizonScroll.value) != null && _horizonScroll$value3.isLeft)) {
11394
+ el.classList.add("tiny-grid-fixed__left");
11395
+ }
11396
+ if (!((_horizonScroll$value4 = horizonScroll.value) != null && _horizonScroll$value4.isRight)) {
11397
+ el.classList.add("tiny-grid-fixed__right");
11398
+ }
11399
+ }
11400
+ });
11160
11401
  if (props.autoResize && Grid$1._resize) {
11161
11402
  $table.bindResize();
11162
11403
  }
@@ -11180,6 +11421,7 @@ var Table = defineComponent({
11180
11421
  }
11181
11422
  unbindEvent($table);
11182
11423
  $table._tileInfo = $table._graphInfo = null;
11424
+ $table.rowidCacheMap = null;
11183
11425
  });
11184
11426
  hooks.onActivated(function() {
11185
11427
  var lastScrollLeft = $table.lastScrollLeft, lastScrollTop = $table.lastScrollTop;
@@ -11198,6 +11440,8 @@ var Table = defineComponent({
11198
11440
  unbindEvent($table);
11199
11441
  });
11200
11442
  var tableListeners = getListeners(attrs, listeners);
11443
+ var markColumnIndex = hooks.ref(0);
11444
+ var rowidCacheMap = /* @__PURE__ */ new Map();
11201
11445
  return {
11202
11446
  slots,
11203
11447
  tableListeners,
@@ -11225,10 +11469,18 @@ var Table = defineComponent({
11225
11469
  bodyWrapperHeight,
11226
11470
  bodyWrapperMinHeight,
11227
11471
  bodyWrapperMaxHeight,
11472
+ containerScrollWidth,
11473
+ containerScrollHeight,
11228
11474
  bodyTableWidth,
11229
11475
  scrollLoadScrollHeight,
11230
11476
  columnStore,
11231
- tiledLength
11477
+ tiledLength,
11478
+ rawDataVersion,
11479
+ rawData,
11480
+ markColumnIndex,
11481
+ rowidCacheMap,
11482
+ horizonScroll,
11483
+ resolveMap
11232
11484
  };
11233
11485
  },
11234
11486
  render: function render14() {
@@ -11246,7 +11498,7 @@ var Table = defineComponent({
11246
11498
  return h("div", {
11247
11499
  class: (_class4 = {
11248
11500
  "tiny-grid h-full sm:h-auto !bg-transparent sm:!bg-color-bg-1 after:border-none sm:after:border-solid": true
11249
- }, _class4["row__valid-" + validOpts2.message] = true, _class4["size__" + vSize3] = vSize3, _class4["tiny-grid-editable"] = editConfig, _class4["show__head"] = showHeader, _class4["show__foot"] = showFooter, _class4["scroll__y"] = overflowY, _class4["scroll__x"] = overflowX, _class4["all-overflow"] = showOverflow, _class4["all-head-overflow"] = showHeaderOverflow, _class4["tiny-grid-cell__highlight"] = highlightCell, _class4["tiny-grid__animat"] = optimizeOpts.animat, _class4["tiny-grid__stripe"] = !isThemeSaas3 && stripe, _class4["tiny-grid__stripe-saas"] = isThemeSaas3 && stripeSaas, _class4["tiny-grid__border"] = border || isGroup2, _class4["tiny-grid__border-saas"] = isThemeSaas3 && borderSaas, _class4["tiny-grid__group-saas"] = isThemeSaas3 && isGroup2, _class4["tiny-grid__border-vertical"] = borderVertical, _class4["tiny-grid__checked"] = mouseConfig.checked, _class4["mark-insert"] = editConfig && editConfig.markInsert, _class4["edit__no-border"] = editConfig && editConfig.showBorder === false, _class4["is__loading"] = loading, _class4["row__highlight"] = highlightHoverRow, _class4["column__highlight"] = highlightHoverColumn, _class4["is__row-span"] = rowSpan && rowSpan.length > 0 || typeof spanMethod === "function", _class4["row__drop-handle--index"] = dropConfig.rowHandle === "index", _class4["fixed__sticky"] = horizonScroll.fixed, _class4["tiny-grid-fixed__left"] = !horizonScroll.isLeft, _class4["tiny-grid-fixed__right"] = !horizonScroll.isRight, _class4)
11501
+ }, _class4["row__valid-" + validOpts2.message] = true, _class4["size__" + vSize3] = vSize3, _class4["tiny-grid-editable"] = editConfig, _class4["show__head"] = showHeader, _class4["show__foot"] = showFooter, _class4["scroll__y"] = overflowY, _class4["scroll__x"] = overflowX, _class4["all-overflow"] = showOverflow, _class4["all-head-overflow"] = showHeaderOverflow, _class4["tiny-grid-cell__highlight"] = highlightCell, _class4["tiny-grid__animat"] = optimizeOpts.animat, _class4["tiny-grid__stripe"] = !isThemeSaas3 && stripe, _class4["tiny-grid__stripe-saas"] = isThemeSaas3 && stripeSaas, _class4["tiny-grid__border"] = border || isGroup2, _class4["tiny-grid__border-saas"] = isThemeSaas3 && borderSaas, _class4["tiny-grid__group-saas"] = isThemeSaas3 && isGroup2, _class4["tiny-grid__border-vertical"] = borderVertical, _class4["tiny-grid__checked"] = mouseConfig.checked, _class4["tiny-grid__hover-align"] = mouseConfig.hover, _class4["mark-insert"] = editConfig && editConfig.markInsert, _class4["edit__no-border"] = editConfig && editConfig.showBorder === false, _class4["is__loading"] = loading, _class4["row__highlight"] = highlightHoverRow, _class4["column__highlight"] = highlightHoverColumn, _class4["is__row-span"] = rowSpan && rowSpan.length > 0 || typeof spanMethod === "function", _class4["row__drop-handle--index"] = dropConfig.rowHandle === "index", _class4["fixed__sticky"] = horizonScroll.fixed, _class4)
11250
11502
  }, [
11251
11503
  // 隐藏列
11252
11504
  h("div", {
@@ -11274,9 +11526,10 @@ var Table = defineComponent({
11274
11526
  key: "tinyGridResizeBar"
11275
11527
  }) : null,
11276
11528
  // 加载中
11277
- h(loadingComponent || Loading, {
11529
+ h(Loading, {
11278
11530
  props: {
11279
- visible: loading
11531
+ visible: loading,
11532
+ loadingComponent
11280
11533
  },
11281
11534
  class: this.viewCls("gridLoading")
11282
11535
  }),
@@ -11476,8 +11729,8 @@ var Column = defineComponent({
11476
11729
  default: null
11477
11730
  }
11478
11731
  },
11479
- setup: function setup7(props, _ref177) {
11480
- var slots = _ref177.slots;
11732
+ setup: function setup7(props, _ref176) {
11733
+ var slots = _ref176.slots;
11481
11734
  var reactive = hooks.reactive, inject = hooks.inject, getCurrentInstance = hooks.getCurrentInstance, onUpdated = hooks.onUpdated, watch = hooks.watch, nextTick = hooks.nextTick;
11482
11735
  var currentInstance = getCurrentInstance();
11483
11736
  var instance = currentInstance.proxy;
@@ -11531,7 +11784,7 @@ var Column = defineComponent({
11531
11784
  warn("ui.grid.error.chainCallError");
11532
11785
  }
11533
11786
  var hasSubColumn = findTree(slotVnode, function(node) {
11534
- var _ref178 = node || {}, componentOptions = _ref178.componentOptions, type = _ref178.type;
11787
+ var _ref177 = node || {}, componentOptions = _ref177.componentOptions, type = _ref177.type;
11535
11788
  var componentName = type && type.name || componentOptions && componentOptions.Ctor.extendOptions.name;
11536
11789
  return $table.isValidCustomColumn(componentName);
11537
11790
  }, null, null);
@@ -11779,8 +12032,8 @@ var Grid = defineComponent({
11779
12032
  var tinyTheme = hooks.ref(resolveTheme(props, context));
11780
12033
  var tinyMode = hooks.ref(resolveMode(props, context));
11781
12034
  var breakpoint = useBreakpoint();
11782
- var renderless = function renderless2(props2, hooks2, _ref179) {
11783
- var _ref179$designConfig = _ref179.designConfig, designConfig = _ref179$designConfig === void 0 ? null : _ref179$designConfig;
12035
+ var renderless = function renderless2(props2, hooks2, _ref178) {
12036
+ var _ref178$designConfig = _ref178.designConfig, designConfig = _ref178$designConfig === void 0 ? null : _ref178$designConfig;
11784
12037
  return {
11785
12038
  tableListeners,
11786
12039
  designConfig,
@@ -11887,8 +12140,8 @@ var Grid = defineComponent({
11887
12140
  this.tasks.updateParentHeight();
11888
12141
  },
11889
12142
  // 向缓存添加实例
11890
- connect: function connect2(_ref180) {
11891
- var name = _ref180.name, vm = _ref180.vm;
12143
+ connect: function connect2(_ref179) {
12144
+ var name = _ref179.name, vm = _ref179.vm;
11892
12145
  if (name && typeof name === "string" && vm) {
11893
12146
  this.vmStore[name] = vm;
11894
12147
  }
@@ -11960,30 +12213,25 @@ var Grid = defineComponent({
11960
12213
  Grid.install = function(Vue) {
11961
12214
  Vue.component(Grid.name, Grid);
11962
12215
  };
11963
- function operArrs(_ref181) {
11964
- var _vm = _ref181._vm, editStore = _ref181.editStore, newRecords = _ref181.newRecords, newRecordsCopy = _ref181.newRecordsCopy, nowData = _ref181.nowData, row2 = _ref181.row, tableFullData = _ref181.tableFullData, tableSourceData = _ref181.tableSourceData;
12216
+ function operArrs(_ref180) {
12217
+ var _vm = _ref180._vm, editStore = _ref180.editStore, newRecords = _ref180.newRecords, row2 = _ref180.row, tableFullData = _ref180.tableFullData;
11965
12218
  if (row2 === -1) {
11966
- Array.prototype.push.apply(nowData, newRecords);
11967
12219
  Array.prototype.push.apply(tableFullData, newRecords);
11968
- Array.prototype.push.apply(tableSourceData, newRecordsCopy);
11969
12220
  }
11970
12221
  if (row2 && row2 !== -1) {
11971
- var targetIndex = nowData.indexOf(row2);
11972
- if (targetIndex === -1) {
12222
+ var insertIndex = tableFullData.indexOf(row2);
12223
+ if (insertIndex === -1) {
11973
12224
  throw new Error(error("ui.grid.error.unableInsert"));
11974
12225
  }
11975
- var insertIndex = tableFullData.indexOf(row2);
11976
- Array.prototype.splice.apply(nowData, [targetIndex, 0].concat(newRecords));
11977
12226
  Array.prototype.splice.apply(tableFullData, [insertIndex, 0].concat(newRecords));
11978
- Array.prototype.splice.apply(tableSourceData, [insertIndex, 0].concat(newRecordsCopy));
11979
12227
  }
11980
12228
  if (!row2) {
11981
- Array.prototype.unshift.apply(nowData, newRecords);
11982
12229
  Array.prototype.unshift.apply(tableFullData, newRecords);
11983
- Array.prototype.unshift.apply(tableSourceData, newRecordsCopy);
11984
12230
  }
11985
12231
  Array.prototype.unshift.apply(editStore.insertList, newRecords);
11986
- Array.prototype.push.apply(_vm.temporaryRows, newRecordsCopy);
12232
+ newRecords.forEach(function(row22) {
12233
+ return editStore.insertMap.set(getRowid(_vm, row22), row22);
12234
+ });
11987
12235
  }
11988
12236
  var _setActiveCell = function _setActiveCell2(row2, field) {
11989
12237
  var _this52 = this;
@@ -12028,35 +12276,27 @@ var Methods$c = {
12028
12276
  // 根据位置从指定行添加数据
12029
12277
  _insertAt: function _insertAt(records, row2) {
12030
12278
  var _this53 = this;
12031
- var afterFullData = this.afterFullData, editStore = this.editStore, isAsyncColumn = this.isAsyncColumn, scrollYLoad = this.scrollYLoad, tableFullData = this.tableFullData, _this$tableSourceData = this.tableSourceData, tableSourceData = _this$tableSourceData === void 0 ? [] : _this$tableSourceData, treeConfig = this.treeConfig;
12279
+ var editStore = this.editStore, isAsyncColumn = this.isAsyncColumn, scrollYLoad = this.scrollYLoad, tableFullData = this.tableFullData, treeConfig = this.treeConfig, visibleColumn = this.visibleColumn;
12032
12280
  if (treeConfig) {
12033
12281
  throw new Error(error("ui.grid.error.treeInsert"));
12034
12282
  }
12035
- if (isAsyncColumn) {
12036
- var columnSet = this.getColumns();
12037
- columnSet.forEach(function(column) {
12038
- if (column.format && column.format.async && column.format.async.fetch) {
12039
- records[GlobalConfig$1.constant.insertedField] = true;
12040
- }
12041
- });
12042
- }
12043
12283
  if (!isArray(records)) {
12044
12284
  records = [records];
12045
12285
  }
12046
- var nowData = afterFullData;
12286
+ var isColumnFormat = isAsyncColumn && visibleColumn.some(function(column) {
12287
+ var _column$format, _column$format$async;
12288
+ return (_column$format = column.format) == null ? void 0 : (_column$format$async = _column$format.async) == null ? void 0 : _column$format$async.fetch;
12289
+ });
12047
12290
  var newRecords = records.map(function(record) {
12048
- return hooks.reactive(_this53.defineField(_extends({}, record)));
12291
+ isColumnFormat && (record[GlobalConfig$1.constant.insertedField] = true);
12292
+ return hooks.reactive(_this53.defineField(Object.assign({}, record)));
12049
12293
  });
12050
- var newRecordsCopy = clone(newRecords, true);
12051
12294
  operArrs({
12052
12295
  _vm: this,
12053
12296
  editStore,
12054
- newRecords,
12055
- newRecordsCopy,
12056
- nowData,
12057
12297
  row: row2,
12058
12298
  tableFullData,
12059
- tableSourceData
12299
+ newRecords
12060
12300
  });
12061
12301
  this.updateCache();
12062
12302
  this.handleTableData(true);
@@ -12081,9 +12321,9 @@ var Methods$c = {
12081
12321
  */
12082
12322
  _remove: function _remove(rows) {
12083
12323
  var _this54 = this;
12084
- var afterFullData = this.afterFullData, scrollYLoad = this.scrollYLoad, _this$selectConfig3 = this.selectConfig, selectConfig = _this$selectConfig3 === void 0 ? {} : _this$selectConfig3;
12085
- var selection = this.selection, tableFullData = this.tableFullData, treeConfig = this.treeConfig, _this$tableSourceData2 = this.tableSourceData, tableSourceData = _this$tableSourceData2 === void 0 ? [] : _this$tableSourceData2;
12086
- var _this$editStore = this.editStore, insertList = _this$editStore.insertList, removeList = _this$editStore.removeList;
12324
+ var afterFullData = this.afterFullData, _this$selectConfig3 = this.selectConfig, selectConfig = _this$selectConfig3 === void 0 ? {} : _this$selectConfig3;
12325
+ var selection = this.selection, tableFullData = this.tableFullData, treeConfig = this.treeConfig;
12326
+ var _this$editStore = this.editStore, insertList = _this$editStore.insertList, insertMap = _this$editStore.insertMap, removeList = _this$editStore.removeList;
12087
12327
  var checkField = selectConfig.checkField;
12088
12328
  var nowData = afterFullData;
12089
12329
  var rest = [];
@@ -12102,7 +12342,7 @@ var Methods$c = {
12102
12342
  }
12103
12343
  for (var i = 0; i < rows.length; i++) {
12104
12344
  var row2 = rows[i];
12105
- if (this.hasRowInsert(row2)) continue;
12345
+ if (this.isTemporaryRow(row2)) continue;
12106
12346
  removeList.push(row2);
12107
12347
  }
12108
12348
  if (!checkField) {
@@ -12122,23 +12362,15 @@ var Methods$c = {
12122
12362
  return inArr(row3, rows);
12123
12363
  });
12124
12364
  }
12125
- remove(tableSourceData, function(row3) {
12126
- return find$1(insertList, function(r) {
12127
- return getRowid(_this54, r) === getRowid(_this54, row3);
12128
- }) && find$1(rows, function(r) {
12129
- return getRowid(_this54, r) === getRowid(_this54, row3);
12130
- });
12131
- });
12132
12365
  remove(insertList, function(row3) {
12133
- return inArr(row3, rows);
12366
+ var exist = inArr(row3, rows);
12367
+ exist && insertMap.delete(getRowid(_this54, row3));
12368
+ return exist;
12134
12369
  });
12135
12370
  this.updateCache();
12136
12371
  this.handleTableData(true);
12137
12372
  this.checkSelectionStatus();
12138
12373
  this.updateFooter();
12139
- if (scrollYLoad) {
12140
- this.updateScrollYSpace();
12141
- }
12142
12374
  var res = {
12143
12375
  row: rows && rows.length ? rows[rows.length - 1] : null,
12144
12376
  rows: rest
@@ -12172,12 +12404,12 @@ var Methods$c = {
12172
12404
  * 如果还额外传了field则还原指定单元格。
12173
12405
  */
12174
12406
  _revertData: function _revertData(rows, field) {
12175
- var tableSynchData = this.tableSynchData;
12407
+ var rawData = this.rawData;
12176
12408
  if (arguments.length && rows && !isArray(rows)) {
12177
12409
  rows = [rows];
12178
12410
  }
12179
12411
  if (!arguments.length) {
12180
- rows = tableSynchData || [];
12412
+ rows = rawData || [];
12181
12413
  }
12182
12414
  for (var i = 0; i < rows.length; i++) {
12183
12415
  var row2 = rows[i];
@@ -12194,7 +12426,7 @@ var Methods$c = {
12194
12426
  if (arguments.length) {
12195
12427
  return this.$nextTick();
12196
12428
  }
12197
- return this.reloadData(tableSynchData);
12429
+ return this.reloadData(rawData || []);
12198
12430
  },
12199
12431
  /**
12200
12432
  * 获取表格操作数据集
@@ -12329,7 +12561,7 @@ var Methods$c = {
12329
12561
  */
12330
12562
  _clearActived: function _clearActived(event) {
12331
12563
  var _this58 = this;
12332
- var _this$editConfig2 = this.editConfig, editConfig = _this$editConfig2 === void 0 ? {} : _this$editConfig2, editStore = this.editStore, tableColumn2 = this.tableColumn;
12564
+ var _this$editConfig3 = this.editConfig, editConfig = _this$editConfig3 === void 0 ? {} : _this$editConfig3, editStore = this.editStore, tableColumn2 = this.tableColumn;
12333
12565
  var actived = editStore.actived;
12334
12566
  var args = actived.args, column = actived.column, row2 = actived.row;
12335
12567
  var isActived = row2 || column;
@@ -12346,7 +12578,7 @@ var Methods$c = {
12346
12578
  this.updateRowStatus(actived.row);
12347
12579
  this.updateFooter();
12348
12580
  var row22 = args.row, column2 = args.column;
12349
- var _ref182 = column2 || {}, editor = _ref182.editor;
12581
+ var _ref181 = column2 || {}, editor = _ref181.editor;
12350
12582
  if ((editor == null ? void 0 : editor.component) === "input" && (editor == null ? void 0 : (_editor$attrs = editor.attrs) == null ? void 0 : _editor$attrs.type) === "number") {
12351
12583
  row22[column2.property] = +row22[column2.property];
12352
12584
  }
@@ -12467,7 +12699,7 @@ var Methods$c = {
12467
12699
  var _this60 = this;
12468
12700
  var editConfig = this.editConfig, editStore = this.editStore, elemStore = this.elemStore, _this$mouseConfig3 = this.mouseConfig, mouseConfig = _this$mouseConfig3 === void 0 ? {} : _this$mouseConfig3;
12469
12701
  var actived = editStore.actived, selected = editStore.selected;
12470
- var _ref183 = params || {}, cell = _ref183.cell, column = _ref183.column, row2 = _ref183.row;
12702
+ var _ref182 = params || {}, cell = _ref182.cell, column = _ref182.column, row2 = _ref182.row;
12471
12703
  var selectMethod = function selectMethod2() {
12472
12704
  var _cell$parentNode;
12473
12705
  if (selected.row === row2 && selected.column === column || actived.row === row2 && (editConfig.mode !== "cell" || actived.column === column)) {
@@ -12648,7 +12880,7 @@ function handleCellMousedownEvent(args1) {
12648
12880
  var $el = args1.$el, _vm = args1._vm, bodyList = args1.bodyList, cell = args1.cell, cellFirstElementChild = args1.cellFirstElementChild;
12649
12881
  var cellLastElementChild = args1.cellLastElementChild, headStart = args1.headStart, headerList = args1.headerList, isIndex = args1.isIndex, startCellNode = args1.startCellNode;
12650
12882
  var _vm$mouseConfig2 = _vm.mouseConfig, mouseConfig = _vm$mouseConfig2 === void 0 ? {} : _vm$mouseConfig2;
12651
- var _ref184 = mouseConfig || {}, _ref184$updateInterva = _ref184.updateInterval, updateInterval = _ref184$updateInterva === void 0 ? 10 : _ref184$updateInterva;
12883
+ var _ref183 = mouseConfig || {}, _ref183$updateInterva = _ref183.updateInterval, updateInterval = _ref183$updateInterva === void 0 ? 10 : _ref183$updateInterva;
12652
12884
  var oldMousemove = document.onmousemove;
12653
12885
  var oldMouseup = document.onmouseup;
12654
12886
  var updateEvent = function updateEvent2(event) {
@@ -12687,8 +12919,8 @@ function onCellMousedownSelectEditable(args) {
12687
12919
  _vm.handleSelected(params, event);
12688
12920
  }
12689
12921
  }
12690
- function onCellMousedownSelect(_ref185) {
12691
- var _vm = _ref185._vm, editConfig = _ref185.editConfig, event = _ref185.event, mouseConfig = _ref185.mouseConfig, params = _ref185.params;
12922
+ function onCellMousedownSelect(_ref184) {
12923
+ var _vm = _ref184._vm, editConfig = _ref184.editConfig, event = _ref184.event, mouseConfig = _ref184.mouseConfig, params = _ref184.params;
12692
12924
  if (!editConfig && mouseConfig.selected) {
12693
12925
  _vm.handleSelected(params, event);
12694
12926
  }
@@ -12707,8 +12939,8 @@ function onCellMousedownIndexColumn(args) {
12707
12939
  _vm.handleIndexChecked(getRowNodes(bodyList, getCellNodeIndex(firstCell), getCellNodeIndex(cell)));
12708
12940
  }
12709
12941
  }
12710
- function onCellMousedownNotIndexColumn(_ref186) {
12711
- var _vm = _ref186._vm, cell = _ref186.cell, column = _ref186.column, event = _ref186.event, headerList = _ref186.headerList, isIndex = _ref186.isIndex, params = _ref186.params;
12942
+ function onCellMousedownNotIndexColumn(_ref185) {
12943
+ var _vm = _ref185._vm, cell = _ref185.cell, column = _ref185.column, event = _ref185.event, headerList = _ref185.headerList, isIndex = _ref185.isIndex, params = _ref185.params;
12712
12944
  if (!isIndex) {
12713
12945
  var firstCell = cell.parentNode.firstElementChild;
12714
12946
  _vm.handleSelected(params, event);
@@ -12716,8 +12948,8 @@ function onCellMousedownNotIndexColumn(_ref186) {
12716
12948
  _vm.handleIndexChecked([[firstCell]]);
12717
12949
  }
12718
12950
  }
12719
- function handleHeaderCellMousedownEvent(_ref187) {
12720
- var $el = _ref187.$el, _vm = _ref187._vm, bodyList = _ref187.bodyList, cell = _ref187.cell, headerList = _ref187.headerList, startCell = _ref187.startCell;
12951
+ function handleHeaderCellMousedownEvent(_ref186) {
12952
+ var $el = _ref186.$el, _vm = _ref186._vm, bodyList = _ref186.bodyList, cell = _ref186.cell, headerList = _ref186.headerList, startCell = _ref186.startCell;
12721
12953
  var oldMousemove = document.onmousemove;
12722
12954
  var oldMouseup = document.onmouseup;
12723
12955
  var updateEvent = function updateEvent2(event) {
@@ -12750,8 +12982,8 @@ var removeCellClass = function removeCellClass2(bodyRef, clazz) {
12750
12982
  return removeClass(elem, clazz);
12751
12983
  });
12752
12984
  };
12753
- var getCellIndex = function getCellIndex2(_ref188) {
12754
- var cell = _ref188.cell, bodyList = _ref188.bodyList;
12985
+ var getCellIndex = function getCellIndex2(_ref187) {
12986
+ var cell = _ref187.cell, bodyList = _ref187.bodyList;
12755
12987
  var trElem = cell.parentNode;
12756
12988
  var cIndex = arrayIndexOf(trElem.children, cell);
12757
12989
  var rIndex = arrayIndexOf(bodyList, trElem);
@@ -12760,8 +12992,8 @@ var getCellIndex = function getCellIndex2(_ref188) {
12760
12992
  cIndex
12761
12993
  };
12762
12994
  };
12763
- var getModify = function getModify2(_ref189) {
12764
- var offsetTop = _ref189.offsetTop, offsetLeft = _ref189.offsetLeft, cWidth = _ref189.cWidth, cHeight = _ref189.cHeight;
12995
+ var getModify = function getModify2(_ref188) {
12996
+ var offsetTop = _ref188.offsetTop, offsetLeft = _ref188.offsetLeft, cWidth = _ref188.cWidth, cHeight = _ref188.cHeight;
12765
12997
  var modifyDomStyle = function modifyDomStyle2(dom, styleOptions) {
12766
12998
  return dom && Object.assign(dom.style, styleOptions);
12767
12999
  };
@@ -12788,8 +13020,8 @@ var getModify = function getModify2(_ref189) {
12788
13020
  });
12789
13021
  };
12790
13022
  };
12791
- var writeClipboardText = function writeClipboardText2(_ref190) {
12792
- var $table = _ref190.$table, columns2 = _ref190.columns, rows = _ref190.rows, rowNodes = _ref190.rowNodes;
13023
+ var writeClipboardText = function writeClipboardText2(_ref189) {
13024
+ var $table = _ref189.$table, columns2 = _ref189.columns, rows = _ref189.rows, rowNodes = _ref189.rowNodes;
12793
13025
  var _$table$keyboardConfi = $table.keyboardConfig, keyboardConfig = _$table$keyboardConfi === void 0 ? {} : _$table$keyboardConfi;
12794
13026
  var _keyboardConfig$clipb = keyboardConfig.clipboard, clipboard = _keyboardConfig$clipb === void 0 ? {} : _keyboardConfig$clipb;
12795
13027
  var writeMethod = clipboard.writeMethod, _clipboard$cellSplit = clipboard.cellSplit, cellSplit = _clipboard$cellSplit === void 0 ? "," : _clipboard$cellSplit, _clipboard$rowSplit = clipboard.rowSplit, rowSplit = _clipboard$rowSplit === void 0 ? ";" : _clipboard$rowSplit;
@@ -12836,7 +13068,7 @@ var Methods$b = {
12836
13068
  var params = _extends({}, args);
12837
13069
  var columnIndex = visibleColumn.indexOf(params.column);
12838
13070
  var rowIndex = tableData.indexOf(params.row);
12839
- var _ref191 = {}, targetColumn = _ref191.targetColumn, targetColumnIndex = _ref191.targetColumnIndex, targetRow = _ref191.targetRow, targetRowIndex = _ref191.targetRowIndex;
13071
+ var _ref190 = {}, targetColumn = _ref190.targetColumn, targetColumnIndex = _ref190.targetColumnIndex, targetRow = _ref190.targetRow, targetRowIndex = _ref190.targetRowIndex;
12840
13072
  event.preventDefault();
12841
13073
  var checkColumn = function checkColumn2(column) {
12842
13074
  return !hasIndexColumn2(column) && (edit ? column.editor : true);
@@ -12930,9 +13162,9 @@ var Methods$b = {
12930
13162
  }
12931
13163
  },
12932
13164
  // 可编辑方向键移动处理
12933
- moveSelected: function moveSelected(_ref192) {
13165
+ moveSelected: function moveSelected(_ref191) {
12934
13166
  var _this62 = this;
12935
- var args = _ref192.args, isLeftArrow = _ref192.isLeftArrow, isUpArrow = _ref192.isUpArrow, isRightArrow = _ref192.isRightArrow, isDownArrow = _ref192.isDownArrow, event = _ref192.event;
13167
+ var args = _ref191.args, isLeftArrow = _ref191.isLeftArrow, isUpArrow = _ref191.isUpArrow, isRightArrow = _ref191.isRightArrow, isDownArrow = _ref191.isDownArrow, event = _ref191.event;
12936
13168
  var hasIndexColumn2 = this.hasIndexColumn, visibleColumn = this.tableColumn, tableData = this.tableFullData;
12937
13169
  var params = _extends({}, args);
12938
13170
  var column = params.column;
@@ -13154,7 +13386,7 @@ var Methods$b = {
13154
13386
  _getMouseCheckeds: function _getMouseCheckeds() {
13155
13387
  var _this64 = this;
13156
13388
  var _this$editStore$check = this.editStore.checked.rowNodes, rowNodes = _this$editStore$check === void 0 ? [] : _this$editStore$check;
13157
- var _ref193 = {}, _ref193$rows = _ref193.rows, rows = _ref193$rows === void 0 ? [] : _ref193$rows, _ref193$columns = _ref193.columns, columns2 = _ref193$columns === void 0 ? [] : _ref193$columns;
13389
+ var _ref192 = {}, _ref192$rows = _ref192.rows, rows = _ref192$rows === void 0 ? [] : _ref192$rows, _ref192$columns = _ref192.columns, columns2 = _ref192$columns === void 0 ? [] : _ref192$columns;
13158
13390
  var res = {
13159
13391
  rows,
13160
13392
  columns: columns2,
@@ -13183,7 +13415,7 @@ var Methods$b = {
13183
13415
  if (!mouseConfig || !mouseConfig.checked) {
13184
13416
  return;
13185
13417
  }
13186
- var _ref194 = {}, cHeight = _ref194.cHeight, cWidth = _ref194.cWidth, offsetLeft = _ref194.offsetLeft, offsetTop = _ref194.offsetTop;
13418
+ var _ref193 = {}, cHeight = _ref193.cHeight, cWidth = _ref193.cWidth, offsetLeft = _ref193.offsetLeft, offsetTop = _ref193.offsetTop;
13187
13419
  cWidth = cHeight = -2;
13188
13420
  offsetTop = offsetLeft = 0;
13189
13421
  this.clearChecked();
@@ -13312,7 +13544,7 @@ var Methods$b = {
13312
13544
  var editStore = this.editStore, tableColumn2 = this.tableColumn, tableData = this.tableData;
13313
13545
  var copyed = editStore.copyed;
13314
13546
  var rowNodes = editStore.checked.rowNodes;
13315
- var _ref195 = {}, cHeight = _ref195.cHeight, cWidth = _ref195.cWidth, offsetLeft = _ref195.offsetLeft, offsetTop = _ref195.offsetTop, _ref195$rows = _ref195.rows, rows = _ref195$rows === void 0 ? [] : _ref195$rows, _ref195$columns = _ref195.columns, columns2 = _ref195$columns === void 0 ? [] : _ref195$columns;
13547
+ var _ref194 = {}, cHeight = _ref194.cHeight, cWidth = _ref194.cWidth, offsetLeft = _ref194.offsetLeft, offsetTop = _ref194.offsetTop, _ref194$rows = _ref194.rows, rows = _ref194$rows === void 0 ? [] : _ref194$rows, _ref194$columns = _ref194.columns, columns2 = _ref194$columns === void 0 ? [] : _ref194$columns;
13316
13548
  cWidth = cHeight = -3;
13317
13549
  offsetTop = offsetLeft = 0;
13318
13550
  this.clearCopyed();
@@ -13435,13 +13667,13 @@ function adjustParams(rows, cb, vaildDatas) {
13435
13667
  vaildDatas
13436
13668
  };
13437
13669
  }
13438
- var columnHandler = function columnHandler2(_ref196) {
13439
- var _vm = _ref196._vm, colValidPromiseArr = _ref196.colValidPromiseArr, editRules = _ref196.editRules, isAll = _ref196.isAll, row2 = _ref196.row, validRest = _ref196.validRest;
13670
+ var columnHandler = function columnHandler2(_ref195) {
13671
+ var _vm = _ref195._vm, colValidPromiseArr = _ref195.colValidPromiseArr, editRules = _ref195.editRules, isAll = _ref195.isAll, row2 = _ref195.row, validRest = _ref195.validRest;
13440
13672
  return function(column, columnIndex) {
13441
13673
  if (has(editRules, column.property)) {
13442
13674
  colValidPromiseArr.push(new Promise(function(resolve, reject) {
13443
- _vm.validCellRules("all", row2, column).then(resolve).catch(function(_ref197) {
13444
- var rule = _ref197.rule, rules = _ref197.rules;
13675
+ _vm.validCellRules("all", row2, column).then(resolve).catch(function(_ref196) {
13676
+ var rule = _ref196.rule, rules = _ref196.rules;
13445
13677
  var rowIndex = _vm.getRowIndex(row2);
13446
13678
  var rest = {
13447
13679
  rule,
@@ -13465,8 +13697,8 @@ var columnHandler = function columnHandler2(_ref196) {
13465
13697
  }
13466
13698
  };
13467
13699
  };
13468
- function validTree(_ref198) {
13469
- var treeConfig = _ref198.treeConfig, handleVaild = _ref198.handleVaild, hasTreeExpand2 = _ref198.hasTreeExpand, vaildDatas = _ref198.vaildDatas, treeOpts = _ref198.treeOpts;
13700
+ function validTree(_ref197) {
13701
+ var treeConfig = _ref197.treeConfig, handleVaild = _ref197.handleVaild, hasTreeExpand2 = _ref197.hasTreeExpand, vaildDatas = _ref197.vaildDatas, treeOpts = _ref197.treeOpts;
13470
13702
  if (treeConfig.validHidden === false) {
13471
13703
  var _recurValid = function recurValid(row2) {
13472
13704
  var children = row2[treeConfig.children || "children"];
@@ -13480,8 +13712,8 @@ function validTree(_ref198) {
13480
13712
  eachTree(vaildDatas, handleVaild, treeOpts);
13481
13713
  }
13482
13714
  }
13483
- var realValid = function realValid2(_ref199) {
13484
- var _vm = _ref199._vm, editRules = _ref199.editRules, isAll = _ref199.isAll, validRest = _ref199.validRest, treeConfig = _ref199.treeConfig, hasTreeExpand2 = _ref199.hasTreeExpand, vaildDatas = _ref199.vaildDatas, treeOpts = _ref199.treeOpts;
13715
+ var realValid = function realValid2(_ref198) {
13716
+ var _vm = _ref198._vm, editRules = _ref198.editRules, isAll = _ref198.isAll, validRest = _ref198.validRest, treeConfig = _ref198.treeConfig, hasTreeExpand2 = _ref198.hasTreeExpand, vaildDatas = _ref198.vaildDatas, treeOpts = _ref198.treeOpts;
13485
13717
  var rowValids = [];
13486
13718
  var columns2 = _vm.getColumns();
13487
13719
  var handleVaild = function handleVaild2(row2) {
@@ -13533,8 +13765,8 @@ var Rule = /* @__PURE__ */ (function() {
13533
13765
  var onRejected = function onRejected2(opt, _this) {
13534
13766
  var isAll = opt.isAll, validRest = opt.validRest, cb = opt.cb, afterFullData = opt.afterFullData, treeConfig = opt.treeConfig;
13535
13767
  return function(params) {
13536
- var _ref200;
13537
- var args = isAll ? validRest : (_ref200 = {}, _ref200[params.column.property] = params, _ref200);
13768
+ var _ref199;
13769
+ var args = isAll ? validRest : (_ref199 = {}, _ref199[params.column.property] = params, _ref199);
13538
13770
  var funcFinish = function funcFinish2(args2, reject, resolve) {
13539
13771
  return function() {
13540
13772
  opt.status = false;
@@ -13601,10 +13833,10 @@ var Methods$a = {
13601
13833
  },
13602
13834
  validatePromise: function validatePromise(row2, column, columnIndex, isAll, validRest) {
13603
13835
  var _this67 = this;
13604
- function onrejected(_ref202) {
13605
- var _vm = _ref202._vm, reject = _ref202.reject, resolve = _ref202.resolve;
13606
- return function(_ref203) {
13607
- var rule = _ref203.rule, rules = _ref203.rules;
13836
+ function onrejected(_ref201) {
13837
+ var _vm = _ref201._vm, reject = _ref201.reject, resolve = _ref201.resolve;
13838
+ return function(_ref202) {
13839
+ var rule = _ref202.rule, rules = _ref202.rules;
13608
13840
  var rest = {
13609
13841
  $table: _vm,
13610
13842
  column,
@@ -13640,7 +13872,7 @@ var Methods$a = {
13640
13872
  */
13641
13873
  beginValidate: function beginValidate(rows, callback, isAll) {
13642
13874
  var afterFullData = this.afterFullData, editRules = this.editRules, hasTreeExpand2 = this.hasTreeExpand, treeConfig = this.treeConfig, treeOpts = this.treeOpts;
13643
- var _ref204 = {}, _ref204$status = _ref204.status, status = _ref204$status === void 0 ? true : _ref204$status, _ref204$validRest = _ref204.validRest, validRest = _ref204$validRest === void 0 ? {} : _ref204$validRest;
13875
+ var _ref203 = {}, _ref203$status = _ref203.status, status = _ref203$status === void 0 ? true : _ref203$status, _ref203$validRest = _ref203.validRest, validRest = _ref203$validRest === void 0 ? {} : _ref203$validRest;
13644
13876
  var _adjustParams = adjustParams(rows, callback, afterFullData), vaildDatas = _adjustParams.vaildDatas, cb = _adjustParams.cb;
13645
13877
  var opt = {
13646
13878
  isAll,
@@ -13678,8 +13910,8 @@ var Methods$a = {
13678
13910
  };
13679
13911
  return Promise.all(rowValids).then(onFulfilled).catch(onRejected(opt, this));
13680
13912
  },
13681
- hasCellRules: function hasCellRules(type, row2, _ref205) {
13682
- var property = _ref205.property;
13913
+ hasCellRules: function hasCellRules(type, row2, _ref204) {
13914
+ var property = _ref204.property;
13683
13915
  if (!property || !this.editRules) {
13684
13916
  return false;
13685
13917
  }
@@ -13712,7 +13944,7 @@ var Methods$a = {
13712
13944
  var _this68 = this;
13713
13945
  var editRules = this.editRules, rowId = this.rowId;
13714
13946
  var property = column.property;
13715
- var _ref206 = {}, _ref206$descriptor = _ref206.descriptor, descriptor = _ref206$descriptor === void 0 ? {} : _ref206$descriptor, _ref206$model = _ref206.model, model = _ref206$model === void 0 ? {} : _ref206$model;
13947
+ var _ref205 = {}, _ref205$descriptor = _ref205.descriptor, descriptor = _ref205$descriptor === void 0 ? {} : _ref205$descriptor, _ref205$model = _ref205.model, model = _ref205$model === void 0 ? {} : _ref205$model;
13716
13948
  if (property && editRules) {
13717
13949
  var rules = get(editRules, property);
13718
13950
  var cellValue = isUndefined(defaultValue) ? get(row2, property) : defaultValue;
@@ -13737,8 +13969,8 @@ var Methods$a = {
13737
13969
  column
13738
13970
  }
13739
13971
  };
13740
- var onRejected3 = function onRejected32(_ref207) {
13741
- var fields = _ref207.fields;
13972
+ var onRejected3 = function onRejected32(_ref206) {
13973
+ var fields = _ref206.fields;
13742
13974
  var cellErrors = Object.keys(fields).map(function(prop) {
13743
13975
  var rules2 = _descriptor[prop];
13744
13976
  _descriptor[prop] = !rules2.message ? Object.assign(rules2, {
@@ -13775,6 +14007,13 @@ var Methods$a = {
13775
14007
  this.clostValidTooltip(void 0);
13776
14008
  return this.$nextTick();
13777
14009
  },
14010
+ clearValidateMap: function clearValidateMap() {
14011
+ if (this.validatedMap) {
14012
+ for (var key in this.validatedMap) {
14013
+ this.validatedMap[key] = false;
14014
+ }
14015
+ }
14016
+ },
13778
14017
  // 触发校验
13779
14018
  triggerValidate: function triggerValidate(type) {
13780
14019
  var _this69 = this;
@@ -13790,8 +14029,8 @@ var Methods$a = {
13790
14029
  var onfulfilled = function onfulfilled2() {
13791
14030
  editConfig.mode === "row" && validStore.visible && validStore.row === row2 && validStore.column === column && _this69.clearValidate();
13792
14031
  };
13793
- var onrejected = function onrejected2(_ref208) {
13794
- var rule = _ref208.rule;
14032
+ var onrejected = function onrejected2(_ref207) {
14033
+ var rule = _ref207.rule;
13795
14034
  if (rule.trigger && type !== rule.trigger) {
13796
14035
  return Promise.resolve();
13797
14036
  }
@@ -13885,7 +14124,7 @@ var Methods$8 = {
13885
14124
  initFetchOption: function initFetchOption() {
13886
14125
  var _this$fetchData = this.fetchData, fetchData = _this$fetchData === void 0 ? {} : _this$fetchData, _this$dataset = this.dataset, dataset = _this$dataset === void 0 ? {} : _this$dataset;
13887
14126
  if (fetchData.api || dataset.source || dataset.value || dataset.api) {
13888
- var _ref209 = fetchData || dataset.source || dataset.api || {}, loading = _ref209.loading, fields = _ref209.fields, api = _ref209.api, reloadConfig = _ref209.reloadConfig;
14127
+ var _ref208 = fetchData || dataset.source || dataset.api || {}, loading = _ref208.loading, fields = _ref208.fields, api = _ref208.api, reloadConfig = _ref208.reloadConfig;
13889
14128
  var isReloadFilter = false;
13890
14129
  var isReloadScroll = false;
13891
14130
  if (reloadConfig) {
@@ -13923,7 +14162,7 @@ var Methods$8 = {
13923
14162
  error("ui.grid.error.notQuery");
13924
14163
  return this.$nextTick();
13925
14164
  }
13926
- var _ref210 = fetchData || dataset.source || dataset.api || {}, args = _ref210.args, loading = _ref210.loading;
14165
+ var _ref209 = fetchData || dataset.source || dataset.api || {}, args = _ref209.args, loading = _ref209.loading;
13927
14166
  var field = sortData.field, order = sortData.order, prop = sortData.prop, property = sortData.property;
13928
14167
  var sortByData = {
13929
14168
  field,
@@ -14031,8 +14270,8 @@ var Methods$7 = {
14031
14270
  }
14032
14271
  },
14033
14272
  // 表格内置分页渲染器
14034
- renderPager: function renderPager(_ref211) {
14035
- var $slots = _ref211.$slots, _vm = _ref211._vm, loading = _ref211.loading, pager = _ref211.pager, pagerConfig = _ref211.pagerConfig, tableLoading = _ref211.tableLoading, vSize3 = _ref211.vSize;
14273
+ renderPager: function renderPager(_ref210) {
14274
+ var $slots = _ref210.$slots, _vm = _ref210._vm, loading = _ref210.loading, pager = _ref210.pager, pagerConfig = _ref210.pagerConfig, tableLoading = _ref210.tableLoading, vSize3 = _ref210.vSize;
14036
14275
  var res = null;
14037
14276
  var fetchData = _vm.fetchData;
14038
14277
  if ($slots.pager) {
@@ -14126,8 +14365,8 @@ var Pager = {
14126
14365
  Object.assign(host.methods, Methods$7);
14127
14366
  }
14128
14367
  };
14129
- function setBodyRecords(_ref212) {
14130
- var body = _ref212.body, insertRecords = _ref212.insertRecords, pendingRecords = _ref212.pendingRecords;
14368
+ function setBodyRecords(_ref211) {
14369
+ var body = _ref211.body, insertRecords = _ref211.insertRecords, pendingRecords = _ref211.pendingRecords;
14131
14370
  if (insertRecords.length) {
14132
14371
  body.pendingRecords = pendingRecords.filter(function(row2) {
14133
14372
  return !insertRecords.includes(row2);
@@ -14142,8 +14381,8 @@ function setBodyRecords(_ref212) {
14142
14381
  function canInvokeSaveDataApi(body, removeRecords, updateRecords) {
14143
14382
  return body.insertRecords.length || removeRecords.length || updateRecords.length || body.pendingRecords.length;
14144
14383
  }
14145
- function doRemoveOrShowMsg(_ref213) {
14146
- var _vm = _ref213._vm, canInvoke = _ref213.canInvoke, code = _ref213.code, isMsg2 = _ref213.isMsg, pendingRecords = _ref213.pendingRecords, resolve = _ref213.resolve, valid = _ref213.valid;
14384
+ function doRemoveOrShowMsg(_ref212) {
14385
+ var _vm = _ref212._vm, canInvoke = _ref212.canInvoke, code = _ref212.code, isMsg2 = _ref212.isMsg, pendingRecords = _ref212.pendingRecords, resolve = _ref212.resolve, valid = _ref212.valid;
14147
14386
  if (valid && !canInvoke) {
14148
14387
  if (isMsg2) {
14149
14388
  if (pendingRecords.length) {
@@ -14159,8 +14398,8 @@ function doRemoveOrShowMsg(_ref213) {
14159
14398
  resolve();
14160
14399
  }
14161
14400
  }
14162
- function invokeSaveDataApi(_ref214) {
14163
- var _vm = _ref214._vm, args = _ref214.args, body = _ref214.body, code = _ref214.code, removeRecords = _ref214.removeRecords, resolve = _ref214.resolve, saveData = _ref214.saveData, updateRecords = _ref214.updateRecords, valid = _ref214.valid;
14401
+ function invokeSaveDataApi(_ref213) {
14402
+ var _vm = _ref213._vm, args = _ref213.args, body = _ref213.body, code = _ref213.code, removeRecords = _ref213.removeRecords, resolve = _ref213.resolve, saveData = _ref213.saveData, updateRecords = _ref213.updateRecords, valid = _ref213.valid;
14164
14403
  var canInvoke = false;
14165
14404
  if (valid) {
14166
14405
  canInvoke = canInvokeSaveDataApi(body, removeRecords, updateRecords);
@@ -14187,8 +14426,8 @@ function invokeSaveDataApi(_ref214) {
14187
14426
  }
14188
14427
  var Methods$6 = {
14189
14428
  // 表格工具栏渲染器
14190
- getRenderedToolbar: function getRenderedToolbar(_ref215) {
14191
- var $slots = _ref215.$slots, _vm = _ref215._vm, loading = _ref215.loading, tableLoading = _ref215.tableLoading, toolbar = _ref215.toolbar;
14429
+ getRenderedToolbar: function getRenderedToolbar(_ref214) {
14430
+ var $slots = _ref214.$slots, _vm = _ref214._vm, loading = _ref214.loading, tableLoading = _ref214.tableLoading, toolbar = _ref214.toolbar;
14192
14431
  return _vm.renderedToolbar = (function() {
14193
14432
  var res = null;
14194
14433
  if ($slots.toolbar) {
@@ -14290,9 +14529,9 @@ var Methods$6 = {
14290
14529
  };
14291
14530
  this.remove(selecteds).then(afterRemove);
14292
14531
  },
14293
- handleFullScreen: function handleFullScreen(_ref216) {
14532
+ handleFullScreen: function handleFullScreen(_ref215) {
14294
14533
  var _this77 = this;
14295
- var show2 = _ref216[0];
14534
+ var show2 = _ref215[0];
14296
14535
  this.fullScreenClass = show2 ? "tiny-fullscreen-full" : "";
14297
14536
  this.$nextTick(function() {
14298
14537
  _this77.recalculate();
@@ -14309,8 +14548,8 @@ var Methods$6 = {
14309
14548
  if (code === "insert") {
14310
14549
  this.insert();
14311
14550
  } else if (code === "insert_actived") {
14312
- this.insert().then(function(_ref217) {
14313
- var row2 = _ref217.row;
14551
+ this.insert().then(function(_ref216) {
14552
+ var row2 = _ref216.row;
14314
14553
  return _this78.setActiveRow(row2);
14315
14554
  });
14316
14555
  } else if (code === "mark_cancel") {
@@ -14397,7 +14636,7 @@ var Methods$6 = {
14397
14636
  });
14398
14637
  }
14399
14638
  if (selecteds.length) {
14400
- var _ref218 = {}, _ref218$plus = _ref218.plus, plus = _ref218$plus === void 0 ? [] : _ref218$plus, _ref218$minus = _ref218.minus, minus = _ref218$minus === void 0 ? [] : _ref218$minus, tmp = _ref218.tmp;
14639
+ var _ref217 = {}, _ref217$plus = _ref217.plus, plus = _ref217$plus === void 0 ? [] : _ref217$plus, _ref217$minus = _ref217.minus, minus = _ref217$minus === void 0 ? [] : _ref217$minus, tmp = _ref217.tmp;
14401
14640
  selecteds.forEach(function(data7) {
14402
14641
  var selectedPending = pendings.includes(data7);
14403
14642
  tmp = selectedPending ? minus : plus;
@@ -14420,8 +14659,8 @@ var Toolbar = {
14420
14659
  };
14421
14660
  var Methods$5 = {
14422
14661
  renderColumnAnchor: function renderColumnAnchor(params, _vm) {
14423
- var _ref219 = params || {}, _ref219$anchors = _ref219.anchors, anchors = _ref219$anchors === void 0 ? [] : _ref219$anchors, _ref219$action = _ref219.action, action = _ref219$action === void 0 ? function() {
14424
- } : _ref219$action;
14662
+ var _ref218 = params || {}, _ref218$anchors = _ref218.anchors, anchors = _ref218$anchors === void 0 ? [] : _ref218$anchors, _ref218$action = _ref218.action, action = _ref218$action === void 0 ? function() {
14663
+ } : _ref218$action;
14425
14664
  var viewType2 = _vm.viewType;
14426
14665
  return h("div", {
14427
14666
  class: ["tiny-grid__column-anchor", _vm.viewCls("columnAnchor")],
@@ -14456,8 +14695,8 @@ var Methods$5 = {
14456
14695
  }, [iconVnode, spanVnode]);
14457
14696
  }));
14458
14697
  },
14459
- buildColumnAnchor: function buildColumnAnchor(_ref220) {
14460
- var property = _ref220.property, label = _ref220.label, anchors = _ref220.anchors, activeAnchor = _ref220.activeAnchor;
14698
+ buildColumnAnchor: function buildColumnAnchor(_ref219) {
14699
+ var property = _ref219.property, label = _ref219.label, anchors = _ref219.anchors, activeAnchor = _ref219.activeAnchor;
14461
14700
  var visibleColumn = this.getColumns();
14462
14701
  var column = visibleColumn.find(function(col) {
14463
14702
  return !col.type && col.property === property;
@@ -14548,8 +14787,8 @@ var Methods$5 = {
14548
14787
  }, activeAnchor.delay);
14549
14788
  };
14550
14789
  },
14551
- anchorAction: function anchorAction(_ref221) {
14552
- var field = _ref221.field, anchors = _ref221.anchors, _vm = _ref221._vm;
14790
+ anchorAction: function anchorAction(_ref220) {
14791
+ var field = _ref220.field, anchors = _ref220.anchors, _vm = _ref220._vm;
14553
14792
  var fromAnchor = anchors.find(function(anchor) {
14554
14793
  return anchor.active;
14555
14794
  });
@@ -14595,8 +14834,8 @@ var ColumnAnchor = {
14595
14834
  Object.assign(host.methods, Methods$5);
14596
14835
  }
14597
14836
  };
14598
- var createHandlerOnEnd = function createHandlerOnEnd2(_ref222) {
14599
- var _vm = _ref222._vm, refresh = _ref222.refresh;
14837
+ var createHandlerOnEnd = function createHandlerOnEnd2(_ref221) {
14838
+ var _vm = _ref221._vm, refresh = _ref221.refresh;
14600
14839
  return function(event) {
14601
14840
  var insertRecords = _vm.getInsertRecords();
14602
14841
  if (insertRecords.length) {
@@ -14608,7 +14847,7 @@ var createHandlerOnEnd = function createHandlerOnEnd2(_ref222) {
14608
14847
  var targetTrElem = event.item;
14609
14848
  var wrapperElem = targetTrElem.parentNode, prevEl = targetTrElem.previousElementSibling, nextEl = targetTrElem.nextElementSibling;
14610
14849
  var prevTrElem = prevEl && prevEl.classList.contains("tiny-grid-body__row") ? prevEl : prevEl && prevEl.previousElementSibling;
14611
- var tableTreeData = _vm.data || _vm.tableData;
14850
+ var tableTreeData = _vm.rawData || _vm.tableData;
14612
14851
  var selfRow = _vm.getRowNode(targetTrElem).item;
14613
14852
  var selfNode = findTree$1(tableTreeData, function(row2) {
14614
14853
  return row2 === selfRow;
@@ -14642,7 +14881,7 @@ var createHandlerOnEnd = function createHandlerOnEnd2(_ref222) {
14642
14881
  _vm.tableFullData = [].concat(tableTreeData);
14643
14882
  }
14644
14883
  _vm.$emit("row-drop-end", event, _vm, _vm.scrollYLoad ? tableTreeData : _vm.tableFullData);
14645
- refresh && _vm.data && _vm.refreshData(_vm.data);
14884
+ refresh && _vm.rawData && _vm.refreshData(_vm.rawData);
14646
14885
  };
14647
14886
  };
14648
14887
  var getSortColumns = function getSortColumns2(columns2) {
@@ -14665,7 +14904,7 @@ var Methods$4 = {
14665
14904
  // 处理列拖拽
14666
14905
  columnDrop: function columnDrop(headerEl) {
14667
14906
  var _this80 = this;
14668
- var _ref223 = this.dropConfig || {}, plugin = _ref223.plugin, onBeforeMove = _ref223.onBeforeMove, filter2 = _ref223.filter;
14907
+ var _ref222 = this.dropConfig || {}, plugin = _ref222.plugin, onBeforeMove = _ref222.onBeforeMove, filter2 = _ref222.filter;
14669
14908
  var columnDropContainer = headerEl.querySelector(".tiny-grid-header__row");
14670
14909
  var columnDropOptions = _extends({}, this.dropConfig, {
14671
14910
  handle: ".tiny-grid-header__column:not(.col__fixed)",
@@ -14758,8 +14997,8 @@ var Sort = {
14758
14997
  Object.assign(host.methods, Methods$3);
14759
14998
  }
14760
14999
  };
14761
- function createTooltipRange(_ref224) {
14762
- var _vm = _ref224._vm, cell = _ref224.cell, column = _ref224.column, isHeader = _ref224.isHeader;
15000
+ function createTooltipRange(_ref223) {
15001
+ var _vm = _ref223._vm, cell = _ref223.cell, column = _ref223.column, isHeader = _ref223.isHeader;
14763
15002
  var range = document.createRange();
14764
15003
  var rangeEnd;
14765
15004
  range.setStart(cell, 0);
@@ -14777,8 +15016,8 @@ function createTooltipRange(_ref224) {
14777
15016
  range.setEnd(cell, rangeEnd);
14778
15017
  return range;
14779
15018
  }
14780
- function processContentMethod(_ref225) {
14781
- var _vm = _ref225._vm, column = _ref225.column, content = _ref225.content, contentMethod = _ref225.contentMethod, event = _ref225.event, isHeader = _ref225.isHeader, row2 = _ref225.row, showTip = _ref225.showTip;
15019
+ function processContentMethod(_ref224) {
15020
+ var _vm = _ref224._vm, column = _ref224.column, content = _ref224.content, contentMethod = _ref224.contentMethod, event = _ref224.event, isHeader = _ref224.isHeader, row2 = _ref224.row, showTip = _ref224.showTip;
14782
15021
  if (contentMethod) {
14783
15022
  _vm.tooltipContent = contentMethod({
14784
15023
  event,
@@ -14930,15 +15169,15 @@ var Tooltip = {
14930
15169
  Object.assign(host.methods, Methods$2);
14931
15170
  }
14932
15171
  };
14933
- function onHalfSelectionProperty(_ref226) {
14934
- var checkStrictly = _ref226.checkStrictly, property = _ref226.property, row2 = _ref226.row, treeConfig = _ref226.treeConfig, treeIndeterminates = _ref226.treeIndeterminates, value = _ref226.value;
15172
+ function onHalfSelectionProperty(_ref225) {
15173
+ var checkStrictly = _ref225.checkStrictly, property = _ref225.property, row2 = _ref225.row, treeConfig = _ref225.treeConfig, treeIndeterminates = _ref225.treeIndeterminates, value = _ref225.value;
14935
15174
  if (property && treeConfig && !checkStrictly && value === -1) {
14936
15175
  treeIndeterminates.push(row2);
14937
15176
  set(row2, property, false);
14938
15177
  }
14939
15178
  }
14940
- function onFullSelectionProperty(_ref227) {
14941
- var checkMethod = _ref227.checkMethod, checkStrictly = _ref227.checkStrictly, property = _ref227.property, row2 = _ref227.row, treeConfig = _ref227.treeConfig, treeIndeterminates = _ref227.treeIndeterminates, value = _ref227.value;
15179
+ function onFullSelectionProperty(_ref226) {
15180
+ var checkMethod = _ref226.checkMethod, checkStrictly = _ref226.checkStrictly, property = _ref226.property, row2 = _ref226.row, treeConfig = _ref226.treeConfig, treeIndeterminates = _ref226.treeIndeterminates, value = _ref226.value;
14942
15181
  if (property && treeConfig && !checkStrictly && value !== -1) {
14943
15182
  eachTree([row2], function(item, $rowIndex) {
14944
15183
  if (row2 === item || !checkMethod || checkMethod({
@@ -14953,8 +15192,8 @@ function onFullSelectionProperty(_ref227) {
14953
15192
  }, treeConfig);
14954
15193
  }
14955
15194
  }
14956
- function getVItemsOnParentSlctProp(_ref228) {
14957
- var checkMethod = _ref228.checkMethod, matchObj = _ref228.matchObj;
15195
+ function getVItemsOnParentSlctProp(_ref227) {
15196
+ var checkMethod = _ref227.checkMethod, matchObj = _ref227.matchObj;
14958
15197
  var tinyItems;
14959
15198
  if (checkMethod) {
14960
15199
  tinyItems = matchObj.items.filter(function(item, $rowIndex) {
@@ -14968,8 +15207,8 @@ function getVItemsOnParentSlctProp(_ref228) {
14968
15207
  }
14969
15208
  return tinyItems;
14970
15209
  }
14971
- function getParentStatusOnParentSlctProp(_ref229) {
14972
- var indeterminatesItem = _ref229.indeterminatesItem, matchObj = _ref229.matchObj, property = _ref229.property, vItems = _ref229.vItems, value = _ref229.value;
15210
+ function getParentStatusOnParentSlctProp(_ref228) {
15211
+ var indeterminatesItem = _ref228.indeterminatesItem, matchObj = _ref228.matchObj, property = _ref228.property, vItems = _ref228.vItems, value = _ref228.value;
14973
15212
  var parentStatus;
14974
15213
  if (indeterminatesItem) {
14975
15214
  parentStatus = -1;
@@ -14984,8 +15223,8 @@ function getParentStatusOnParentSlctProp(_ref229) {
14984
15223
  }
14985
15224
  return parentStatus;
14986
15225
  }
14987
- function onHalfSelection(_ref230) {
14988
- var checkStrictly = _ref230.checkStrictly, property = _ref230.property, row2 = _ref230.row, selection = _ref230.selection, treeConfig = _ref230.treeConfig, treeIndeterminates = _ref230.treeIndeterminates, value = _ref230.value;
15226
+ function onHalfSelection(_ref229) {
15227
+ var checkStrictly = _ref229.checkStrictly, property = _ref229.property, row2 = _ref229.row, selection = _ref229.selection, treeConfig = _ref229.treeConfig, treeIndeterminates = _ref229.treeIndeterminates, value = _ref229.value;
14989
15228
  if (!property && treeConfig && !checkStrictly && value === -1) {
14990
15229
  treeIndeterminates.push(row2);
14991
15230
  remove(selection, function(item) {
@@ -14996,8 +15235,8 @@ function onHalfSelection(_ref230) {
14996
15235
  var addSelection = function addSelection2(selection, item) {
14997
15236
  return !selection.includes(item) && selection.push(item);
14998
15237
  };
14999
- function onFullSelection(_ref231) {
15000
- var checkMethod = _ref231.checkMethod, checkStrictly = _ref231.checkStrictly, property = _ref231.property, row2 = _ref231.row, selection = _ref231.selection, treeConfig = _ref231.treeConfig, treeIndeterminates = _ref231.treeIndeterminates, value = _ref231.value;
15238
+ function onFullSelection(_ref230) {
15239
+ var checkMethod = _ref230.checkMethod, checkStrictly = _ref230.checkStrictly, property = _ref230.property, row2 = _ref230.row, selection = _ref230.selection, treeConfig = _ref230.treeConfig, treeIndeterminates = _ref230.treeIndeterminates, value = _ref230.value;
15001
15240
  if (!property && treeConfig && !checkStrictly && value !== -1) {
15002
15241
  eachTree([row2], function(item, $rowIndex) {
15003
15242
  if (row2 === item || !checkMethod || checkMethod({
@@ -15018,8 +15257,8 @@ function onFullSelection(_ref231) {
15018
15257
  }, treeConfig);
15019
15258
  }
15020
15259
  }
15021
- function getParentStatusOnParentSelection(_ref232) {
15022
- var indeterminatesItem = _ref232.indeterminatesItem, matchObj = _ref232.matchObj, selection = _ref232.selection, vItems = _ref232.vItems, value = _ref232.value;
15260
+ function getParentStatusOnParentSelection(_ref231) {
15261
+ var indeterminatesItem = _ref231.indeterminatesItem, matchObj = _ref231.matchObj, selection = _ref231.selection, vItems = _ref231.vItems, value = _ref231.value;
15023
15262
  var parentStatus;
15024
15263
  if (indeterminatesItem) {
15025
15264
  parentStatus = -1;
@@ -15032,8 +15271,8 @@ function getParentStatusOnParentSelection(_ref232) {
15032
15271
  }
15033
15272
  return parentStatus;
15034
15273
  }
15035
- function hasCheckField(_ref233, value, _vm) {
15036
- var row2 = _ref233.row;
15274
+ function hasCheckField(_ref232, value, _vm) {
15275
+ var row2 = _ref232.row;
15037
15276
  var tableFullData = _vm.tableFullData, _vm$selectConfig = _vm.selectConfig, selectConfig = _vm$selectConfig === void 0 ? {} : _vm$selectConfig, treeConfig = _vm.treeConfig, treeIndeterminates = _vm.treeIndeterminates;
15038
15277
  var property = selectConfig.checkField, checkStrictly = selectConfig.checkStrictly, checkMethod = selectConfig.checkMethod;
15039
15278
  onHalfSelectionProperty({
@@ -15081,8 +15320,8 @@ function hasCheckField(_ref233, value, _vm) {
15081
15320
  set(row2, property, value);
15082
15321
  }
15083
15322
  }
15084
- function onSelectTreeCheckStrictly(_ref234, value, _vm) {
15085
- var row2 = _ref234.row;
15323
+ function onSelectTreeCheckStrictly(_ref233, value, _vm) {
15324
+ var row2 = _ref233.row;
15086
15325
  var selection = _vm.selection, tableFullData = _vm.tableFullData, _vm$selectConfig2 = _vm.selectConfig, selectConfig = _vm$selectConfig2 === void 0 ? {} : _vm$selectConfig2, treeConfig = _vm.treeConfig, treeIndeterminates = _vm.treeIndeterminates;
15087
15326
  var property = selectConfig.checkField, checkStrictly = selectConfig.checkStrictly, checkMethod = selectConfig.checkMethod;
15088
15327
  onHalfSelection({
@@ -15126,8 +15365,8 @@ function onSelectTreeCheckStrictly(_ref234, value, _vm) {
15126
15365
  }
15127
15366
  }
15128
15367
  }
15129
- function onSelectOther(_ref235, value, _vm) {
15130
- var row2 = _ref235.row;
15368
+ function onSelectOther(_ref234, value, _vm) {
15369
+ var row2 = _ref234.row;
15131
15370
  var selection = _vm.selection, _vm$selectConfig3 = _vm.selectConfig, selectConfig = _vm$selectConfig3 === void 0 ? {} : _vm$selectConfig3, treeConfig = _vm.treeConfig;
15132
15371
  var property = selectConfig.checkField, checkStrictly = selectConfig.checkStrictly;
15133
15372
  if (!property && !(treeConfig && !checkStrictly)) {
@@ -15140,8 +15379,8 @@ function onSelectOther(_ref235, value, _vm) {
15140
15379
  }
15141
15380
  }
15142
15381
  }
15143
- function hasNoCheckField(_ref236, value, _vm) {
15144
- var row2 = _ref236.row;
15382
+ function hasNoCheckField(_ref235, value, _vm) {
15383
+ var row2 = _ref235.row;
15145
15384
  onSelectTreeCheckStrictly({
15146
15385
  row: row2
15147
15386
  }, value, _vm);
@@ -15149,8 +15388,8 @@ function hasNoCheckField(_ref236, value, _vm) {
15149
15388
  row: row2
15150
15389
  }, value, _vm);
15151
15390
  }
15152
- function pushSelectRow(_ref237) {
15153
- var afterFullData = _ref237.afterFullData, checkMethod = _ref237.checkMethod, checkStrictly = _ref237.checkStrictly; _ref237.property; var selectRows = _ref237.selectRows, selection = _ref237.selection, treeConfig = _ref237.treeConfig, value = _ref237.value;
15391
+ function pushSelectRow(_ref236) {
15392
+ var afterFullData = _ref236.afterFullData, checkMethod = _ref236.checkMethod, checkStrictly = _ref236.checkStrictly; _ref236.property; var selectRows = _ref236.selectRows, selection = _ref236.selection, treeConfig = _ref236.treeConfig, value = _ref236.value;
15154
15393
  if (!checkStrictly && value) {
15155
15394
  eachTree(afterFullData, function(row2, $rowIndex) {
15156
15395
  if (!checkMethod || checkMethod({
@@ -15172,8 +15411,8 @@ function pushSelectRow(_ref237) {
15172
15411
  }, treeConfig);
15173
15412
  }
15174
15413
  }
15175
- function hasCheckFieldNoStrictly(_ref238) {
15176
- var afterFullData = _ref238.afterFullData, checkMethod = _ref238.checkMethod, checkStrictly = _ref238.checkStrictly, property = _ref238.property, selection = _ref238.selection, treeConfig = _ref238.treeConfig, value = _ref238.value;
15414
+ function hasCheckFieldNoStrictly(_ref237) {
15415
+ var afterFullData = _ref237.afterFullData, checkMethod = _ref237.checkMethod, checkStrictly = _ref237.checkStrictly, property = _ref237.property, selection = _ref237.selection, treeConfig = _ref237.treeConfig, value = _ref237.value;
15177
15416
  if (!checkStrictly && property) {
15178
15417
  var indexKey = (treeConfig ? "$" : "") + "rowIndex";
15179
15418
  var setValFn = function setValFn2(row2, rowIndex) {
@@ -15199,8 +15438,8 @@ function hasCheckFieldNoStrictly(_ref238) {
15199
15438
  }
15200
15439
  }
15201
15440
  }
15202
- function filterSelectRow(_ref239) {
15203
- var afterFullData = _ref239.afterFullData, checkMethod = _ref239.checkMethod, checkStrictly = _ref239.checkStrictly, selectRows = _ref239.selectRows, selection = _ref239.selection, value = _ref239.value;
15441
+ function filterSelectRow(_ref238) {
15442
+ var afterFullData = _ref238.afterFullData, checkMethod = _ref238.checkMethod, checkStrictly = _ref238.checkStrictly, selectRows = _ref238.selectRows, selection = _ref238.selection, value = _ref238.value;
15204
15443
  if (!checkStrictly && value && checkMethod) {
15205
15444
  selectRows = afterFullData.filter(function(row2, rowIndex) {
15206
15445
  return selection.includes(row2) || checkMethod({
@@ -15222,8 +15461,8 @@ function filterSelectRow(_ref239) {
15222
15461
  }
15223
15462
  return selectRows;
15224
15463
  }
15225
- function hasNoCheckFieldNoStrictly(_ref240) {
15226
- var afterFullData = _ref240.afterFullData, checkMethod = _ref240.checkMethod, checkStrictly = _ref240.checkStrictly, property = _ref240.property, selection = _ref240.selection, treeConfig = _ref240.treeConfig, value = _ref240.value;
15464
+ function hasNoCheckFieldNoStrictly(_ref239) {
15465
+ var afterFullData = _ref239.afterFullData, checkMethod = _ref239.checkMethod, checkStrictly = _ref239.checkStrictly, property = _ref239.property, selection = _ref239.selection, treeConfig = _ref239.treeConfig, value = _ref239.value;
15227
15466
  var selectRows = [];
15228
15467
  if (treeConfig) {
15229
15468
  pushSelectRow({
@@ -15248,8 +15487,8 @@ function hasNoCheckFieldNoStrictly(_ref240) {
15248
15487
  }
15249
15488
  return selectRows;
15250
15489
  }
15251
- function setSelectionNoStrictly(_ref241) {
15252
- var _vm = _ref241._vm, checkStrictly = _ref241.checkStrictly, reserve = _ref241.reserve, selectRows = _ref241.selectRows, selection = _ref241.selection, value = _ref241.value, afterFullData = _ref241.afterFullData;
15490
+ function setSelectionNoStrictly(_ref240) {
15491
+ var _vm = _ref240._vm, checkStrictly = _ref240.checkStrictly, reserve = _ref240.reserve, selectRows = _ref240.selectRows, selection = _ref240.selection, value = _ref240.value, afterFullData = _ref240.afterFullData;
15253
15492
  if (!checkStrictly) {
15254
15493
  if (reserve) {
15255
15494
  var unCheckedRows = afterFullData.filter(function(row2) {
@@ -15269,7 +15508,7 @@ var Methods$1 = {
15269
15508
  // 处理默认勾选
15270
15509
  handleSelectionDefChecked: function handleSelectionDefChecked() {
15271
15510
  var fullDataRowIdData = this.fullDataRowIdData;
15272
- var _ref242 = this.selectConfig || {}, checkAll = _ref242.checkAll, checkRowKeys = _ref242.checkRowKeys;
15511
+ var _ref241 = this.selectConfig || {}, checkAll = _ref241.checkAll, checkRowKeys = _ref241.checkRowKeys;
15273
15512
  if (checkAll) {
15274
15513
  this.setAllSelection(true);
15275
15514
  return;
@@ -15303,8 +15542,8 @@ var Methods$1 = {
15303
15542
  return this.$nextTick();
15304
15543
  },
15305
15544
  // 多选,行选中事件。value:选中true、不选false、不确定-1
15306
- handleSelectRow: function handleSelectRow(_ref243, value) {
15307
- var row2 = _ref243.row;
15545
+ handleSelectRow: function handleSelectRow(_ref242, value) {
15546
+ var row2 = _ref242.row;
15308
15547
  hasCheckField({
15309
15548
  row: row2
15310
15549
  }, value, this);
@@ -15315,7 +15554,7 @@ var Methods$1 = {
15315
15554
  },
15316
15555
  handleToggleCheckRowEvent: function handleToggleCheckRowEvent(params, event) {
15317
15556
  var selection = this.selection;
15318
- var _ref244 = this.selectConfig || {}, checkField = _ref244.checkField;
15557
+ var _ref243 = this.selectConfig || {}, checkField = _ref243.checkField;
15319
15558
  var row2 = params.row;
15320
15559
  var value = checkField ? !get(row2, checkField) : !~selection.indexOf(row2);
15321
15560
  if (event) {
@@ -15383,8 +15622,8 @@ var Methods$1 = {
15383
15622
  // 根据表格选中状态,给头部复现框赋值状态(全选,半选,未选)
15384
15623
  checkSelectionStatus: function checkSelectionStatus() {
15385
15624
  var afterFullData = this.afterFullData, selection = this.selection, treeIndeterminates = this.treeIndeterminates;
15386
- var _ref245 = this.selectConfig || {}, checkField = _ref245.checkField, checkMethod = _ref245.checkMethod;
15387
- var _ref246 = {}, everyHandler = _ref246.everyHandler, someHandler = _ref246.someHandler;
15625
+ var _ref244 = this.selectConfig || {}, checkField = _ref244.checkField, checkMethod = _ref244.checkMethod;
15626
+ var _ref245 = {}, everyHandler = _ref245.everyHandler, someHandler = _ref245.someHandler;
15388
15627
  if (checkField) {
15389
15628
  everyHandler = checkMethod ? function(row2, rowIndex) {
15390
15629
  return !checkMethod({
@@ -15433,7 +15672,7 @@ var Methods$1 = {
15433
15672
  // 保留选中状态
15434
15673
  reserveCheckSelection: function reserveCheckSelection() {
15435
15674
  var fullDataRowIdData = this.fullDataRowIdData, selection = this.selection;
15436
- var _ref247 = this.selectConfig || {}, reserve = _ref247.reserve;
15675
+ var _ref246 = this.selectConfig || {}, reserve = _ref246.reserve;
15437
15676
  var rowkey = getRowkey(this);
15438
15677
  if (reserve && selection.length) {
15439
15678
  this.selection = selection.map(function(row2) {
@@ -15461,7 +15700,7 @@ var Methods$1 = {
15461
15700
  },
15462
15701
  clearSelection: function clearSelection() {
15463
15702
  var tableFullData = this.tableFullData, treeConfig = this.treeConfig;
15464
- var _ref248 = this.selectConfig || {}, checkField = _ref248.checkField;
15703
+ var _ref247 = this.selectConfig || {}, checkField = _ref247.checkField;
15465
15704
  if (checkField) {
15466
15705
  treeConfig ? eachTree(tableFullData, function(item) {
15467
15706
  return set(item, checkField, false);
@@ -15587,9 +15826,9 @@ var Checkbox = {
15587
15826
  };
15588
15827
  var Methods = {
15589
15828
  // 展开树节点事件
15590
- triggerTreeExpandEvent: function triggerTreeExpandEvent(event, _ref249) {
15829
+ triggerTreeExpandEvent: function triggerTreeExpandEvent(event, _ref248) {
15591
15830
  var _this83 = this;
15592
- var row2 = _ref249.row;
15831
+ var row2 = _ref248.row;
15593
15832
  var currentColumn = this.currentColumn, currentRow = this.currentRow;
15594
15833
  var rest = this.toggleTreeExpansion(row2);
15595
15834
  var eventParams = {