@opentinyvue/vue-grid 2.26.0 → 2.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 { throttle, addClass, removeClass, debounce, PopupManager, PopperJS, extend, browserInfo, isObject, isEmptyObject, isServer, getDataset, random, isNull, getActualTarget, fastdom, toDecimal, logger, tryToCurrency, tryToDecimal, tryToInt, toFileSize, truncate, toRate, isNumber as isNumber$1, toBoolValue, on, toDate, getDateWithNewTimezone, isDate, formatDateByPattern, toDateStr, off, Validator as Validator$1, getObj, getStyle, preventDefault, 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 { emitEvent, getOffsetPos, getFuncText, getDomNode, getRowid, getEventTargetNode, isScale, hasChildrenList, getListeners, updateCellTitle, getFilters, getColumnConfig, formatText, getRowkey, dfsCopy, getRowUniqueId, setCellValue, getColumnList, repairFixed, rowToVisible, colToVisible, getCell, assemColumn, GlobalEvent, getCellValue, getClass, isPx, 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 { emitEvent, getOffsetPos, getFuncText, getDomNode, getRowid, getEventTargetNode, isScale, hasChildrenList, getListeners, updateCellTitle, getFilters, getColumnConfig, formatText, getRowkey, getRowUniqueId, setCellValue, getColumnList, repairFixed, rowToVisible, colToVisible, getCell, assemColumn, GlobalEvent, getCellValue, getClass, isPx, getRowNodes, getCellNodeIndex } from '@opentinyvue/vue-renderless/grid/utils';
9
9
  import Tooltip$1 from '@opentinyvue/vue-tooltip';
10
10
  import { toNumber, findTree, find, isEqual as isEqual$1, arrayEach as arrayEach$1 } from '@opentinyvue/vue-renderless/grid/static';
11
11
  import { AutoTip } from '@opentinyvue/vue-directive';
@@ -263,6 +263,7 @@ function _extends() {
263
263
  var GlobalConfig$1 = {
264
264
  validConfig: {
265
265
  message: "tooltip",
266
+ highlightError: false,
266
267
  icon: iconError()
267
268
  },
268
269
  editConfig: {
@@ -1832,7 +1833,7 @@ var useData = function useData2(props) {
1832
1833
  }], function(_ref15) {
1833
1834
  _ref15[0]; var length = _ref15[1];
1834
1835
  tiledLength.value = length;
1835
- $table == null ? void 0 : $table.handleDataChange();
1836
+ $table.updateRawData(props.data);
1836
1837
  });
1837
1838
  return {
1838
1839
  tiledLength
@@ -1855,7 +1856,7 @@ var calcHeader = function calcHeader2(collectColumn2) {
1855
1856
  levelMap.set(item, level);
1856
1857
  _traverseTree(item.children, level + 1, item);
1857
1858
  });
1858
- } else {
1859
+ } else if (parent) {
1859
1860
  leafColumns.push(parent);
1860
1861
  }
1861
1862
  };
@@ -1941,12 +1942,12 @@ var useHeader = function useHeader2(props, bodyVm, headerRowHeight) {
1941
1942
  };
1942
1943
  };
1943
1944
  var getEventSource = function getEventSource2(e, $table) {
1944
- var _tableEl$dataset, _$table$getColumnNode, _rowEl$dataset, _rowEl$dataset$rowid;
1945
+ var _tableEl$dataset, _$table$getColumnNode, _rowEl$dataset, _rowid;
1945
1946
  var target = e.target;
1946
1947
  var tableEl = target.closest(".tiny-grid__body");
1947
1948
  if (((_tableEl$dataset = tableEl.dataset) == null ? void 0 : _tableEl$dataset.tableid) !== String($table.id)) return;
1948
1949
  var cellEl = target.closest(".tiny-grid-header__column");
1949
- var rowEl, part, rowType, row2, column;
1950
+ var rowEl, part, rowType, row2, column, rowid2;
1950
1951
  if (cellEl) {
1951
1952
  rowEl = cellEl.parentNode;
1952
1953
  part = "header";
@@ -1959,12 +1960,17 @@ var getEventSource = function getEventSource2(e, $table) {
1959
1960
  }
1960
1961
  if (!part || !cellEl || !rowEl) return;
1961
1962
  column = (_$table$getColumnNode = $table.getColumnNode(cellEl)) == null ? void 0 : _$table$getColumnNode.item;
1962
- if ((_rowEl$dataset = rowEl.dataset) != null && (_rowEl$dataset$rowid = _rowEl$dataset.rowid) != null && _rowEl$dataset$rowid.startsWith("row_g_")) {
1963
+ rowid2 = (_rowEl$dataset = rowEl.dataset) == null ? void 0 : _rowEl$dataset.rowid;
1964
+ if ((_rowid = rowid2) != null && _rowid.startsWith("row_g_")) {
1963
1965
  rowType = "virtual";
1964
1966
  } else if (part === "body") {
1965
- var _$table$getRowNode;
1966
1967
  rowType = "normal";
1967
- row2 = (_$table$getRowNode = $table.getRowNode(rowEl)) == null ? void 0 : _$table$getRowNode.item;
1968
+ if ($table.editStore.insertMap.has(rowid2)) {
1969
+ row2 = $table.editStore.insertMap.get(rowid2);
1970
+ } else {
1971
+ var _$table$getRowNode;
1972
+ row2 = (_$table$getRowNode = $table.getRowNode(rowEl)) == null ? void 0 : _$table$getRowNode.item;
1973
+ }
1968
1974
  }
1969
1975
  return {
1970
1976
  part,
@@ -2035,6 +2041,38 @@ var getEventParams = function getEventParams2(_ref17, $table) {
2035
2041
  var isOperateMouse = function isOperateMouse2($table) {
2036
2042
  return $table._isResize || $table.lastScrollTime && Date.now() < $table.lastScrollTime + $table.optimizeOpts.delayHover;
2037
2043
  };
2044
+ var hideAlignLines = function hideAlignLines2($table, cell) {
2045
+ var _$table$mouseConfig;
2046
+ if (!((_$table$mouseConfig = $table.mouseConfig) != null && _$table$mouseConfig.hover) || cell) {
2047
+ return;
2048
+ }
2049
+ var xBar = $table.elemStore["main-body-alignXBar"];
2050
+ var yBar = $table.elemStore["main-body-alignYBar"];
2051
+ if (xBar) {
2052
+ xBar.style.display = "none";
2053
+ }
2054
+ if (yBar) {
2055
+ yBar.style.display = "none";
2056
+ }
2057
+ };
2058
+ var showAlignLines = function showAlignLines2($table, cell) {
2059
+ var _$table$mouseConfig2;
2060
+ if (!((_$table$mouseConfig2 = $table.mouseConfig) != null && _$table$mouseConfig2.hover)) {
2061
+ return;
2062
+ }
2063
+ var xBar = $table.elemStore["main-body-alignXBar"];
2064
+ var yBar = $table.elemStore["main-body-alignYBar"];
2065
+ if (xBar) {
2066
+ xBar.style.display = "block";
2067
+ xBar.style.top = cell.offsetTop - 1 + "px";
2068
+ xBar.style.setProperty("--after-top-offset", cell.offsetHeight + "px");
2069
+ }
2070
+ if (yBar) {
2071
+ yBar.style.display = "block";
2072
+ yBar.style.left = cell.offsetLeft - 1 + "px";
2073
+ yBar.style.setProperty("--after-left-offset", cell.offsetWidth + "px");
2074
+ }
2075
+ };
2038
2076
  var useCellEvent = function useCellEvent2(_ref21) {
2039
2077
  var table = _ref21.table, $table = _ref21.$table;
2040
2078
  var isBound = false;
@@ -2082,7 +2120,7 @@ var useCellEvent = function useCellEvent2(_ref21) {
2082
2120
  var source = getEventSource(e, $table);
2083
2121
  if (source) {
2084
2122
  var params = getEventParams(source, $table);
2085
- var _$table$mouseConfig = $table.mouseConfig, mouseConfig = _$table$mouseConfig === void 0 ? {} : _$table$mouseConfig;
2123
+ var _$table$mouseConfig3 = $table.mouseConfig, mouseConfig = _$table$mouseConfig3 === void 0 ? {} : _$table$mouseConfig3;
2086
2124
  if (source.part === "header" && mouseConfig.checked) {
2087
2125
  $table.triggerHeaderCellMousedownEvent(e, params);
2088
2126
  }
@@ -2100,7 +2138,7 @@ var useCellEvent = function useCellEvent2(_ref21) {
2100
2138
  var satisfy = function satisfy2(equal, trigger2) {
2101
2139
  return trigger2 === "row" || equal(column) && trigger2 === "cell";
2102
2140
  };
2103
- 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;
2141
+ 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;
2104
2142
  if (source.part === "header" && (highlightCurrentColumn || tableListeners["header-cell-click"] || mouseConfig.checked || sortOpts2.trigger === "cell")) {
2105
2143
  $table.triggerHeaderCellClickEvent(e, params);
2106
2144
  }
@@ -2232,6 +2270,7 @@ var useCellEvent = function useCellEvent2(_ref21) {
2232
2270
  if (tableListeners["cell-mouseleave"]) {
2233
2271
  emitEvent($table, "cell-mouseleave", [params, e]);
2234
2272
  }
2273
+ hideAlignLines($table, curCell);
2235
2274
  }
2236
2275
  }
2237
2276
  if (curCell) {
@@ -2241,6 +2280,7 @@ var useCellEvent = function useCellEvent2(_ref21) {
2241
2280
  if (tableListeners["cell-mouseenter"]) {
2242
2281
  emitEvent($table, "cell-mouseenter", [_params, _e]);
2243
2282
  }
2283
+ showAlignLines($table, curCell);
2244
2284
  }
2245
2285
  }
2246
2286
  });
@@ -2509,6 +2549,69 @@ var adjustColspan = function adjustColspan2(table, pos, isLeft) {
2509
2549
  }
2510
2550
  }
2511
2551
  };
2552
+ var useNormalData = function useNormalData2(_ref34) {
2553
+ var _hooks$getCurrentInst4;
2554
+ var props = _ref34.props, tableFullColumn = _ref34.tableFullColumn;
2555
+ var $table = (_hooks$getCurrentInst4 = hooks.getCurrentInstance()) == null ? void 0 : _hooks$getCurrentInst4.proxy;
2556
+ var rawData = hooks.ref([]);
2557
+ var rawDataVersion = hooks.ref(0);
2558
+ var editorColumns = hooks.ref([]);
2559
+ var editorColumnKey = hooks.ref("");
2560
+ hooks.watch(tableFullColumn, function(_tableFullColumn) {
2561
+ var columns2 = [];
2562
+ var columnKeys = [];
2563
+ for (var i = 0; i < _tableFullColumn.length; i++) {
2564
+ var column = _tableFullColumn[i];
2565
+ if (column.property && column.editor) {
2566
+ columns2.push(column);
2567
+ columnKeys.push(column.propety);
2568
+ }
2569
+ }
2570
+ var keyString = columnKeys.sort().join();
2571
+ if (editorColumnKey.value !== keyString) {
2572
+ editorColumnKey.value = keyString;
2573
+ editorColumns.value = columns2;
2574
+ }
2575
+ });
2576
+ hooks.watch(editorColumns, function(_editorColumns) {
2577
+ if (props.editConfig && _editorColumns.length > 0) {
2578
+ var _insertData = $table.editStore.insertList || [];
2579
+ var _rawData = rawData.value || [];
2580
+ var _data = [].concat(_insertData, _rawData);
2581
+ if (Array.isArray(_data)) {
2582
+ _data.forEach(function(row2) {
2583
+ return $table.defineField(row2, false, _editorColumns, true);
2584
+ });
2585
+ }
2586
+ }
2587
+ });
2588
+ hooks.watch(rawData, function(_rawData) {
2589
+ var _editorColumns = editorColumns.value;
2590
+ if (props.editConfig && _editorColumns.length > 0) {
2591
+ var _data = _rawData || [];
2592
+ if (Array.isArray(_data)) {
2593
+ _data.forEach(function(row2) {
2594
+ return $table.defineField(row2, false, _editorColumns);
2595
+ });
2596
+ }
2597
+ }
2598
+ rawDataVersion.value += 1;
2599
+ });
2600
+ hooks.watch(rawDataVersion, function() {
2601
+ var optimizeOpts = $table.optimizeOpts;
2602
+ var scrollY = optimizeOpts.scrollY;
2603
+ var _rawData = rawData.value || [];
2604
+ var tableFullData = Array.isArray(_rawData) ? _rawData.slice(0) : [];
2605
+ $table.tableFullData = tableFullData;
2606
+ $table.scrollYLoad = scrollY && scrollY.gt > 0 && scrollY.gt <= tableFullData.length;
2607
+ $table.updateCache(true, props.saveSource === "deep");
2608
+ $table.handleDataChange();
2609
+ });
2610
+ return {
2611
+ rawData,
2612
+ rawDataVersion
2613
+ };
2614
+ };
2512
2615
  var toRaw = hooks.toRaw;
2513
2616
  var VIRTUAL_ROW_KEY = "_$virtual_";
2514
2617
  var difference$1 = function difference$12(arr, other) {
@@ -2608,7 +2711,7 @@ var orderingGroupBy = function orderingGroupBy2(arr, key, equals, active, rowKey
2608
2711
  };
2609
2712
  var buildRowGroupFullData = function buildRowGroupFullData2(fullData, _vm) {
2610
2713
  var treeConfig = _vm.treeConfig, rowGroup = _vm.rowGroup;
2611
- var _ref34 = rowGroup || {}, field = _ref34.field, equals = _ref34.equals, activeMethod = _ref34.activeMethod;
2714
+ var _ref35 = rowGroup || {}, field = _ref35.field, equals = _ref35.equals, activeMethod = _ref35.activeMethod;
2612
2715
  _vm.hasVirtualRow = !treeConfig && rowGroup && field && fullData.length > 0;
2613
2716
  if (_vm.hasVirtualRow) {
2614
2717
  _vm.groupFullData = orderingGroupBy(fullData, field, equals || isEqual$1, activeMethod, getRowkey(_vm));
@@ -2632,14 +2735,14 @@ var handleRowGroupFold = function handleRowGroupFold2(row2, _vm) {
2632
2735
  buildRenderGraph(_vm);
2633
2736
  _vm.handleTableData().then(_vm.recalculate);
2634
2737
  };
2635
- var getFixedStyle = function getFixedStyle2(_ref35, _ref36) {
2636
- var fixedDetails = _ref35.fixedDetails;
2637
- var overflowX = _ref36.overflowX;
2738
+ var getFixedStyle = function getFixedStyle2(_ref36, _ref37) {
2739
+ var fixedDetails = _ref36.fixedDetails;
2740
+ var overflowX = _ref37.overflowX;
2638
2741
  return fixedDetails && overflowX ? fixedDetails.getStyle() : {};
2639
2742
  };
2640
- var getFixedClass = function getFixedClass2(_ref37, _ref38) {
2641
- var fixedDetails = _ref37.fixedDetails;
2642
- var overflowX = _ref38.overflowX;
2743
+ var getFixedClass = function getFixedClass2(_ref38, _ref39) {
2744
+ var fixedDetails = _ref38.fixedDetails;
2745
+ var overflowX = _ref39.overflowX;
2643
2746
  return _extends({
2644
2747
  "fixed__column": fixedDetails && overflowX
2645
2748
  }, fixedDetails && overflowX ? fixedDetails.getClass() : {});
@@ -2766,22 +2869,22 @@ var renderBorder = function renderBorder2(type) {
2766
2869
  "class": "tiny-grid-border-left"
2767
2870
  })]);
2768
2871
  };
2769
- function renderColumn(_ref39) {
2770
- var _normalRows$rowid, _ref41;
2771
- 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;
2872
+ function renderColumn(_ref40) {
2873
+ var _normalRows$rowid, _ref42;
2874
+ 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;
2772
2875
  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;
2773
2876
  var height2 = $table.height, rowId = $table.rowId, scrollXLoad = $table.scrollXLoad, scrollYLoad = $table.scrollYLoad, validOpts2 = $table.validOpts, validStore = $table.validStore, validatedMap = $table.validatedMap;
2774
2877
  var normalRows = _vm.normalRows;
2775
- var _ref40 = ((_normalRows$rowid = normalRows[rowid2]) == null ? void 0 : _normalRows$rowid[column.id]) || {}, _ref40$attrs = _ref40.attrs, attrs = _ref40$attrs === void 0 ? {
2878
+ var _ref41 = ((_normalRows$rowid = normalRows[rowid2]) == null ? void 0 : _normalRows$rowid[column.id]) || {}, _ref41$attrs = _ref41.attrs, attrs = _ref41$attrs === void 0 ? {
2776
2879
  rowspan: 1,
2777
2880
  colspan: 1,
2778
2881
  visible: true
2779
- } : _ref40$attrs, _ref40$params = _ref40.params, params = _ref40$params === void 0 ? {
2882
+ } : _ref41$attrs, _ref41$params = _ref41.params, params = _ref41$params === void 0 ? {
2780
2883
  $table,
2781
2884
  row: row2,
2782
2885
  column
2783
- } : _ref40$params;
2784
- var isMessageDefault = validOpts2.isMessageDefault, isMessageInline = validOpts2.isMessageInline;
2886
+ } : _ref41$params;
2887
+ var isMessageDefault = validOpts2.isMessageDefault, isMessageInline = validOpts2.isMessageInline, highlightError = validOpts2.highlightError;
2785
2888
  var actived = editStore.actived;
2786
2889
  var validated = validatedMap[column.id + "-" + row2[rowId]];
2787
2890
  var validError = validStore.row === row2 && validStore.column === column;
@@ -2810,7 +2913,7 @@ function renderColumn(_ref39) {
2810
2913
  "rowspan": attrs.rowspan > 1 ? attrs.rowspan : void 0,
2811
2914
  "colspan": attrs.colspan > 1 ? attrs.colspan : void 0
2812
2915
  },
2813
- "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 || ""]
2916
+ "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 || ""]
2814
2917
  }, [[
2815
2918
  // 行拖拽手柄
2816
2919
  dropConfig.rowHandle === "index" && column.type === "index" ? h("div", {
@@ -2847,7 +2950,7 @@ function renderHeaderRows(_vm) {
2847
2950
  var $table = _vm.$parent, headerTable = _vm.headerTable;
2848
2951
  var headerCellClassName = $table.headerCellClassName, headerRowClassName = $table.headerRowClassName, headerSuffixIconAbsolute = $table.headerSuffixIconAbsolute;
2849
2952
  var allAlign = $table.align, border = $table.border, allHeaderAlign = $table.headerAlign, resizable = $table.resizable;
2850
- 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;
2953
+ 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;
2851
2954
  return headerTable.map(function(cols, $rowIndex) {
2852
2955
  return h("tr", {
2853
2956
  "attrs": {
@@ -2857,9 +2960,9 @@ function renderHeaderRows(_vm) {
2857
2960
  $table,
2858
2961
  $rowIndex
2859
2962
  }) : headerRowClassName : ""]
2860
- }, [cols.map(function(_ref42, $columnIndex) {
2861
- var _column$children, _ref43;
2862
- var id3 = _ref42.id, column = _ref42.column, colspan = _ref42.colspan, rowspan = _ref42.rowspan, height2 = _ref42.height, top = _ref42.top;
2963
+ }, [cols.map(function(_ref43, $columnIndex) {
2964
+ var _column$children, _ref44;
2965
+ var id3 = _ref43.id, column = _ref43.column, colspan = _ref43.colspan, rowspan = _ref43.rowspan, height2 = _ref43.height, top = _ref43.top;
2863
2966
  var isColGroup = (_column$children = column.children) == null ? void 0 : _column$children.length;
2864
2967
  var headerAlign = column.headerAlign, align = column.align, headerClassName = column.headerClassName;
2865
2968
  var _getConfigOverflow3 = getConfigOverflow(column, $table), headerTip = _getConfigOverflow3.headerTip, headerOverflowTitle = _getConfigOverflow3.headerOverflowTitle, headerOverflowTooltip = _getConfigOverflow3.headerOverflowTooltip, headerOverflowEllipsis = _getConfigOverflow3.headerOverflowEllipsis, headerOverflowHint = _getConfigOverflow3.headerOverflowHint;
@@ -2890,7 +2993,7 @@ function renderHeaderRows(_vm) {
2890
2993
  top: top + "px",
2891
2994
  zIndex: column.fixed ? 20 : 10
2892
2995
  }],
2893
- "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)]
2996
+ "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)]
2894
2997
  }, [[
2895
2998
  !isColGroup && !(isBoolean(column.resizable) ? column.resizable : resizable) && column.type !== "index" ? h("div", {
2896
2999
  "class": {
@@ -2946,20 +3049,20 @@ function renderFooterRows(_vm) {
2946
3049
  $table,
2947
3050
  $rowIndex
2948
3051
  }) : footerRowClassName : ""]
2949
- }, [columnPool.map(function(_ref44, $columnIndex) {
2950
- var _footerRows$$rowIndex, _ref46;
2951
- var id3 = _ref44.id, column = _ref44.item, used = _ref44.used;
3052
+ }, [columnPool.map(function(_ref45, $columnIndex) {
3053
+ var _footerRows$$rowIndex, _ref47;
3054
+ var id3 = _ref45.id, column = _ref45.item, used = _ref45.used;
2952
3055
  var footerAlign = column.footerAlign, align = column.align, footerClassName = column.footerClassName;
2953
3056
  var ftAlign = footerAlign || align || allFooterAlign || allAlign;
2954
3057
  var _getConfigOverflow4 = getConfigOverflow(column, $table), cellOverflowHint = _getConfigOverflow4.cellOverflowHint;
2955
- var _ref45 = ((_footerRows$$rowIndex = footerRows[$rowIndex]) == null ? void 0 : _footerRows$$rowIndex[column.id]) || {}, _ref45$attrs = _ref45.attrs, attrs = _ref45$attrs === void 0 ? {
3058
+ var _ref46 = ((_footerRows$$rowIndex = footerRows[$rowIndex]) == null ? void 0 : _footerRows$$rowIndex[column.id]) || {}, _ref46$attrs = _ref46.attrs, attrs = _ref46$attrs === void 0 ? {
2956
3059
  rowspan: 1,
2957
3060
  colspan: 1,
2958
3061
  visible: true
2959
- } : _ref45$attrs, _ref45$params = _ref45.params, params = _ref45$params === void 0 ? {
3062
+ } : _ref46$attrs, _ref46$params = _ref46.params, params = _ref46$params === void 0 ? {
2960
3063
  $table,
2961
3064
  column
2962
- } : _ref45$params;
3065
+ } : _ref46$params;
2963
3066
  var rowspan = (attrs == null ? void 0 : attrs.rowspan) || 1;
2964
3067
  var tdBottom = trBottom - (rowspan > 1 ? (rowspan - 1) * rowHeight : 0);
2965
3068
  params.$columnIndex = $columnIndex;
@@ -2976,7 +3079,7 @@ function renderFooterRows(_vm) {
2976
3079
  zIndex: column.fixed ? 20 : 10,
2977
3080
  display: used && attrs.visible ? void 0 : "none"
2978
3081
  }],
2979
- "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 || ""]
3082
+ "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 || ""]
2980
3083
  }, [h("div", {
2981
3084
  "class": {
2982
3085
  "tiny-grid-cell": true,
@@ -2993,17 +3096,13 @@ function renderRows(_vm) {
2993
3096
  var expandMethod = expandConfig.activeMethod;
2994
3097
  var startIndex = scrollYStore.startIndex;
2995
3098
  var isOrdered = treeConfig ? !!treeOrdered : false;
2996
- var _ref47 = treeConfig || {}, hideMethod = _ref47.hideMethod;
3099
+ var _ref48 = treeConfig || {}, hideMethod = _ref48.hideMethod;
2997
3100
  var actived = editStore.actived;
2998
3101
  var rows = [];
2999
3102
  var seqCount = {
3000
3103
  value: 0
3001
3104
  };
3002
3105
  var $seq = "";
3003
- var lastVisibleIndex = rowPool.findLastIndex(function(_ref48) {
3004
- var used = _ref48.used;
3005
- return Boolean(used);
3006
- });
3007
3106
  rowPool.forEach(function(_ref49, $rowIndex) {
3008
3107
  var id3 = _ref49.id, _ref49$item = _ref49.item, row2 = _ref49$item.payload, rowLevel = _ref49$item.level, used = _ref49.used;
3009
3108
  var rowActived = editConfig && actived.row === row2;
@@ -3042,8 +3141,7 @@ function renderRows(_vm) {
3042
3141
  isSkipRowRender,
3043
3142
  row: row2,
3044
3143
  rowActived,
3045
- rowClassName,
3046
- lastVisibleIndex
3144
+ rowClassName
3047
3145
  };
3048
3146
  Object.assign(args, {
3049
3147
  rowIndex,
@@ -3142,7 +3240,7 @@ function renderRowAfter(_ref50) {
3142
3240
  function renderRow(args) {
3143
3241
  var _ref51;
3144
3242
  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;
3145
- 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;
3243
+ 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;
3146
3244
  if (isSkipRowRender) {
3147
3245
  return;
3148
3246
  }
@@ -3166,7 +3264,7 @@ function renderRow(args) {
3166
3264
  "style": {
3167
3265
  display: used ? void 0 : "none"
3168
3266
  },
3169
- "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({
3267
+ "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({
3170
3268
  $table,
3171
3269
  $seq,
3172
3270
  seq,
@@ -3405,9 +3503,9 @@ var Body = defineComponent({
3405
3503
  footerData: Array
3406
3504
  },
3407
3505
  setup: function setup3(props, _ref57) {
3408
- var _hooks$getCurrentInst4;
3506
+ var _hooks$getCurrentInst5;
3409
3507
  var slots = _ref57.slots;
3410
- var vm = (_hooks$getCurrentInst4 = hooks.getCurrentInstance()) == null ? void 0 : _hooks$getCurrentInst4.proxy;
3508
+ var vm = (_hooks$getCurrentInst5 = hooks.getCurrentInstance()) == null ? void 0 : _hooks$getCurrentInst5.proxy;
3411
3509
  var $table = vm == null ? void 0 : vm.$parent;
3412
3510
  var rowHeight = hooks.computed(function() {
3413
3511
  return $table.rowHeight;
@@ -3427,6 +3525,8 @@ var Body = defineComponent({
3427
3525
  var thead = hooks.ref();
3428
3526
  var tbody = hooks.ref();
3429
3527
  var ySpace = hooks.ref();
3528
+ var alignXBar = hooks.ref();
3529
+ var alignYBar = hooks.ref();
3430
3530
  hooks.watch(wrapperScrollLeft, function(wrapperScrollLeft2) {
3431
3531
  var el = stickyWrapper.value;
3432
3532
  if (!el) return;
@@ -3452,13 +3552,15 @@ var Body = defineComponent({
3452
3552
  $table
3453
3553
  });
3454
3554
  var _useCellSpan = useCellSpan(vm, props), normalRows = _useCellSpan.normalRows, footerRows = _useCellSpan.footerRows;
3455
- hooks.watch([body, table, thead, tbody, ySpace], function() {
3555
+ hooks.watch([body, table, thead, tbody, ySpace, alignXBar, alignYBar], function() {
3456
3556
  var elemStore = $table.elemStore;
3457
3557
  elemStore["main-body-wrapper"] = body.value;
3458
3558
  elemStore["main-body-table"] = table.value;
3459
3559
  elemStore["main-body-headerList"] = thead.value;
3460
3560
  elemStore["main-body-list"] = tbody.value;
3461
3561
  elemStore["main-body-ySpace"] = ySpace.value;
3562
+ elemStore["main-body-alignXBar"] = alignXBar.value;
3563
+ elemStore["main-body-alignYBar"] = alignYBar.value;
3462
3564
  });
3463
3565
  var bodyClientWidth = hooks.ref(0);
3464
3566
  var resizeObserver = new ResizeObserver(function(entries) {
@@ -3533,6 +3635,8 @@ var Body = defineComponent({
3533
3635
  thead,
3534
3636
  tbody,
3535
3637
  ySpace,
3638
+ alignXBar,
3639
+ alignYBar,
3536
3640
  normalRows,
3537
3641
  footerRows,
3538
3642
  resetStickyWrapperScrollPos
@@ -3559,6 +3663,19 @@ var Body = defineComponent({
3559
3663
  maxHeight: bodyWrapperMaxHeight ? bodyWrapperMaxHeight + "px" : void 0
3560
3664
  }
3561
3665
  }, [[
3666
+ mouseConfig != null && mouseConfig.hover ? [h2("div", {
3667
+ "ref": "alignYBar",
3668
+ "class": "tiny-grid-body__hover-align-y-bar",
3669
+ "style": {
3670
+ height: containerScrollHeight + "px"
3671
+ }
3672
+ }), h2("div", {
3673
+ "ref": "alignXBar",
3674
+ "class": "tiny-grid-body__hover-align-x-bar",
3675
+ "style": {
3676
+ width: containerScrollWidth + "px"
3677
+ }
3678
+ })] : null,
3562
3679
  h2("div", {
3563
3680
  "class": "tiny-grid-body__x-space",
3564
3681
  "style": {
@@ -7560,19 +7677,26 @@ var Methods$d = {
7560
7677
  clearAll: function clearAll(silent) {
7561
7678
  var _this$$grid$fetchOpti = this.$grid.fetchOption, fetchOption = _this$$grid$fetchOpti === void 0 ? {} : _this$$grid$fetchOpti;
7562
7679
  var isReloadFilter = fetchOption.isReloadFilter, _fetchOption$isReload = fetchOption.isReloadScroll, isReloadScroll = _fetchOption$isReload === void 0 ? false : _fetchOption$isReload;
7563
- var functionNames = ["clearScroll", "clearSort", "clearCurrentRow", "clearCurrentColumn", "clearSelection", "clearRowExpand", "clearTreeExpand"];
7564
- if (isReloadScroll) {
7565
- functionNames = functionNames.filter(function(i) {
7566
- return i !== "clearScroll";
7567
- });
7680
+ this.clearSort();
7681
+ this.clearCurrentRow();
7682
+ this.clearCurrentColumn();
7683
+ this.clearSelection();
7684
+ this.clearRowExpand();
7685
+ this.clearTreeExpand();
7686
+ this.clearValidateMap();
7687
+ if (!isReloadScroll) {
7688
+ this.clearScroll();
7568
7689
  }
7569
- run(functionNames, this);
7570
7690
  this.cellStatus.clear();
7571
7691
  if (typeof isReloadFilter === "undefined" ? Grid$1._filter : !isReloadFilter) {
7572
7692
  this.clearFilter(silent);
7573
7693
  }
7574
7694
  if (this.keyboardConfig || this.mouseConfig) {
7575
- run(["clearIndexChecked", "clearHeaderChecked", "clearChecked", "clearSelected", "clearCopyed"], this);
7695
+ this.clearIndexChecked();
7696
+ this.clearHeaderChecked();
7697
+ this.clearChecked();
7698
+ this.clearSelected();
7699
+ this.clearCopyed();
7576
7700
  }
7577
7701
  return this.clearActived();
7578
7702
  },
@@ -7581,7 +7705,8 @@ var Methods$d = {
7581
7705
  var next = function next2() {
7582
7706
  _this16.tableData = [];
7583
7707
  _this16.cellStatus.clear();
7584
- return _this16.loadTableData(data7 || _this16.tableFullData);
7708
+ _this16.clearValidateMap();
7709
+ return _this16.updateRawData(data7 || _this16.tableFullData);
7585
7710
  };
7586
7711
  return this.$nextTick().then(next);
7587
7712
  },
@@ -7633,18 +7758,10 @@ var Methods$d = {
7633
7758
  // 全量加载表格数据
7634
7759
  loadTableData: function loadTableData(datas, notRefresh) {
7635
7760
  var _this18 = this;
7636
- var editStore = this.editStore, height2 = this.height, maxHeight = this.maxHeight, lastScrollLeft = this.lastScrollLeft, lastScrollTop = this.lastScrollTop, optimizeOpts = this.optimizeOpts;
7637
- var scrollY = optimizeOpts.scrollY;
7638
- var tableFullData = isArray(datas) ? datas.slice(0) : [];
7639
- var scrollYLoad = scrollY && scrollY.gt > 0 && scrollY.gt <= tableFullData.length;
7761
+ var editStore = this.editStore, height2 = this.height, maxHeight = this.maxHeight, lastScrollLeft = this.lastScrollLeft, lastScrollTop = this.lastScrollTop, scrollYLoad = this.scrollYLoad;
7640
7762
  editStore.insertList = [];
7763
+ editStore.insertMap = /* @__PURE__ */ new Map();
7641
7764
  editStore.removeList = [];
7642
- Object.assign(this, {
7643
- tableFullData,
7644
- tableSynchData: datas,
7645
- scrollYLoad
7646
- });
7647
- this.updateCache(true, true);
7648
7765
  if (scrollYLoad && !(height2 || maxHeight)) {
7649
7766
  error("ui.grid.error.scrollYHeight");
7650
7767
  }
@@ -7660,31 +7777,51 @@ var Methods$d = {
7660
7777
  lastScrollTop
7661
7778
  });
7662
7779
  }
7780
+ }).then(function() {
7781
+ var _this18$resolveMap$lo;
7782
+ if (((_this18$resolveMap$lo = _this18.resolveMap.loadDataResolve) == null ? void 0 : _this18$resolveMap$lo.data) === datas) {
7783
+ _this18.resolveMap.loadDataResolve.resolveQueue.forEach(function(resolve) {
7784
+ return resolve();
7785
+ });
7786
+ _this18.resolveMap.loadDataResolve = null;
7787
+ }
7663
7788
  });
7664
7789
  },
7665
7790
  // 重新加载数据
7666
7791
  reloadData: function reloadData(datas) {
7667
7792
  var _this19 = this;
7668
7793
  return this.clearAll().then(function() {
7669
- return _this19.loadTableData(datas);
7794
+ return _this19.updateRawData(datas);
7670
7795
  });
7671
7796
  },
7672
7797
  // 加载全量数据
7673
7798
  loadData: function loadData(datas) {
7674
7799
  var _this20 = this;
7675
7800
  return new Promise(function(resolve) {
7676
- _this20.loadTableData(datas);
7677
- resolve();
7801
+ _this20.updateRawData(datas);
7802
+ if (_this20.resolveMap.loadDataResolve) {
7803
+ _this20.resolveMap.loadDataResolve.data = datas;
7804
+ _this20.resolveMap.loadDataResolve.resolveQueue.push(resolve);
7805
+ } else {
7806
+ _this20.resolveMap.loadDataResolve = {
7807
+ data: datas,
7808
+ resolveQueue: [resolve]
7809
+ };
7810
+ }
7678
7811
  });
7679
7812
  },
7813
+ updateRawData: function updateRawData(datas) {
7814
+ this.rawData = datas;
7815
+ this.rawDataVersion += 1;
7816
+ },
7680
7817
  getOriginRow: function getOriginRow(row2) {
7681
- var backupMap = this.backupMap;
7682
- return backupMap.has(row2) ? backupMap.get(row2) : null;
7818
+ var rowid2 = getRowid(this, row2);
7819
+ return rowid2 ? this.rowidCacheMap.get(rowid2) : null;
7683
7820
  },
7684
7821
  setOriginRow: function setOriginRow(row2, record) {
7685
- var backupMap = this.backupMap;
7686
- if (backupMap.has(row2) && record) {
7687
- backupMap.set(row2, record);
7822
+ var rowid2 = getRowid(this, row2);
7823
+ if (rowid2 && record) {
7824
+ this.rowidCacheMap.set(rowid2, record);
7688
7825
  }
7689
7826
  },
7690
7827
  reloadRow: function reloadRow(row2, record, field) {
@@ -7758,14 +7895,14 @@ var Methods$d = {
7758
7895
  if (deepCopy === void 0) {
7759
7896
  deepCopy = false;
7760
7897
  }
7761
- var tableFullData = this.tableFullData, treeConfig = this.treeConfig, treeOrdered = this.treeOrdered;
7898
+ 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;
7762
7899
  var rowKey = getRowkey(this);
7763
7900
  var _ref157 = treeConfig || {}, childrenKey = _ref157.children, _ref157$temporaryInde = _ref157.temporaryIndex, temporaryIndex = _ref157$temporaryInde === void 0 ? "_$index_" : _ref157$temporaryInde;
7764
7901
  var isTreeOrderedFalse = treeConfig && !treeOrdered;
7765
- var backupMap = /* @__PURE__ */ new WeakMap();
7766
- this.fullDataRowIdData = {};
7767
- this.fullDataRowMap.clear();
7768
- var copyRow = function copyRow2(row2, index2, parent) {
7902
+ var fullDataRowIdData = this.fullDataRowIdData = {};
7903
+ var fullDataRowMap = this.fullDataRowMap;
7904
+ fullDataRowMap.clear();
7905
+ eachTree(tableFullData, function(row2, index2, _array, _path, parent) {
7769
7906
  var rowId = getRowid(_this23, row2);
7770
7907
  if (!rowId) {
7771
7908
  rowId = getRowUniqueId();
@@ -7776,31 +7913,78 @@ var Methods$d = {
7776
7913
  rowid: rowId,
7777
7914
  index: index2
7778
7915
  };
7779
- _this23.fullDataRowIdData[rowId] = rowCache;
7780
- _this23.fullDataRowMap.set(hooks.toRaw(row2), rowCache);
7781
- if (backup) {
7782
- var _ref158;
7783
- if (isTreeOrderedFalse) {
7784
- var parentIndex;
7785
- if (parent) {
7786
- parentIndex = get(parent, temporaryIndex);
7787
- }
7788
- set(row2, temporaryIndex, (parentIndex ? parentIndex + "." : "") + (index2 + 1));
7916
+ if (fullDataRowIdData[rowId]) {
7917
+ warn("ui.grid.error.duplicateRowId", rowId);
7918
+ }
7919
+ fullDataRowIdData[rowId] = rowCache;
7920
+ fullDataRowMap.set(_this23.getRaw(row2), rowCache);
7921
+ if (isTreeOrderedFalse) {
7922
+ var parentIndex;
7923
+ if (parent) {
7924
+ parentIndex = get(parent, temporaryIndex);
7789
7925
  }
7790
- var childrenField = treeConfig ? (_ref158 = {}, _ref158[childrenKey] = void 0, _ref158) : {};
7791
- var backupRow = deepCopy ? clone(_extends({}, row2, childrenField), true) : _extends({}, row2, childrenField);
7792
- backupMap.set(row2, backupRow);
7793
- return backupRow;
7926
+ set(row2, temporaryIndex, (parentIndex ? parentIndex + "." : "") + (index2 + 1));
7794
7927
  }
7795
- };
7796
- var backupData = dfsCopy(tableFullData, copyRow, void 0, treeConfig, childrenKey);
7797
- if (backup) {
7798
- Object.assign(this, {
7799
- tableSourceData: backupData,
7800
- backupMap
7928
+ }, treeConfig);
7929
+ if (backup && (editConfig || saveSource)) {
7930
+ requestIdleCallback(function() {
7931
+ var rowidCacheMap = /* @__PURE__ */ new Map();
7932
+ var callback = function callback2(row2) {
7933
+ var _extends6;
7934
+ return rowidCacheMap.set(getRowid(_this23, row2), clone(childrenKey ? _extends({}, row2, (_extends6 = {}, _extends6[childrenKey] = null, _extends6)) : _extends({}, row2), deepCopy));
7935
+ };
7936
+ eachTree(tableFullData, callback, treeConfig);
7937
+ _this23.rowidCacheMap = rowidCacheMap;
7801
7938
  });
7802
7939
  }
7803
7940
  },
7941
+ getRaw: function getRaw(object) {
7942
+ var hooks_vue = hooks;
7943
+ return !isVue2 && hooks_vue.isProxy(object) ? hooks.toRaw(object) : object;
7944
+ },
7945
+ /**
7946
+ * 递归地将 Proxy 对象(如 Vue 3 的响应式对象)转换为普通对象。
7947
+ * @param {any} data 待处理的数据
7948
+ * @returns {any} 转换后的普通对象或原始数据
7949
+ */
7950
+ deepUnwrap: function deepUnwrap(data7) {
7951
+ if (data7 === null || typeof data7 !== "object") {
7952
+ return data7;
7953
+ }
7954
+ if (data7 instanceof Map) {
7955
+ return this.cloneMapAndUnwrap(data7);
7956
+ }
7957
+ if (data7 instanceof Set) {
7958
+ return new Set(Array.from(data7).map(this.deepUnwrap));
7959
+ }
7960
+ if (Array.isArray(data7)) {
7961
+ return data7.map(this.deepUnwrap);
7962
+ }
7963
+ var result = {};
7964
+ for (var key in data7) {
7965
+ if (Object.prototype.hasOwnProperty.call(data7, key)) {
7966
+ result[key] = this.deepUnwrap(data7[key]);
7967
+ }
7968
+ }
7969
+ return result;
7970
+ },
7971
+ /**
7972
+ * 复制 Map,并递归地将 Map 的值中包含的 Proxy 转换为普通对象。
7973
+ * @param {Map<any, any>} originalMap 原始 Map
7974
+ * @returns {Map<any, any>} 复制并解包后的新 Map
7975
+ */
7976
+ cloneMapAndUnwrap: function cloneMapAndUnwrap(originalMap) {
7977
+ if (!(originalMap instanceof Map)) {
7978
+ return originalMap;
7979
+ }
7980
+ var newMap = /* @__PURE__ */ new Map();
7981
+ for (var _iterator0 = _createForOfIteratorHelperLoose(originalMap.entries()), _step0; !(_step0 = _iterator0()).done; ) {
7982
+ var _step0$value = _step0.value, key = _step0$value[0], value = _step0$value[1];
7983
+ var unwrappedValue = this.deepUnwrap(value);
7984
+ newMap.set(key, unwrappedValue);
7985
+ }
7986
+ return newMap;
7987
+ },
7804
7988
  // 更新列的 Map
7805
7989
  cacheColumnMap: function cacheColumnMap(options) {
7806
7990
  var fullColumnMap = this.fullColumnMap;
@@ -7828,9 +8012,7 @@ var Methods$d = {
7828
8012
  return null;
7829
8013
  },
7830
8014
  getColumnNode: function getColumnNode(cell) {
7831
- if (!cell) {
7832
- return null;
7833
- }
8015
+ if (!cell) return null;
7834
8016
  var fullColumnIdData = this.fullColumnIdData, tableFullColumn = this.tableFullColumn;
7835
8017
  var dataColid = cell.dataset.colid;
7836
8018
  var colCache = fullColumnIdData[dataColid];
@@ -7844,31 +8026,41 @@ var Methods$d = {
7844
8026
  return null;
7845
8027
  },
7846
8028
  getRowIndex: function getRowIndex(row2) {
7847
- var rawRow = hooks.toRaw(row2);
7848
8029
  var fullDataRowMap = this.fullDataRowMap;
7849
- return fullDataRowMap.has(rawRow) ? fullDataRowMap.get(rawRow).index : -1;
8030
+ row2 = this.getRaw(row2);
8031
+ return fullDataRowMap.has(row2) ? fullDataRowMap.get(row2).index : -1;
7850
8032
  },
7851
8033
  getColumnIndex: function getColumnIndex(column) {
7852
8034
  var fullColumnMap = this.fullColumnMap;
7853
- return fullColumnMap.has(column) ? fullColumnMap.get(column).index : -1;
8035
+ return fullColumnMap.has(column) ? fullColumnMap.get(column).columnIndex : -1;
7854
8036
  },
7855
8037
  hasIndexColumn: function hasIndexColumn(column) {
7856
8038
  return (column == null ? void 0 : column.type) === "index";
7857
8039
  },
7858
- defineField: function defineField(row2, copy) {
7859
- if (!row2 || typeof row2 !== "object") {
7860
- return row2;
7861
- }
8040
+ defineField: function defineField(row2, copy, editorColumns, cache) {
8041
+ var _this24 = this;
8042
+ if (!row2 || typeof row2 !== "object") return row2;
7862
8043
  if (copy) {
7863
8044
  row2 = clone(row2, true);
7864
8045
  }
7865
8046
  var rowKey = getRowkey(this);
7866
- this.visibleColumn.forEach(function(_ref159) {
7867
- var property = _ref159.property, editor = _ref159.editor;
8047
+ var columns2 = editorColumns || this.visibleColumn;
8048
+ columns2.forEach(function(column) {
8049
+ var property = column.property, editor = column.editor;
7868
8050
  var propNotExist = property && !has(row2, property);
7869
8051
  var propDefaultValue = editor && !isUndefined(editor.defaultValue) ? editor.defaultValue : null;
7870
8052
  if (propNotExist) {
7871
- set(row2, property, propDefaultValue);
8053
+ if (cache) {
8054
+ var originRow = _this24.getOriginRow(row2);
8055
+ if (originRow) {
8056
+ originRow[property] = propDefaultValue;
8057
+ }
8058
+ }
8059
+ if (isVue2) {
8060
+ _this24.$set(row2, property, propDefaultValue);
8061
+ } else {
8062
+ set(row2, property, propDefaultValue);
8063
+ }
7872
8064
  }
7873
8065
  });
7874
8066
  var rowId = get(row2, rowKey);
@@ -7878,11 +8070,8 @@ var Methods$d = {
7878
8070
  return row2;
7879
8071
  },
7880
8072
  isTemporaryRow: function isTemporaryRow(row2) {
7881
- var _this24 = this;
7882
8073
  var rowid2 = getRowid(this, row2);
7883
- return find$1(this.temporaryRows, function(r) {
7884
- return rowid2 === getRowid(_this24, r);
7885
- });
8074
+ return this.editStore.insertMap.has(rowid2);
7886
8075
  },
7887
8076
  createData: function createData(records, copy) {
7888
8077
  var _this25 = this;
@@ -7922,7 +8111,7 @@ var Methods$d = {
7922
8111
  return this.$nextTick();
7923
8112
  },
7924
8113
  hasRowInsert: function hasRowInsert(row2) {
7925
- return this.editStore.insertList.includes(row2);
8114
+ return this.isTemporaryRow(row2);
7926
8115
  },
7927
8116
  compareRow: function compareRow(row2, originalRow, field) {
7928
8117
  var value = get(row2, field);
@@ -7948,20 +8137,20 @@ var Methods$d = {
7948
8137
  },
7949
8138
  hasRowChange: function hasRowChange(row2, field) {
7950
8139
  var _editConfig$insertCha;
7951
- var treeConfig = this.treeConfig, visibleColumn = this.visibleColumn, backupMap = this.backupMap, editConfig = this.editConfig;
8140
+ var treeConfig = this.treeConfig, visibleColumn = this.visibleColumn, _this$editConfig2 = this.editConfig, editConfig = _this$editConfig2 === void 0 ? {} : _this$editConfig2;
7952
8141
  var insertChanged = (_editConfig$insertCha = editConfig == null ? void 0 : editConfig.insertChanged) != null ? _editConfig$insertCha : false;
7953
8142
  var argsLength = arguments.length;
7954
8143
  var originRow;
7955
8144
  if (this.isTemporaryRow(row2)) {
7956
8145
  return insertChanged;
7957
8146
  }
7958
- var cacheRow = backupMap.get(row2);
8147
+ var cacheRow = this.getOriginRow(row2);
7959
8148
  if (cacheRow) {
7960
8149
  if (treeConfig) {
7961
- var _extends6, _extends7;
8150
+ var _extends7, _extends8;
7962
8151
  var children = treeConfig.children;
7963
- row2 = _extends({}, row2, (_extends6 = {}, _extends6[children] = null, _extends6));
7964
- originRow = _extends({}, cacheRow, (_extends7 = {}, _extends7[children] = null, _extends7));
8152
+ row2 = _extends({}, row2, (_extends7 = {}, _extends7[children] = null, _extends7));
8153
+ originRow = _extends({}, cacheRow, (_extends8 = {}, _extends8[children] = null, _extends8));
7965
8154
  } else {
7966
8155
  originRow = _extends({}, cacheRow);
7967
8156
  }
@@ -8008,7 +8197,7 @@ var Methods$d = {
8008
8197
  },
8009
8198
  // 获取表格所有数据
8010
8199
  getData: function getData(rowIndex) {
8011
- var allRows = this.data || this.tableSynchData;
8200
+ var allRows = this.rawData || [];
8012
8201
  if (!arguments.length) {
8013
8202
  return allRows.slice(0);
8014
8203
  }
@@ -8022,7 +8211,7 @@ var Methods$d = {
8022
8211
  var _this$selectConfig = this.selectConfig, selectConfig = _this$selectConfig === void 0 ? {} : _this$selectConfig, selection = this.selection;
8023
8212
  var tableFullData = this.tableFullData, treeConfig = this.treeConfig;
8024
8213
  var checkField = selectConfig.checkField;
8025
- var _ref160 = {}, _ref160$rowList = _ref160.rowList, rowList = _ref160$rowList === void 0 ? [] : _ref160$rowList;
8214
+ var _ref158 = {}, _ref158$rowList = _ref158.rowList, rowList = _ref158$rowList === void 0 ? [] : _ref158$rowList;
8026
8215
  if (checkField && treeConfig) {
8027
8216
  rowList = filterTree(tableFullData, function(row2) {
8028
8217
  return get(row2, checkField);
@@ -8051,8 +8240,8 @@ var Methods$d = {
8051
8240
  var tableData = this.tableFullData;
8052
8241
  var updateFilter = function updateFilter2(tableData2) {
8053
8242
  var remoteFilter = _this27.remoteFilter, visibleColumn = _this27.visibleColumn;
8054
- var filterColumn = visibleColumn.filter(function(_ref161) {
8055
- var filter2 = _ref161.filter;
8243
+ var filterColumn = visibleColumn.filter(function(_ref159) {
8244
+ var filter2 = _ref159.filter;
8056
8245
  return !!filter2;
8057
8246
  });
8058
8247
  return tableData2.filter(function(row2) {
@@ -8081,8 +8270,8 @@ var Methods$d = {
8081
8270
  } else {
8082
8271
  var sortedFlag = false;
8083
8272
  if (sortOpts2.multipleColumnSort) {
8084
- var sortColumns = visibleColumn.filter(function(_ref162) {
8085
- var order2 = _ref162.order;
8273
+ var sortColumns = visibleColumn.filter(function(_ref160) {
8274
+ var order2 = _ref160.order;
8086
8275
  return !!order2;
8087
8276
  });
8088
8277
  if (sortColumns.length > 1) {
@@ -8144,9 +8333,10 @@ var Methods$d = {
8144
8333
  return this.scrollLoad ? this.scrollLoad.pageSize || 10 : ((_this$_graphInfo = this._graphInfo) == null ? void 0 : _this$_graphInfo.graphed.length) || 0;
8145
8334
  },
8146
8335
  getRowById: function getRowById(rowid2) {
8147
- var fullDataRowIdData = this.fullDataRowIdData;
8148
- var rowCache = fullDataRowIdData[rowid2];
8149
- return rowCache ? rowCache.row : null;
8336
+ var _fullDataRowIdData$ro, _editStore$insertMap;
8337
+ var fullDataRowIdData = this.fullDataRowIdData, editStore = this.editStore;
8338
+ 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));
8339
+ return rowCache || null;
8150
8340
  },
8151
8341
  // 获取处理后的表格数据
8152
8342
  getTableData: function getTableData() {
@@ -8190,7 +8380,7 @@ var Methods$d = {
8190
8380
  });
8191
8381
  }
8192
8382
  if (hasCustomsOrColWidth && !isGroupOrNonSort) {
8193
- 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;
8383
+ 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;
8194
8384
  mapTree(customColumns, function(customCol) {
8195
8385
  var targetCol = find$1(fullColumn, function(item) {
8196
8386
  return customCol.property && item.property === customCol.property;
@@ -8256,7 +8446,8 @@ var Methods$d = {
8256
8446
  var options = {
8257
8447
  columnCaches: []
8258
8448
  };
8259
- var fullColumn = getColumnList(value, options);
8449
+ this.markColumnIndex = 0;
8450
+ var fullColumn = getColumnList(this, value, options);
8260
8451
  if (options.isGroup && options.hasFixed) {
8261
8452
  value.forEach(function(root) {
8262
8453
  return repairFixed(root);
@@ -8527,8 +8718,8 @@ var Methods$d = {
8527
8718
  }
8528
8719
  end && end();
8529
8720
  },
8530
- blurOutside: function blurOutside(_ref164, event) {
8531
- var row2 = _ref164.row, args = _ref164.args, column = _ref164.column;
8721
+ blurOutside: function blurOutside(_ref162, event) {
8722
+ var row2 = _ref162.row, args = _ref162.args, column = _ref162.column;
8532
8723
  var editConfig = this.editConfig, getEventTargetNode2 = this.getEventTargetNode, $el = this.$el;
8533
8724
  if (column && row2) {
8534
8725
  var editor = column.editor;
@@ -8588,7 +8779,7 @@ var Methods$d = {
8588
8779
  // 处理单选框默认勾选
8589
8780
  handleRadioDefChecked: function handleRadioDefChecked() {
8590
8781
  var fullDataRowIdData = this.fullDataRowIdData;
8591
- var _ref165 = this.radioConfig || {}, checkRowKey = _ref165.checkRowKey;
8782
+ var _ref163 = this.radioConfig || {}, checkRowKey = _ref163.checkRowKey;
8592
8783
  var rowid2 = checkRowKey && encodeURIComponent(checkRowKey);
8593
8784
  var rowCache = fullDataRowIdData[rowid2];
8594
8785
  if (rowid2 && rowCache) {
@@ -8598,7 +8789,7 @@ var Methods$d = {
8598
8789
  // 单选,行选中事件
8599
8790
  triggerRadioRowEvent: function triggerRadioRowEvent(event, params) {
8600
8791
  var selectRow = this.selectRow;
8601
- var _ref166 = this.radioConfig || {}, checkMethod = _ref166.checkMethod;
8792
+ var _ref164 = this.radioConfig || {}, checkMethod = _ref164.checkMethod;
8602
8793
  if (checkMethod && !checkMethod(params)) {
8603
8794
  return;
8604
8795
  }
@@ -8853,8 +9044,8 @@ var Methods$d = {
8853
9044
  this.groupExpandeds.push(row2);
8854
9045
  },
8855
9046
  // 展开行事件
8856
- triggerRowExpandEvent: function triggerRowExpandEvent(event, _ref167) {
8857
- var row2 = _ref167.row;
9047
+ triggerRowExpandEvent: function triggerRowExpandEvent(event, _ref165) {
9048
+ var row2 = _ref165.row;
8858
9049
  var rest = this.toggleRowExpansion(row2);
8859
9050
  var eventParams = {
8860
9051
  $table: this,
@@ -8871,7 +9062,7 @@ var Methods$d = {
8871
9062
  // 处理默认展开行
8872
9063
  handleDefaultRowExpand: function handleDefaultRowExpand() {
8873
9064
  var fullDataRowIdData = this.fullDataRowIdData, tableFullData = this.tableFullData;
8874
- var _ref168 = this.expandConfig || {}, expandAll = _ref168.expandAll, expandRowKeys = _ref168.expandRowKeys;
9065
+ var _ref166 = this.expandConfig || {}, expandAll = _ref166.expandAll, expandRowKeys = _ref166.expandRowKeys;
8875
9066
  if (expandAll) {
8876
9067
  this.expandeds = tableFullData.slice(0);
8877
9068
  return;
@@ -8892,7 +9083,7 @@ var Methods$d = {
8892
9083
  // 设置展开行,二个参数设置这一行展开与否;支持单行;支持多行
8893
9084
  setRowExpansion: function setRowExpansion(rows, expanded) {
8894
9085
  var expandeds = this.expandeds;
8895
- var _ref169 = this.expandConfig || {}, accordion = _ref169.accordion;
9086
+ var _ref167 = this.expandConfig || {}, accordion = _ref167.accordion;
8896
9087
  var isToggle = arguments.length === 1;
8897
9088
  var isAccordionCloseAll = false;
8898
9089
  if (!rows) {
@@ -8968,7 +9159,7 @@ var Methods$d = {
8968
9159
  var scrollXStore = this.scrollXStore, visibleColumn = this.visibleColumn;
8969
9160
  var offsetSize = scrollXStore.offsetSize, renderSize = scrollXStore.renderSize, startIndex = scrollXStore.startIndex, visibleIndex = scrollXStore.visibleIndex, visibleSize = scrollXStore.visibleSize;
8970
9161
  var scrollLeft = this.$refs.tableBody.$el.scrollLeft;
8971
- 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;
9162
+ 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;
8972
9163
  for (var i = 0; i < visibleColumn.length; i++) {
8973
9164
  width += visibleColumn[i].renderWidth;
8974
9165
  if (scrollLeft < width) {
@@ -9158,7 +9349,7 @@ var Methods$d = {
9158
9349
  return this.$nextTick();
9159
9350
  },
9160
9351
  scrollToRow: function scrollToRow(row2, column, isDelay, move) {
9161
- var hasRowCache = this.fullDataRowMap.has(hooks.toRaw(row2));
9352
+ var hasRowCache = this.fullDataRowMap.has(this.getRaw(row2));
9162
9353
  var isDelayArg = isDelay || isBoolean(column);
9163
9354
  row2 && hasRowCache && rowToVisible(this, row2);
9164
9355
  return this.scrollToColumn(column, isDelayArg, move);
@@ -9299,8 +9490,8 @@ var Methods$d = {
9299
9490
  return _this44.validCellRules(type, row2, column, cellValue).then(function() {
9300
9491
  refreshStatus();
9301
9492
  _this44.clearValidate();
9302
- }).catch(function(_ref171) {
9303
- var rule = _ref171.rule;
9493
+ }).catch(function(_ref169) {
9494
+ var rule = _ref169.rule;
9304
9495
  refreshStatus();
9305
9496
  _this44.showValidTooltip({
9306
9497
  rule,
@@ -9347,8 +9538,8 @@ var Methods$d = {
9347
9538
  return fetchColumns;
9348
9539
  }
9349
9540
  tableColumn2.forEach(function(col) {
9350
- var _ref172 = col.format || {}, async = _ref172.async;
9351
- var _ref173 = async || {}, fetch = _ref173.fetch, _ref173$splitConfig = _ref173.splitConfig, splitConfig = _ref173$splitConfig === void 0 ? {} : _ref173$splitConfig;
9541
+ var _ref170 = col.format || {}, async = _ref170.async;
9542
+ var _ref171 = async || {}, fetch = _ref171.fetch, _ref171$splitConfig = _ref171.splitConfig, splitConfig = _ref171$splitConfig === void 0 ? {} : _ref171$splitConfig;
9352
9543
  if (typeof fetch === "function") {
9353
9544
  var columnValues = [];
9354
9545
  tableData.forEach(function(row2) {
@@ -9408,8 +9599,8 @@ var Methods$d = {
9408
9599
  }, this));
9409
9600
  },
9410
9601
  // Publish methods 与工具栏对接
9411
- connect: function connect(_ref174) {
9412
- var toolbar = _ref174.toolbar;
9602
+ connect: function connect(_ref172) {
9603
+ var toolbar = _ref172.toolbar;
9413
9604
  this.$toolbar = toolbar;
9414
9605
  },
9415
9606
  // 检查触发源是否属于目标节点
@@ -9434,8 +9625,8 @@ var Methods$d = {
9434
9625
  return column.order ? column.order === "asc" ? "desc" : null : "asc";
9435
9626
  },
9436
9627
  handleDataChange: function handleDataChange() {
9437
- if (Array.isArray(this.data)) {
9438
- !this._isUpdateData && this.loadTableData(this.data);
9628
+ if (Array.isArray(this.rawData)) {
9629
+ !this._isUpdateData && this.loadTableData(this.rawData);
9439
9630
  this._isUpdateData = false;
9440
9631
  }
9441
9632
  },
@@ -9469,7 +9660,7 @@ var Methods$d = {
9469
9660
  // 尝试恢复滚动位置,规范了最大滚动位置的取值
9470
9661
  attemptRestoreScroll: function attemptRestoreScroll(options) {
9471
9662
  var _this47 = this;
9472
- var _ref175 = options || this, lastScrollTop = _ref175.lastScrollTop, lastScrollLeft = _ref175.lastScrollLeft;
9663
+ var _ref173 = options || this, lastScrollTop = _ref173.lastScrollTop, lastScrollLeft = _ref173.lastScrollLeft;
9473
9664
  var scrollXLoad = this.scrollXLoad, scrollYLoad = this.scrollYLoad, elemStore = this.elemStore;
9474
9665
  var tableBodyElem = elemStore["main-body-wrapper"];
9475
9666
  if ((lastScrollTop || lastScrollLeft) && tableBodyElem) {
@@ -9741,8 +9932,8 @@ var __vue2_script$7 = defineComponent({
9741
9932
  return typeof hidden === "boolean" && hidden || typeof hidden === "function" && hidden(row2);
9742
9933
  };
9743
9934
  var handleItemClick = function handleItemClick2(name) {
9744
- var buttonConfig = visibleButtons.find(function(_ref176) {
9745
- var buttonName = _ref176.name;
9935
+ var buttonConfig = visibleButtons.find(function(_ref174) {
9936
+ var buttonName = _ref174.name;
9746
9937
  return buttonName === name;
9747
9938
  });
9748
9939
  buttonConfig.click(window.event || {}, _extends({
@@ -10557,7 +10748,7 @@ function mergeScrollDirStore(scrollDir, scrollDirStore) {
10557
10748
  }
10558
10749
  function loadStatic(data7, _vm) {
10559
10750
  if (data7 && data7.length > 0) {
10560
- _vm.loadTableData(data7, true);
10751
+ _vm.updateRawData(data7);
10561
10752
  _vm.updateStyle();
10562
10753
  }
10563
10754
  }
@@ -10961,6 +11152,7 @@ var Table = defineComponent({
10961
11152
  columns: []
10962
11153
  },
10963
11154
  insertList: [],
11155
+ insertMap: /* @__PURE__ */ new Map(),
10964
11156
  removeList: [],
10965
11157
  // 选中源
10966
11158
  selected: {
@@ -10983,7 +11175,8 @@ var Table = defineComponent({
10983
11175
  id: "",
10984
11176
  multi: false,
10985
11177
  options: [],
10986
- visible: false
11178
+ visible: false,
11179
+ searchValue: ""
10987
11180
  },
10988
11181
  // 所有列已禁用
10989
11182
  headerCheckDisabled: false,
@@ -11041,15 +11234,7 @@ var Table = defineComponent({
11041
11234
  // 在编辑模式下 单元格在失去焦点验证的状态
11042
11235
  validatedMap: {},
11043
11236
  // 表格父容器的高度
11044
- parentHeight: 0,
11045
- // 水平滚动条的状态
11046
- horizonScroll: {
11047
- fixed: false,
11048
- threshold: 2,
11049
- max: 0,
11050
- isLeft: true,
11051
- isRight: false
11052
- }
11237
+ parentHeight: 0
11053
11238
  };
11054
11239
  },
11055
11240
  computed: {
@@ -11174,9 +11359,10 @@ var Table = defineComponent({
11174
11359
  // 选项式监控在vue2可以检测到顶层数组splice项替换/$set项替换
11175
11360
  // array.splice(index, 1, newItem)
11176
11361
  // this.$set(array, index, newItem)
11362
+ // 在数组中的行对象上动态添加字段也会触发此选项式监听
11177
11363
  data: function data5(array1, array2) {
11178
11364
  if (isVue2 && array1 === array2 && array1.length === array2.length) {
11179
- this.handleDataChange();
11365
+ this.updateRawData(this.data);
11180
11366
  }
11181
11367
  }
11182
11368
  },
@@ -11193,8 +11379,6 @@ var Table = defineComponent({
11193
11379
  fullColumnMap: /* @__PURE__ */ new Map(),
11194
11380
  fullDataRowIdData: {},
11195
11381
  fullDataRowMap: /* @__PURE__ */ new Map(),
11196
- // 临时插入数据集
11197
- temporaryRows: [],
11198
11382
  // 最后滚动位置
11199
11383
  lastScrollLeft: 0,
11200
11384
  lastScrollTop: 0,
@@ -11265,6 +11449,8 @@ var Table = defineComponent({
11265
11449
  var bodyWrapperHeight = hooks.ref();
11266
11450
  var bodyWrapperMinHeight = hooks.ref();
11267
11451
  var bodyWrapperMaxHeight = hooks.ref();
11452
+ var containerScrollWidth = hooks.ref(0);
11453
+ var containerScrollHeight = hooks.ref(0);
11268
11454
  var bodyTableWidth = hooks.ref();
11269
11455
  var scrollLoadScrollHeight = hooks.ref();
11270
11456
  var columnStore = hooks.ref({
@@ -11286,6 +11472,13 @@ var Table = defineComponent({
11286
11472
  // 百分比最小宽度列表集合
11287
11473
  scaleMinList: []
11288
11474
  });
11475
+ var horizonScroll = hooks.ref({
11476
+ fixed: false,
11477
+ threshold: 2,
11478
+ max: 0,
11479
+ isLeft: true,
11480
+ isRight: false
11481
+ });
11289
11482
  var bodyProps = hooks.computed(function() {
11290
11483
  return {
11291
11484
  collectColumn: collectColumn2.value,
@@ -11305,6 +11498,10 @@ var Table = defineComponent({
11305
11498
  };
11306
11499
  });
11307
11500
  var tableWrapper = hooks.ref();
11501
+ var _useNormalData = useNormalData({
11502
+ props,
11503
+ tableFullColumn
11504
+ }), rawData = _useNormalData.rawData, rawDataVersion = _useNormalData.rawDataVersion;
11308
11505
  var tinyTheme = hooks.ref(resolveTheme(props, context));
11309
11506
  var $table = hooks.getCurrentInstance().proxy;
11310
11507
  var $grid = hooks.inject("$grid", null);
@@ -11350,6 +11547,38 @@ var Table = defineComponent({
11350
11547
  columnStore
11351
11548
  });
11352
11549
  var _useData = useData(props), tiledLength = _useData.tiledLength;
11550
+ var updateFixedClasses = function updateFixedClasses2(isLeft, isRight) {
11551
+ if (!$table.$el) return;
11552
+ var el = $table.$el;
11553
+ var hasLeftClass = el.classList.contains("tiny-grid-fixed__left");
11554
+ var hasRightClass = el.classList.contains("tiny-grid-fixed__right");
11555
+ var shouldHaveLeft = !isLeft;
11556
+ var shouldHaveRight = !isRight;
11557
+ if (hasLeftClass !== shouldHaveLeft) {
11558
+ if (shouldHaveLeft) {
11559
+ el.classList.add("tiny-grid-fixed__left");
11560
+ } else {
11561
+ el.classList.remove("tiny-grid-fixed__left");
11562
+ }
11563
+ }
11564
+ if (hasRightClass !== shouldHaveRight) {
11565
+ if (shouldHaveRight) {
11566
+ el.classList.add("tiny-grid-fixed__right");
11567
+ } else {
11568
+ el.classList.remove("tiny-grid-fixed__right");
11569
+ }
11570
+ }
11571
+ };
11572
+ var resolveMap = {};
11573
+ hooks.watch(function() {
11574
+ var _horizonScroll$value, _horizonScroll$value2;
11575
+ return [(_horizonScroll$value = horizonScroll.value) == null ? void 0 : _horizonScroll$value.isLeft, (_horizonScroll$value2 = horizonScroll.value) == null ? void 0 : _horizonScroll$value2.isRight];
11576
+ }, function(_ref175) {
11577
+ var newIsLeft = _ref175[0], newIsRight = _ref175[1];
11578
+ hooks.nextTick(function() {
11579
+ return updateFixedClasses(newIsLeft, newIsRight);
11580
+ });
11581
+ });
11353
11582
  hooks.onMounted(function() {
11354
11583
  $table.addIntersectionObserver();
11355
11584
  if (tableWrapper.value) {
@@ -11357,6 +11586,18 @@ var Table = defineComponent({
11357
11586
  }
11358
11587
  hooks.nextTick(function() {
11359
11588
  $table.afterMounted = true;
11589
+ setTimeout(function() {
11590
+ if ($table.$el && $table.horizonScroll) {
11591
+ var _horizonScroll$value3, _horizonScroll$value4;
11592
+ var el = $table.$el;
11593
+ if (!((_horizonScroll$value3 = horizonScroll.value) != null && _horizonScroll$value3.isLeft)) {
11594
+ el.classList.add("tiny-grid-fixed__left");
11595
+ }
11596
+ if (!((_horizonScroll$value4 = horizonScroll.value) != null && _horizonScroll$value4.isRight)) {
11597
+ el.classList.add("tiny-grid-fixed__right");
11598
+ }
11599
+ }
11600
+ });
11360
11601
  if (props.autoResize && Grid$1._resize) {
11361
11602
  $table.bindResize();
11362
11603
  }
@@ -11380,6 +11621,7 @@ var Table = defineComponent({
11380
11621
  }
11381
11622
  unbindEvent($table);
11382
11623
  $table._tileInfo = $table._graphInfo = null;
11624
+ $table.rowidCacheMap = null;
11383
11625
  });
11384
11626
  hooks.onActivated(function() {
11385
11627
  var lastScrollLeft = $table.lastScrollLeft, lastScrollTop = $table.lastScrollTop;
@@ -11398,6 +11640,8 @@ var Table = defineComponent({
11398
11640
  unbindEvent($table);
11399
11641
  });
11400
11642
  var tableListeners = getListeners(attrs, listeners);
11643
+ var markColumnIndex = hooks.ref(0);
11644
+ var rowidCacheMap = /* @__PURE__ */ new Map();
11401
11645
  return {
11402
11646
  slots,
11403
11647
  tableListeners,
@@ -11425,10 +11669,18 @@ var Table = defineComponent({
11425
11669
  bodyWrapperHeight,
11426
11670
  bodyWrapperMinHeight,
11427
11671
  bodyWrapperMaxHeight,
11672
+ containerScrollWidth,
11673
+ containerScrollHeight,
11428
11674
  bodyTableWidth,
11429
11675
  scrollLoadScrollHeight,
11430
11676
  columnStore,
11431
- tiledLength
11677
+ tiledLength,
11678
+ rawDataVersion,
11679
+ rawData,
11680
+ markColumnIndex,
11681
+ rowidCacheMap,
11682
+ horizonScroll,
11683
+ resolveMap
11432
11684
  };
11433
11685
  },
11434
11686
  render: function render16() {
@@ -11446,7 +11698,7 @@ var Table = defineComponent({
11446
11698
  return h("div", {
11447
11699
  class: (_class4 = {
11448
11700
  "tiny-grid h-full sm:h-auto !bg-transparent sm:!bg-color-bg-1 after:border-none sm:after:border-solid": true
11449
- }, _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)
11701
+ }, _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)
11450
11702
  }, [
11451
11703
  // 隐藏列
11452
11704
  h("div", {
@@ -11474,9 +11726,10 @@ var Table = defineComponent({
11474
11726
  key: "tinyGridResizeBar"
11475
11727
  }) : null,
11476
11728
  // 加载中
11477
- h(loadingComponent || Loading, {
11729
+ h(Loading, {
11478
11730
  props: {
11479
- visible: loading
11731
+ visible: loading,
11732
+ loadingComponent
11480
11733
  },
11481
11734
  class: this.viewCls("gridLoading")
11482
11735
  }),
@@ -11676,8 +11929,8 @@ var Column = defineComponent({
11676
11929
  default: null
11677
11930
  }
11678
11931
  },
11679
- setup: function setup7(props, _ref177) {
11680
- var slots = _ref177.slots;
11932
+ setup: function setup7(props, _ref176) {
11933
+ var slots = _ref176.slots;
11681
11934
  var reactive = hooks.reactive, inject = hooks.inject, getCurrentInstance = hooks.getCurrentInstance, onUpdated = hooks.onUpdated, watch = hooks.watch, nextTick = hooks.nextTick;
11682
11935
  var currentInstance = getCurrentInstance();
11683
11936
  var instance = currentInstance.proxy;
@@ -11731,7 +11984,7 @@ var Column = defineComponent({
11731
11984
  warn("ui.grid.error.chainCallError");
11732
11985
  }
11733
11986
  var hasSubColumn = findTree(slotVnode, function(node) {
11734
- var _ref178 = node || {}, componentOptions = _ref178.componentOptions, type = _ref178.type;
11987
+ var _ref177 = node || {}, componentOptions = _ref177.componentOptions, type = _ref177.type;
11735
11988
  var componentName = type && type.name || componentOptions && componentOptions.Ctor.extendOptions.name;
11736
11989
  return $table.isValidCustomColumn(componentName);
11737
11990
  }, null, null);
@@ -11979,8 +12232,8 @@ var Grid = defineComponent({
11979
12232
  var tinyTheme = hooks.ref(resolveTheme(props, context));
11980
12233
  var tinyMode = hooks.ref(resolveMode(props, context));
11981
12234
  var breakpoint = useBreakpoint();
11982
- var renderless = function renderless2(props2, hooks2, _ref179) {
11983
- var _ref179$designConfig = _ref179.designConfig, designConfig = _ref179$designConfig === void 0 ? null : _ref179$designConfig;
12235
+ var renderless = function renderless2(props2, hooks2, _ref178) {
12236
+ var _ref178$designConfig = _ref178.designConfig, designConfig = _ref178$designConfig === void 0 ? null : _ref178$designConfig;
11984
12237
  return {
11985
12238
  tableListeners,
11986
12239
  designConfig,
@@ -12087,8 +12340,8 @@ var Grid = defineComponent({
12087
12340
  this.tasks.updateParentHeight();
12088
12341
  },
12089
12342
  // 向缓存添加实例
12090
- connect: function connect2(_ref180) {
12091
- var name = _ref180.name, vm = _ref180.vm;
12343
+ connect: function connect2(_ref179) {
12344
+ var name = _ref179.name, vm = _ref179.vm;
12092
12345
  if (name && typeof name === "string" && vm) {
12093
12346
  this.vmStore[name] = vm;
12094
12347
  }
@@ -12160,30 +12413,25 @@ var Grid = defineComponent({
12160
12413
  Grid.install = function(Vue) {
12161
12414
  Vue.component(Grid.name, Grid);
12162
12415
  };
12163
- function operArrs(_ref181) {
12164
- 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;
12416
+ function operArrs(_ref180) {
12417
+ var _vm = _ref180._vm, editStore = _ref180.editStore, newRecords = _ref180.newRecords, row2 = _ref180.row, tableFullData = _ref180.tableFullData;
12165
12418
  if (row2 === -1) {
12166
- Array.prototype.push.apply(nowData, newRecords);
12167
12419
  Array.prototype.push.apply(tableFullData, newRecords);
12168
- Array.prototype.push.apply(tableSourceData, newRecordsCopy);
12169
12420
  }
12170
12421
  if (row2 && row2 !== -1) {
12171
- var targetIndex = nowData.indexOf(row2);
12172
- if (targetIndex === -1) {
12422
+ var insertIndex = tableFullData.indexOf(row2);
12423
+ if (insertIndex === -1) {
12173
12424
  throw new Error(error("ui.grid.error.unableInsert"));
12174
12425
  }
12175
- var insertIndex = tableFullData.indexOf(row2);
12176
- Array.prototype.splice.apply(nowData, [targetIndex, 0].concat(newRecords));
12177
12426
  Array.prototype.splice.apply(tableFullData, [insertIndex, 0].concat(newRecords));
12178
- Array.prototype.splice.apply(tableSourceData, [insertIndex, 0].concat(newRecordsCopy));
12179
12427
  }
12180
12428
  if (!row2) {
12181
- Array.prototype.unshift.apply(nowData, newRecords);
12182
12429
  Array.prototype.unshift.apply(tableFullData, newRecords);
12183
- Array.prototype.unshift.apply(tableSourceData, newRecordsCopy);
12184
12430
  }
12185
12431
  Array.prototype.unshift.apply(editStore.insertList, newRecords);
12186
- Array.prototype.push.apply(_vm.temporaryRows, newRecordsCopy);
12432
+ newRecords.forEach(function(row22) {
12433
+ return editStore.insertMap.set(getRowid(_vm, row22), row22);
12434
+ });
12187
12435
  }
12188
12436
  var _setActiveCell = function _setActiveCell2(row2, field) {
12189
12437
  var _this53 = this;
@@ -12228,35 +12476,27 @@ var Methods$c = {
12228
12476
  // 根据位置从指定行添加数据
12229
12477
  _insertAt: function _insertAt(records, row2) {
12230
12478
  var _this54 = this;
12231
- 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;
12479
+ var editStore = this.editStore, isAsyncColumn = this.isAsyncColumn, scrollYLoad = this.scrollYLoad, tableFullData = this.tableFullData, treeConfig = this.treeConfig, visibleColumn = this.visibleColumn;
12232
12480
  if (treeConfig) {
12233
12481
  throw new Error(error("ui.grid.error.treeInsert"));
12234
12482
  }
12235
- if (isAsyncColumn) {
12236
- var columnSet = this.getColumns();
12237
- columnSet.forEach(function(column) {
12238
- if (column.format && column.format.async && column.format.async.fetch) {
12239
- records[GlobalConfig$1.constant.insertedField] = true;
12240
- }
12241
- });
12242
- }
12243
12483
  if (!isArray(records)) {
12244
12484
  records = [records];
12245
12485
  }
12246
- var nowData = afterFullData;
12486
+ var isColumnFormat = isAsyncColumn && visibleColumn.some(function(column) {
12487
+ var _column$format, _column$format$async;
12488
+ return (_column$format = column.format) == null ? void 0 : (_column$format$async = _column$format.async) == null ? void 0 : _column$format$async.fetch;
12489
+ });
12247
12490
  var newRecords = records.map(function(record) {
12248
- return hooks.reactive(_this54.defineField(_extends({}, record)));
12491
+ isColumnFormat && (record[GlobalConfig$1.constant.insertedField] = true);
12492
+ return hooks.reactive(_this54.defineField(Object.assign({}, record)));
12249
12493
  });
12250
- var newRecordsCopy = clone(newRecords, true);
12251
12494
  operArrs({
12252
12495
  _vm: this,
12253
12496
  editStore,
12254
- newRecords,
12255
- newRecordsCopy,
12256
- nowData,
12257
12497
  row: row2,
12258
12498
  tableFullData,
12259
- tableSourceData
12499
+ newRecords
12260
12500
  });
12261
12501
  this.updateCache();
12262
12502
  this.handleTableData(true);
@@ -12281,9 +12521,9 @@ var Methods$c = {
12281
12521
  */
12282
12522
  _remove: function _remove(rows) {
12283
12523
  var _this55 = this;
12284
- var afterFullData = this.afterFullData, scrollYLoad = this.scrollYLoad, _this$selectConfig3 = this.selectConfig, selectConfig = _this$selectConfig3 === void 0 ? {} : _this$selectConfig3;
12285
- var selection = this.selection, tableFullData = this.tableFullData, treeConfig = this.treeConfig, _this$tableSourceData2 = this.tableSourceData, tableSourceData = _this$tableSourceData2 === void 0 ? [] : _this$tableSourceData2;
12286
- var _this$editStore = this.editStore, insertList = _this$editStore.insertList, removeList = _this$editStore.removeList;
12524
+ var afterFullData = this.afterFullData, _this$selectConfig3 = this.selectConfig, selectConfig = _this$selectConfig3 === void 0 ? {} : _this$selectConfig3;
12525
+ var selection = this.selection, tableFullData = this.tableFullData, treeConfig = this.treeConfig;
12526
+ var _this$editStore = this.editStore, insertList = _this$editStore.insertList, insertMap = _this$editStore.insertMap, removeList = _this$editStore.removeList;
12287
12527
  var checkField = selectConfig.checkField;
12288
12528
  var nowData = afterFullData;
12289
12529
  var rest = [];
@@ -12302,7 +12542,7 @@ var Methods$c = {
12302
12542
  }
12303
12543
  for (var i = 0; i < rows.length; i++) {
12304
12544
  var row2 = rows[i];
12305
- if (this.hasRowInsert(row2)) continue;
12545
+ if (this.isTemporaryRow(row2)) continue;
12306
12546
  removeList.push(row2);
12307
12547
  }
12308
12548
  if (!checkField) {
@@ -12322,23 +12562,15 @@ var Methods$c = {
12322
12562
  return inArr(row3, rows);
12323
12563
  });
12324
12564
  }
12325
- remove(tableSourceData, function(row3) {
12326
- return find$1(insertList, function(r) {
12327
- return getRowid(_this55, r) === getRowid(_this55, row3);
12328
- }) && find$1(rows, function(r) {
12329
- return getRowid(_this55, r) === getRowid(_this55, row3);
12330
- });
12331
- });
12332
12565
  remove(insertList, function(row3) {
12333
- return inArr(row3, rows);
12566
+ var exist = inArr(row3, rows);
12567
+ exist && insertMap.delete(getRowid(_this55, row3));
12568
+ return exist;
12334
12569
  });
12335
12570
  this.updateCache();
12336
12571
  this.handleTableData(true);
12337
12572
  this.checkSelectionStatus();
12338
12573
  this.updateFooter();
12339
- if (scrollYLoad) {
12340
- this.updateScrollYSpace();
12341
- }
12342
12574
  var res = {
12343
12575
  row: rows && rows.length ? rows[rows.length - 1] : null,
12344
12576
  rows: rest
@@ -12372,12 +12604,12 @@ var Methods$c = {
12372
12604
  * 如果还额外传了field则还原指定单元格。
12373
12605
  */
12374
12606
  _revertData: function _revertData(rows, field) {
12375
- var tableSynchData = this.tableSynchData;
12607
+ var rawData = this.rawData;
12376
12608
  if (arguments.length && rows && !isArray(rows)) {
12377
12609
  rows = [rows];
12378
12610
  }
12379
12611
  if (!arguments.length) {
12380
- rows = tableSynchData || [];
12612
+ rows = rawData || [];
12381
12613
  }
12382
12614
  for (var i = 0; i < rows.length; i++) {
12383
12615
  var row2 = rows[i];
@@ -12394,7 +12626,7 @@ var Methods$c = {
12394
12626
  if (arguments.length) {
12395
12627
  return this.$nextTick();
12396
12628
  }
12397
- return this.reloadData(tableSynchData);
12629
+ return this.reloadData(rawData || []);
12398
12630
  },
12399
12631
  /**
12400
12632
  * 获取表格操作数据集
@@ -12529,7 +12761,7 @@ var Methods$c = {
12529
12761
  */
12530
12762
  _clearActived: function _clearActived(event) {
12531
12763
  var _this59 = this;
12532
- var _this$editConfig2 = this.editConfig, editConfig = _this$editConfig2 === void 0 ? {} : _this$editConfig2, editStore = this.editStore, tableColumn2 = this.tableColumn;
12764
+ var _this$editConfig3 = this.editConfig, editConfig = _this$editConfig3 === void 0 ? {} : _this$editConfig3, editStore = this.editStore, tableColumn2 = this.tableColumn;
12533
12765
  var actived = editStore.actived;
12534
12766
  var args = actived.args, column = actived.column, row2 = actived.row;
12535
12767
  var isActived = row2 || column;
@@ -12546,7 +12778,7 @@ var Methods$c = {
12546
12778
  this.updateRowStatus(actived.row);
12547
12779
  this.updateFooter();
12548
12780
  var row22 = args.row, column2 = args.column;
12549
- var _ref182 = column2 || {}, editor = _ref182.editor;
12781
+ var _ref181 = column2 || {}, editor = _ref181.editor;
12550
12782
  if ((editor == null ? void 0 : editor.component) === "input" && (editor == null ? void 0 : (_editor$attrs = editor.attrs) == null ? void 0 : _editor$attrs.type) === "number") {
12551
12783
  row22[column2.property] = +row22[column2.property];
12552
12784
  }
@@ -12667,7 +12899,7 @@ var Methods$c = {
12667
12899
  var _this61 = this;
12668
12900
  var editConfig = this.editConfig, editStore = this.editStore, elemStore = this.elemStore, _this$mouseConfig3 = this.mouseConfig, mouseConfig = _this$mouseConfig3 === void 0 ? {} : _this$mouseConfig3;
12669
12901
  var actived = editStore.actived, selected = editStore.selected;
12670
- var _ref183 = params || {}, cell = _ref183.cell, column = _ref183.column, row2 = _ref183.row;
12902
+ var _ref182 = params || {}, cell = _ref182.cell, column = _ref182.column, row2 = _ref182.row;
12671
12903
  var selectMethod = function selectMethod2() {
12672
12904
  var _cell$parentNode;
12673
12905
  if (selected.row === row2 && selected.column === column || actived.row === row2 && (editConfig.mode !== "cell" || actived.column === column)) {
@@ -12848,7 +13080,7 @@ function handleCellMousedownEvent(args1) {
12848
13080
  var $el = args1.$el, _vm = args1._vm, bodyList = args1.bodyList, cell = args1.cell, cellFirstElementChild = args1.cellFirstElementChild;
12849
13081
  var cellLastElementChild = args1.cellLastElementChild, headStart = args1.headStart, headerList = args1.headerList, isIndex = args1.isIndex, startCellNode = args1.startCellNode;
12850
13082
  var _vm$mouseConfig2 = _vm.mouseConfig, mouseConfig = _vm$mouseConfig2 === void 0 ? {} : _vm$mouseConfig2;
12851
- var _ref184 = mouseConfig || {}, _ref184$updateInterva = _ref184.updateInterval, updateInterval = _ref184$updateInterva === void 0 ? 10 : _ref184$updateInterva;
13083
+ var _ref183 = mouseConfig || {}, _ref183$updateInterva = _ref183.updateInterval, updateInterval = _ref183$updateInterva === void 0 ? 10 : _ref183$updateInterva;
12852
13084
  var oldMousemove = document.onmousemove;
12853
13085
  var oldMouseup = document.onmouseup;
12854
13086
  var updateEvent = function updateEvent2(event) {
@@ -12887,8 +13119,8 @@ function onCellMousedownSelectEditable(args) {
12887
13119
  _vm.handleSelected(params, event);
12888
13120
  }
12889
13121
  }
12890
- function onCellMousedownSelect(_ref185) {
12891
- var _vm = _ref185._vm, editConfig = _ref185.editConfig, event = _ref185.event, mouseConfig = _ref185.mouseConfig, params = _ref185.params;
13122
+ function onCellMousedownSelect(_ref184) {
13123
+ var _vm = _ref184._vm, editConfig = _ref184.editConfig, event = _ref184.event, mouseConfig = _ref184.mouseConfig, params = _ref184.params;
12892
13124
  if (!editConfig && mouseConfig.selected) {
12893
13125
  _vm.handleSelected(params, event);
12894
13126
  }
@@ -12907,8 +13139,8 @@ function onCellMousedownIndexColumn(args) {
12907
13139
  _vm.handleIndexChecked(getRowNodes(bodyList, getCellNodeIndex(firstCell), getCellNodeIndex(cell)));
12908
13140
  }
12909
13141
  }
12910
- function onCellMousedownNotIndexColumn(_ref186) {
12911
- var _vm = _ref186._vm, cell = _ref186.cell, column = _ref186.column, event = _ref186.event, headerList = _ref186.headerList, isIndex = _ref186.isIndex, params = _ref186.params;
13142
+ function onCellMousedownNotIndexColumn(_ref185) {
13143
+ var _vm = _ref185._vm, cell = _ref185.cell, column = _ref185.column, event = _ref185.event, headerList = _ref185.headerList, isIndex = _ref185.isIndex, params = _ref185.params;
12912
13144
  if (!isIndex) {
12913
13145
  var firstCell = cell.parentNode.firstElementChild;
12914
13146
  _vm.handleSelected(params, event);
@@ -12916,8 +13148,8 @@ function onCellMousedownNotIndexColumn(_ref186) {
12916
13148
  _vm.handleIndexChecked([[firstCell]]);
12917
13149
  }
12918
13150
  }
12919
- function handleHeaderCellMousedownEvent(_ref187) {
12920
- var $el = _ref187.$el, _vm = _ref187._vm, bodyList = _ref187.bodyList, cell = _ref187.cell, headerList = _ref187.headerList, startCell = _ref187.startCell;
13151
+ function handleHeaderCellMousedownEvent(_ref186) {
13152
+ var $el = _ref186.$el, _vm = _ref186._vm, bodyList = _ref186.bodyList, cell = _ref186.cell, headerList = _ref186.headerList, startCell = _ref186.startCell;
12921
13153
  var oldMousemove = document.onmousemove;
12922
13154
  var oldMouseup = document.onmouseup;
12923
13155
  var updateEvent = function updateEvent2(event) {
@@ -12950,8 +13182,8 @@ var removeCellClass = function removeCellClass2(bodyRef, clazz) {
12950
13182
  return removeClass(elem, clazz);
12951
13183
  });
12952
13184
  };
12953
- var getCellIndex = function getCellIndex2(_ref188) {
12954
- var cell = _ref188.cell, bodyList = _ref188.bodyList;
13185
+ var getCellIndex = function getCellIndex2(_ref187) {
13186
+ var cell = _ref187.cell, bodyList = _ref187.bodyList;
12955
13187
  var trElem = cell.parentNode;
12956
13188
  var cIndex = arrayIndexOf(trElem.children, cell);
12957
13189
  var rIndex = arrayIndexOf(bodyList, trElem);
@@ -12960,8 +13192,8 @@ var getCellIndex = function getCellIndex2(_ref188) {
12960
13192
  cIndex
12961
13193
  };
12962
13194
  };
12963
- var getModify = function getModify2(_ref189) {
12964
- var offsetTop = _ref189.offsetTop, offsetLeft = _ref189.offsetLeft, cWidth = _ref189.cWidth, cHeight = _ref189.cHeight;
13195
+ var getModify = function getModify2(_ref188) {
13196
+ var offsetTop = _ref188.offsetTop, offsetLeft = _ref188.offsetLeft, cWidth = _ref188.cWidth, cHeight = _ref188.cHeight;
12965
13197
  var modifyDomStyle = function modifyDomStyle2(dom, styleOptions) {
12966
13198
  return dom && Object.assign(dom.style, styleOptions);
12967
13199
  };
@@ -12988,8 +13220,8 @@ var getModify = function getModify2(_ref189) {
12988
13220
  });
12989
13221
  };
12990
13222
  };
12991
- var writeClipboardText = function writeClipboardText2(_ref190) {
12992
- var $table = _ref190.$table, columns2 = _ref190.columns, rows = _ref190.rows, rowNodes = _ref190.rowNodes;
13223
+ var writeClipboardText = function writeClipboardText2(_ref189) {
13224
+ var $table = _ref189.$table, columns2 = _ref189.columns, rows = _ref189.rows, rowNodes = _ref189.rowNodes;
12993
13225
  var _$table$keyboardConfi = $table.keyboardConfig, keyboardConfig = _$table$keyboardConfi === void 0 ? {} : _$table$keyboardConfi;
12994
13226
  var _keyboardConfig$clipb = keyboardConfig.clipboard, clipboard = _keyboardConfig$clipb === void 0 ? {} : _keyboardConfig$clipb;
12995
13227
  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;
@@ -13036,7 +13268,7 @@ var Methods$b = {
13036
13268
  var params = _extends({}, args);
13037
13269
  var columnIndex = visibleColumn.indexOf(params.column);
13038
13270
  var rowIndex = tableData.indexOf(params.row);
13039
- var _ref191 = {}, targetColumn = _ref191.targetColumn, targetColumnIndex = _ref191.targetColumnIndex, targetRow = _ref191.targetRow, targetRowIndex = _ref191.targetRowIndex;
13271
+ var _ref190 = {}, targetColumn = _ref190.targetColumn, targetColumnIndex = _ref190.targetColumnIndex, targetRow = _ref190.targetRow, targetRowIndex = _ref190.targetRowIndex;
13040
13272
  event.preventDefault();
13041
13273
  var checkColumn = function checkColumn2(column) {
13042
13274
  return !hasIndexColumn2(column) && (edit ? column.editor : true);
@@ -13130,9 +13362,9 @@ var Methods$b = {
13130
13362
  }
13131
13363
  },
13132
13364
  // 可编辑方向键移动处理
13133
- moveSelected: function moveSelected(_ref192) {
13365
+ moveSelected: function moveSelected(_ref191) {
13134
13366
  var _this63 = this;
13135
- var args = _ref192.args, isLeftArrow = _ref192.isLeftArrow, isUpArrow = _ref192.isUpArrow, isRightArrow = _ref192.isRightArrow, isDownArrow = _ref192.isDownArrow, event = _ref192.event;
13367
+ var args = _ref191.args, isLeftArrow = _ref191.isLeftArrow, isUpArrow = _ref191.isUpArrow, isRightArrow = _ref191.isRightArrow, isDownArrow = _ref191.isDownArrow, event = _ref191.event;
13136
13368
  var hasIndexColumn2 = this.hasIndexColumn, visibleColumn = this.tableColumn, tableData = this.tableFullData;
13137
13369
  var params = _extends({}, args);
13138
13370
  var column = params.column;
@@ -13354,7 +13586,7 @@ var Methods$b = {
13354
13586
  _getMouseCheckeds: function _getMouseCheckeds() {
13355
13587
  var _this65 = this;
13356
13588
  var _this$editStore$check = this.editStore.checked.rowNodes, rowNodes = _this$editStore$check === void 0 ? [] : _this$editStore$check;
13357
- var _ref193 = {}, _ref193$rows = _ref193.rows, rows = _ref193$rows === void 0 ? [] : _ref193$rows, _ref193$columns = _ref193.columns, columns2 = _ref193$columns === void 0 ? [] : _ref193$columns;
13589
+ var _ref192 = {}, _ref192$rows = _ref192.rows, rows = _ref192$rows === void 0 ? [] : _ref192$rows, _ref192$columns = _ref192.columns, columns2 = _ref192$columns === void 0 ? [] : _ref192$columns;
13358
13590
  var res = {
13359
13591
  rows,
13360
13592
  columns: columns2,
@@ -13383,7 +13615,7 @@ var Methods$b = {
13383
13615
  if (!mouseConfig || !mouseConfig.checked) {
13384
13616
  return;
13385
13617
  }
13386
- var _ref194 = {}, cHeight = _ref194.cHeight, cWidth = _ref194.cWidth, offsetLeft = _ref194.offsetLeft, offsetTop = _ref194.offsetTop;
13618
+ var _ref193 = {}, cHeight = _ref193.cHeight, cWidth = _ref193.cWidth, offsetLeft = _ref193.offsetLeft, offsetTop = _ref193.offsetTop;
13387
13619
  cWidth = cHeight = -2;
13388
13620
  offsetTop = offsetLeft = 0;
13389
13621
  this.clearChecked();
@@ -13512,7 +13744,7 @@ var Methods$b = {
13512
13744
  var editStore = this.editStore, tableColumn2 = this.tableColumn, tableData = this.tableData;
13513
13745
  var copyed = editStore.copyed;
13514
13746
  var rowNodes = editStore.checked.rowNodes;
13515
- 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;
13747
+ 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;
13516
13748
  cWidth = cHeight = -3;
13517
13749
  offsetTop = offsetLeft = 0;
13518
13750
  this.clearCopyed();
@@ -13635,13 +13867,13 @@ function adjustParams(rows, cb, vaildDatas) {
13635
13867
  vaildDatas
13636
13868
  };
13637
13869
  }
13638
- var columnHandler = function columnHandler2(_ref196) {
13639
- var _vm = _ref196._vm, colValidPromiseArr = _ref196.colValidPromiseArr, editRules = _ref196.editRules, isAll = _ref196.isAll, row2 = _ref196.row, validRest = _ref196.validRest;
13870
+ var columnHandler = function columnHandler2(_ref195) {
13871
+ var _vm = _ref195._vm, colValidPromiseArr = _ref195.colValidPromiseArr, editRules = _ref195.editRules, isAll = _ref195.isAll, row2 = _ref195.row, validRest = _ref195.validRest;
13640
13872
  return function(column, columnIndex) {
13641
13873
  if (has(editRules, column.property)) {
13642
13874
  colValidPromiseArr.push(new Promise(function(resolve, reject) {
13643
- _vm.validCellRules("all", row2, column).then(resolve).catch(function(_ref197) {
13644
- var rule = _ref197.rule, rules = _ref197.rules;
13875
+ _vm.validCellRules("all", row2, column).then(resolve).catch(function(_ref196) {
13876
+ var rule = _ref196.rule, rules = _ref196.rules;
13645
13877
  var rowIndex = _vm.getRowIndex(row2);
13646
13878
  var rest = {
13647
13879
  rule,
@@ -13665,8 +13897,8 @@ var columnHandler = function columnHandler2(_ref196) {
13665
13897
  }
13666
13898
  };
13667
13899
  };
13668
- function validTree(_ref198) {
13669
- var treeConfig = _ref198.treeConfig, handleVaild = _ref198.handleVaild, hasTreeExpand2 = _ref198.hasTreeExpand, vaildDatas = _ref198.vaildDatas, treeOpts = _ref198.treeOpts;
13900
+ function validTree(_ref197) {
13901
+ var treeConfig = _ref197.treeConfig, handleVaild = _ref197.handleVaild, hasTreeExpand2 = _ref197.hasTreeExpand, vaildDatas = _ref197.vaildDatas, treeOpts = _ref197.treeOpts;
13670
13902
  if (treeConfig.validHidden === false) {
13671
13903
  var _recurValid = function recurValid(row2) {
13672
13904
  var children = row2[treeConfig.children || "children"];
@@ -13680,8 +13912,8 @@ function validTree(_ref198) {
13680
13912
  eachTree(vaildDatas, handleVaild, treeOpts);
13681
13913
  }
13682
13914
  }
13683
- var realValid = function realValid2(_ref199) {
13684
- 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;
13915
+ var realValid = function realValid2(_ref198) {
13916
+ 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;
13685
13917
  var rowValids = [];
13686
13918
  var columns2 = _vm.getColumns();
13687
13919
  var handleVaild = function handleVaild2(row2) {
@@ -13733,8 +13965,8 @@ var Rule = /* @__PURE__ */ (function() {
13733
13965
  var onRejected = function onRejected2(opt, _this) {
13734
13966
  var isAll = opt.isAll, validRest = opt.validRest, cb = opt.cb, afterFullData = opt.afterFullData, treeConfig = opt.treeConfig;
13735
13967
  return function(params) {
13736
- var _ref200;
13737
- var args = isAll ? validRest : (_ref200 = {}, _ref200[params.column.property] = params, _ref200);
13968
+ var _ref199;
13969
+ var args = isAll ? validRest : (_ref199 = {}, _ref199[params.column.property] = params, _ref199);
13738
13970
  var funcFinish = function funcFinish2(args2, reject, resolve) {
13739
13971
  return function() {
13740
13972
  opt.status = false;
@@ -13801,10 +14033,10 @@ var Methods$a = {
13801
14033
  },
13802
14034
  validatePromise: function validatePromise(row2, column, columnIndex, isAll, validRest) {
13803
14035
  var _this68 = this;
13804
- function onrejected(_ref202) {
13805
- var _vm = _ref202._vm, reject = _ref202.reject, resolve = _ref202.resolve;
13806
- return function(_ref203) {
13807
- var rule = _ref203.rule, rules = _ref203.rules;
14036
+ function onrejected(_ref201) {
14037
+ var _vm = _ref201._vm, reject = _ref201.reject, resolve = _ref201.resolve;
14038
+ return function(_ref202) {
14039
+ var rule = _ref202.rule, rules = _ref202.rules;
13808
14040
  var rest = {
13809
14041
  $table: _vm,
13810
14042
  column,
@@ -13840,7 +14072,7 @@ var Methods$a = {
13840
14072
  */
13841
14073
  beginValidate: function beginValidate(rows, callback, isAll) {
13842
14074
  var afterFullData = this.afterFullData, editRules = this.editRules, hasTreeExpand2 = this.hasTreeExpand, treeConfig = this.treeConfig, treeOpts = this.treeOpts;
13843
- 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;
14075
+ 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;
13844
14076
  var _adjustParams = adjustParams(rows, callback, afterFullData), vaildDatas = _adjustParams.vaildDatas, cb = _adjustParams.cb;
13845
14077
  var opt = {
13846
14078
  isAll,
@@ -13878,8 +14110,8 @@ var Methods$a = {
13878
14110
  };
13879
14111
  return Promise.all(rowValids).then(onFulfilled).catch(onRejected(opt, this));
13880
14112
  },
13881
- hasCellRules: function hasCellRules(type, row2, _ref205) {
13882
- var property = _ref205.property;
14113
+ hasCellRules: function hasCellRules(type, row2, _ref204) {
14114
+ var property = _ref204.property;
13883
14115
  if (!property || !this.editRules) {
13884
14116
  return false;
13885
14117
  }
@@ -13912,7 +14144,7 @@ var Methods$a = {
13912
14144
  var _this69 = this;
13913
14145
  var editRules = this.editRules, rowId = this.rowId;
13914
14146
  var property = column.property;
13915
- var _ref206 = {}, _ref206$descriptor = _ref206.descriptor, descriptor = _ref206$descriptor === void 0 ? {} : _ref206$descriptor, _ref206$model = _ref206.model, model = _ref206$model === void 0 ? {} : _ref206$model;
14147
+ var _ref205 = {}, _ref205$descriptor = _ref205.descriptor, descriptor = _ref205$descriptor === void 0 ? {} : _ref205$descriptor, _ref205$model = _ref205.model, model = _ref205$model === void 0 ? {} : _ref205$model;
13916
14148
  if (property && editRules) {
13917
14149
  var rules = get(editRules, property);
13918
14150
  var cellValue = isUndefined(defaultValue) ? get(row2, property) : defaultValue;
@@ -13937,8 +14169,8 @@ var Methods$a = {
13937
14169
  column
13938
14170
  }
13939
14171
  };
13940
- var onRejected3 = function onRejected32(_ref207) {
13941
- var fields = _ref207.fields;
14172
+ var onRejected3 = function onRejected32(_ref206) {
14173
+ var fields = _ref206.fields;
13942
14174
  var cellErrors = Object.keys(fields).map(function(prop) {
13943
14175
  var rules2 = _descriptor[prop];
13944
14176
  _descriptor[prop] = !rules2.message ? Object.assign(rules2, {
@@ -13975,6 +14207,13 @@ var Methods$a = {
13975
14207
  this.clostValidTooltip(void 0);
13976
14208
  return this.$nextTick();
13977
14209
  },
14210
+ clearValidateMap: function clearValidateMap() {
14211
+ if (this.validatedMap) {
14212
+ for (var key in this.validatedMap) {
14213
+ this.validatedMap[key] = false;
14214
+ }
14215
+ }
14216
+ },
13978
14217
  // 触发校验
13979
14218
  triggerValidate: function triggerValidate(type) {
13980
14219
  var _this70 = this;
@@ -13990,8 +14229,8 @@ var Methods$a = {
13990
14229
  var onfulfilled = function onfulfilled2() {
13991
14230
  editConfig.mode === "row" && validStore.visible && validStore.row === row2 && validStore.column === column && _this70.clearValidate();
13992
14231
  };
13993
- var onrejected = function onrejected2(_ref208) {
13994
- var rule = _ref208.rule;
14232
+ var onrejected = function onrejected2(_ref207) {
14233
+ var rule = _ref207.rule;
13995
14234
  if (rule.trigger && type !== rule.trigger) {
13996
14235
  return Promise.resolve();
13997
14236
  }
@@ -14085,7 +14324,7 @@ var Methods$8 = {
14085
14324
  initFetchOption: function initFetchOption() {
14086
14325
  var _this$fetchData = this.fetchData, fetchData = _this$fetchData === void 0 ? {} : _this$fetchData, _this$dataset = this.dataset, dataset = _this$dataset === void 0 ? {} : _this$dataset;
14087
14326
  if (fetchData.api || dataset.source || dataset.value || dataset.api) {
14088
- var _ref209 = fetchData || dataset.source || dataset.api || {}, loading = _ref209.loading, fields = _ref209.fields, api = _ref209.api, reloadConfig = _ref209.reloadConfig;
14327
+ var _ref208 = fetchData || dataset.source || dataset.api || {}, loading = _ref208.loading, fields = _ref208.fields, api = _ref208.api, reloadConfig = _ref208.reloadConfig;
14089
14328
  var isReloadFilter = false;
14090
14329
  var isReloadScroll = false;
14091
14330
  if (reloadConfig) {
@@ -14123,7 +14362,7 @@ var Methods$8 = {
14123
14362
  error("ui.grid.error.notQuery");
14124
14363
  return this.$nextTick();
14125
14364
  }
14126
- var _ref210 = fetchData || dataset.source || dataset.api || {}, args = _ref210.args, loading = _ref210.loading;
14365
+ var _ref209 = fetchData || dataset.source || dataset.api || {}, args = _ref209.args, loading = _ref209.loading;
14127
14366
  var field = sortData.field, order = sortData.order, prop = sortData.prop, property = sortData.property;
14128
14367
  var sortByData = {
14129
14368
  field,
@@ -14231,8 +14470,8 @@ var Methods$7 = {
14231
14470
  }
14232
14471
  },
14233
14472
  // 表格内置分页渲染器
14234
- renderPager: function renderPager(_ref211) {
14235
- var $slots = _ref211.$slots, _vm = _ref211._vm, loading = _ref211.loading, pager = _ref211.pager, pagerConfig = _ref211.pagerConfig, tableLoading = _ref211.tableLoading, vSize3 = _ref211.vSize;
14473
+ renderPager: function renderPager(_ref210) {
14474
+ var $slots = _ref210.$slots, _vm = _ref210._vm, loading = _ref210.loading, pager = _ref210.pager, pagerConfig = _ref210.pagerConfig, tableLoading = _ref210.tableLoading, vSize3 = _ref210.vSize;
14236
14475
  var res = null;
14237
14476
  var fetchData = _vm.fetchData;
14238
14477
  if ($slots.pager) {
@@ -14326,8 +14565,8 @@ var Pager = {
14326
14565
  Object.assign(host.methods, Methods$7);
14327
14566
  }
14328
14567
  };
14329
- function setBodyRecords(_ref212) {
14330
- var body = _ref212.body, insertRecords = _ref212.insertRecords, pendingRecords = _ref212.pendingRecords;
14568
+ function setBodyRecords(_ref211) {
14569
+ var body = _ref211.body, insertRecords = _ref211.insertRecords, pendingRecords = _ref211.pendingRecords;
14331
14570
  if (insertRecords.length) {
14332
14571
  body.pendingRecords = pendingRecords.filter(function(row2) {
14333
14572
  return !insertRecords.includes(row2);
@@ -14342,8 +14581,8 @@ function setBodyRecords(_ref212) {
14342
14581
  function canInvokeSaveDataApi(body, removeRecords, updateRecords) {
14343
14582
  return body.insertRecords.length || removeRecords.length || updateRecords.length || body.pendingRecords.length;
14344
14583
  }
14345
- function doRemoveOrShowMsg(_ref213) {
14346
- var _vm = _ref213._vm, canInvoke = _ref213.canInvoke, code = _ref213.code, isMsg2 = _ref213.isMsg, pendingRecords = _ref213.pendingRecords, resolve = _ref213.resolve, valid = _ref213.valid;
14584
+ function doRemoveOrShowMsg(_ref212) {
14585
+ var _vm = _ref212._vm, canInvoke = _ref212.canInvoke, code = _ref212.code, isMsg2 = _ref212.isMsg, pendingRecords = _ref212.pendingRecords, resolve = _ref212.resolve, valid = _ref212.valid;
14347
14586
  if (valid && !canInvoke) {
14348
14587
  if (isMsg2) {
14349
14588
  if (pendingRecords.length) {
@@ -14359,8 +14598,8 @@ function doRemoveOrShowMsg(_ref213) {
14359
14598
  resolve();
14360
14599
  }
14361
14600
  }
14362
- function invokeSaveDataApi(_ref214) {
14363
- 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;
14601
+ function invokeSaveDataApi(_ref213) {
14602
+ 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;
14364
14603
  var canInvoke = false;
14365
14604
  if (valid) {
14366
14605
  canInvoke = canInvokeSaveDataApi(body, removeRecords, updateRecords);
@@ -14387,8 +14626,8 @@ function invokeSaveDataApi(_ref214) {
14387
14626
  }
14388
14627
  var Methods$6 = {
14389
14628
  // 表格工具栏渲染器
14390
- getRenderedToolbar: function getRenderedToolbar(_ref215) {
14391
- var $slots = _ref215.$slots, _vm = _ref215._vm, loading = _ref215.loading, tableLoading = _ref215.tableLoading, toolbar = _ref215.toolbar;
14629
+ getRenderedToolbar: function getRenderedToolbar(_ref214) {
14630
+ var $slots = _ref214.$slots, _vm = _ref214._vm, loading = _ref214.loading, tableLoading = _ref214.tableLoading, toolbar = _ref214.toolbar;
14392
14631
  return _vm.renderedToolbar = (function() {
14393
14632
  var res = null;
14394
14633
  if ($slots.toolbar) {
@@ -14490,9 +14729,9 @@ var Methods$6 = {
14490
14729
  };
14491
14730
  this.remove(selecteds).then(afterRemove);
14492
14731
  },
14493
- handleFullScreen: function handleFullScreen(_ref216) {
14732
+ handleFullScreen: function handleFullScreen(_ref215) {
14494
14733
  var _this78 = this;
14495
- var show2 = _ref216[0];
14734
+ var show2 = _ref215[0];
14496
14735
  this.fullScreenClass = show2 ? "tiny-fullscreen-full" : "";
14497
14736
  this.$nextTick(function() {
14498
14737
  _this78.recalculate();
@@ -14509,8 +14748,8 @@ var Methods$6 = {
14509
14748
  if (code === "insert") {
14510
14749
  this.insert();
14511
14750
  } else if (code === "insert_actived") {
14512
- this.insert().then(function(_ref217) {
14513
- var row2 = _ref217.row;
14751
+ this.insert().then(function(_ref216) {
14752
+ var row2 = _ref216.row;
14514
14753
  return _this79.setActiveRow(row2);
14515
14754
  });
14516
14755
  } else if (code === "mark_cancel") {
@@ -14597,7 +14836,7 @@ var Methods$6 = {
14597
14836
  });
14598
14837
  }
14599
14838
  if (selecteds.length) {
14600
- 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;
14839
+ 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;
14601
14840
  selecteds.forEach(function(data7) {
14602
14841
  var selectedPending = pendings.includes(data7);
14603
14842
  tmp = selectedPending ? minus : plus;
@@ -14620,8 +14859,8 @@ var Toolbar = {
14620
14859
  };
14621
14860
  var Methods$5 = {
14622
14861
  renderColumnAnchor: function renderColumnAnchor(params, _vm) {
14623
- var _ref219 = params || {}, _ref219$anchors = _ref219.anchors, anchors = _ref219$anchors === void 0 ? [] : _ref219$anchors, _ref219$action = _ref219.action, action = _ref219$action === void 0 ? function() {
14624
- } : _ref219$action;
14862
+ var _ref218 = params || {}, _ref218$anchors = _ref218.anchors, anchors = _ref218$anchors === void 0 ? [] : _ref218$anchors, _ref218$action = _ref218.action, action = _ref218$action === void 0 ? function() {
14863
+ } : _ref218$action;
14625
14864
  var viewType2 = _vm.viewType;
14626
14865
  return h("div", {
14627
14866
  class: ["tiny-grid__column-anchor", _vm.viewCls("columnAnchor")],
@@ -14656,8 +14895,8 @@ var Methods$5 = {
14656
14895
  }, [iconVnode, spanVnode]);
14657
14896
  }));
14658
14897
  },
14659
- buildColumnAnchor: function buildColumnAnchor(_ref220) {
14660
- var property = _ref220.property, label = _ref220.label, anchors = _ref220.anchors, activeAnchor = _ref220.activeAnchor;
14898
+ buildColumnAnchor: function buildColumnAnchor(_ref219) {
14899
+ var property = _ref219.property, label = _ref219.label, anchors = _ref219.anchors, activeAnchor = _ref219.activeAnchor;
14661
14900
  var visibleColumn = this.getColumns();
14662
14901
  var column = visibleColumn.find(function(col) {
14663
14902
  return !col.type && col.property === property;
@@ -14748,8 +14987,8 @@ var Methods$5 = {
14748
14987
  }, activeAnchor.delay);
14749
14988
  };
14750
14989
  },
14751
- anchorAction: function anchorAction(_ref221) {
14752
- var field = _ref221.field, anchors = _ref221.anchors, _vm = _ref221._vm;
14990
+ anchorAction: function anchorAction(_ref220) {
14991
+ var field = _ref220.field, anchors = _ref220.anchors, _vm = _ref220._vm;
14753
14992
  var fromAnchor = anchors.find(function(anchor) {
14754
14993
  return anchor.active;
14755
14994
  });
@@ -14795,8 +15034,8 @@ var ColumnAnchor = {
14795
15034
  Object.assign(host.methods, Methods$5);
14796
15035
  }
14797
15036
  };
14798
- var createHandlerOnEnd = function createHandlerOnEnd2(_ref222) {
14799
- var _vm = _ref222._vm, refresh = _ref222.refresh;
15037
+ var createHandlerOnEnd = function createHandlerOnEnd2(_ref221) {
15038
+ var _vm = _ref221._vm, refresh = _ref221.refresh;
14800
15039
  return function(event) {
14801
15040
  var insertRecords = _vm.getInsertRecords();
14802
15041
  if (insertRecords.length) {
@@ -14808,7 +15047,7 @@ var createHandlerOnEnd = function createHandlerOnEnd2(_ref222) {
14808
15047
  var targetTrElem = event.item;
14809
15048
  var wrapperElem = targetTrElem.parentNode, prevEl = targetTrElem.previousElementSibling, nextEl = targetTrElem.nextElementSibling;
14810
15049
  var prevTrElem = prevEl && prevEl.classList.contains("tiny-grid-body__row") ? prevEl : prevEl && prevEl.previousElementSibling;
14811
- var tableTreeData = _vm.data || _vm.tableData;
15050
+ var tableTreeData = _vm.rawData || _vm.tableData;
14812
15051
  var selfRow = _vm.getRowNode(targetTrElem).item;
14813
15052
  var selfNode = findTree$1(tableTreeData, function(row2) {
14814
15053
  return row2 === selfRow;
@@ -14842,7 +15081,7 @@ var createHandlerOnEnd = function createHandlerOnEnd2(_ref222) {
14842
15081
  _vm.tableFullData = [].concat(tableTreeData);
14843
15082
  }
14844
15083
  _vm.$emit("row-drop-end", event, _vm, _vm.scrollYLoad ? tableTreeData : _vm.tableFullData);
14845
- refresh && _vm.data && _vm.refreshData(_vm.data);
15084
+ refresh && _vm.rawData && _vm.refreshData(_vm.rawData);
14846
15085
  };
14847
15086
  };
14848
15087
  var getSortColumns = function getSortColumns2(columns2) {
@@ -14865,7 +15104,7 @@ var Methods$4 = {
14865
15104
  // 处理列拖拽
14866
15105
  columnDrop: function columnDrop(headerEl) {
14867
15106
  var _this81 = this;
14868
- var _ref223 = this.dropConfig || {}, plugin = _ref223.plugin, onBeforeMove = _ref223.onBeforeMove, filter2 = _ref223.filter;
15107
+ var _ref222 = this.dropConfig || {}, plugin = _ref222.plugin, onBeforeMove = _ref222.onBeforeMove, filter2 = _ref222.filter;
14869
15108
  var columnDropContainer = headerEl.querySelector(".tiny-grid-header__row");
14870
15109
  var columnDropOptions = _extends({}, this.dropConfig, {
14871
15110
  handle: ".tiny-grid-header__column:not(.col__fixed)",
@@ -14958,8 +15197,8 @@ var Sort = {
14958
15197
  Object.assign(host.methods, Methods$3);
14959
15198
  }
14960
15199
  };
14961
- function createTooltipRange(_ref224) {
14962
- var _vm = _ref224._vm, cell = _ref224.cell, column = _ref224.column, isHeader = _ref224.isHeader;
15200
+ function createTooltipRange(_ref223) {
15201
+ var _vm = _ref223._vm, cell = _ref223.cell, column = _ref223.column, isHeader = _ref223.isHeader;
14963
15202
  var range = document.createRange();
14964
15203
  var rangeEnd;
14965
15204
  range.setStart(cell, 0);
@@ -14977,8 +15216,8 @@ function createTooltipRange(_ref224) {
14977
15216
  range.setEnd(cell, rangeEnd);
14978
15217
  return range;
14979
15218
  }
14980
- function processContentMethod(_ref225) {
14981
- 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;
15219
+ function processContentMethod(_ref224) {
15220
+ 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;
14982
15221
  if (contentMethod) {
14983
15222
  _vm.tooltipContent = contentMethod({
14984
15223
  event,
@@ -15130,15 +15369,15 @@ var Tooltip = {
15130
15369
  Object.assign(host.methods, Methods$2);
15131
15370
  }
15132
15371
  };
15133
- function onHalfSelectionProperty(_ref226) {
15134
- var checkStrictly = _ref226.checkStrictly, property = _ref226.property, row2 = _ref226.row, treeConfig = _ref226.treeConfig, treeIndeterminates = _ref226.treeIndeterminates, value = _ref226.value;
15372
+ function onHalfSelectionProperty(_ref225) {
15373
+ var checkStrictly = _ref225.checkStrictly, property = _ref225.property, row2 = _ref225.row, treeConfig = _ref225.treeConfig, treeIndeterminates = _ref225.treeIndeterminates, value = _ref225.value;
15135
15374
  if (property && treeConfig && !checkStrictly && value === -1) {
15136
15375
  treeIndeterminates.push(row2);
15137
15376
  set(row2, property, false);
15138
15377
  }
15139
15378
  }
15140
- function onFullSelectionProperty(_ref227) {
15141
- var checkMethod = _ref227.checkMethod, checkStrictly = _ref227.checkStrictly, property = _ref227.property, row2 = _ref227.row, treeConfig = _ref227.treeConfig, treeIndeterminates = _ref227.treeIndeterminates, value = _ref227.value;
15379
+ function onFullSelectionProperty(_ref226) {
15380
+ var checkMethod = _ref226.checkMethod, checkStrictly = _ref226.checkStrictly, property = _ref226.property, row2 = _ref226.row, treeConfig = _ref226.treeConfig, treeIndeterminates = _ref226.treeIndeterminates, value = _ref226.value;
15142
15381
  if (property && treeConfig && !checkStrictly && value !== -1) {
15143
15382
  eachTree([row2], function(item, $rowIndex) {
15144
15383
  if (row2 === item || !checkMethod || checkMethod({
@@ -15153,8 +15392,8 @@ function onFullSelectionProperty(_ref227) {
15153
15392
  }, treeConfig);
15154
15393
  }
15155
15394
  }
15156
- function getVItemsOnParentSlctProp(_ref228) {
15157
- var checkMethod = _ref228.checkMethod, matchObj = _ref228.matchObj;
15395
+ function getVItemsOnParentSlctProp(_ref227) {
15396
+ var checkMethod = _ref227.checkMethod, matchObj = _ref227.matchObj;
15158
15397
  var tinyItems;
15159
15398
  if (checkMethod) {
15160
15399
  tinyItems = matchObj.items.filter(function(item, $rowIndex) {
@@ -15168,8 +15407,8 @@ function getVItemsOnParentSlctProp(_ref228) {
15168
15407
  }
15169
15408
  return tinyItems;
15170
15409
  }
15171
- function getParentStatusOnParentSlctProp(_ref229) {
15172
- var indeterminatesItem = _ref229.indeterminatesItem, matchObj = _ref229.matchObj, property = _ref229.property, vItems = _ref229.vItems, value = _ref229.value;
15410
+ function getParentStatusOnParentSlctProp(_ref228) {
15411
+ var indeterminatesItem = _ref228.indeterminatesItem, matchObj = _ref228.matchObj, property = _ref228.property, vItems = _ref228.vItems, value = _ref228.value;
15173
15412
  var parentStatus;
15174
15413
  if (indeterminatesItem) {
15175
15414
  parentStatus = -1;
@@ -15184,8 +15423,8 @@ function getParentStatusOnParentSlctProp(_ref229) {
15184
15423
  }
15185
15424
  return parentStatus;
15186
15425
  }
15187
- function onHalfSelection(_ref230) {
15188
- var checkStrictly = _ref230.checkStrictly, property = _ref230.property, row2 = _ref230.row, selection = _ref230.selection, treeConfig = _ref230.treeConfig, treeIndeterminates = _ref230.treeIndeterminates, value = _ref230.value;
15426
+ function onHalfSelection(_ref229) {
15427
+ var checkStrictly = _ref229.checkStrictly, property = _ref229.property, row2 = _ref229.row, selection = _ref229.selection, treeConfig = _ref229.treeConfig, treeIndeterminates = _ref229.treeIndeterminates, value = _ref229.value;
15189
15428
  if (!property && treeConfig && !checkStrictly && value === -1) {
15190
15429
  treeIndeterminates.push(row2);
15191
15430
  remove(selection, function(item) {
@@ -15196,8 +15435,8 @@ function onHalfSelection(_ref230) {
15196
15435
  var addSelection = function addSelection2(selection, item) {
15197
15436
  return !selection.includes(item) && selection.push(item);
15198
15437
  };
15199
- function onFullSelection(_ref231) {
15200
- 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;
15438
+ function onFullSelection(_ref230) {
15439
+ 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;
15201
15440
  if (!property && treeConfig && !checkStrictly && value !== -1) {
15202
15441
  eachTree([row2], function(item, $rowIndex) {
15203
15442
  if (row2 === item || !checkMethod || checkMethod({
@@ -15218,8 +15457,8 @@ function onFullSelection(_ref231) {
15218
15457
  }, treeConfig);
15219
15458
  }
15220
15459
  }
15221
- function getParentStatusOnParentSelection(_ref232) {
15222
- var indeterminatesItem = _ref232.indeterminatesItem, matchObj = _ref232.matchObj, selection = _ref232.selection, vItems = _ref232.vItems, value = _ref232.value;
15460
+ function getParentStatusOnParentSelection(_ref231) {
15461
+ var indeterminatesItem = _ref231.indeterminatesItem, matchObj = _ref231.matchObj, selection = _ref231.selection, vItems = _ref231.vItems, value = _ref231.value;
15223
15462
  var parentStatus;
15224
15463
  if (indeterminatesItem) {
15225
15464
  parentStatus = -1;
@@ -15232,8 +15471,8 @@ function getParentStatusOnParentSelection(_ref232) {
15232
15471
  }
15233
15472
  return parentStatus;
15234
15473
  }
15235
- function hasCheckField(_ref233, value, _vm) {
15236
- var row2 = _ref233.row;
15474
+ function hasCheckField(_ref232, value, _vm) {
15475
+ var row2 = _ref232.row;
15237
15476
  var tableFullData = _vm.tableFullData, _vm$selectConfig = _vm.selectConfig, selectConfig = _vm$selectConfig === void 0 ? {} : _vm$selectConfig, treeConfig = _vm.treeConfig, treeIndeterminates = _vm.treeIndeterminates;
15238
15477
  var property = selectConfig.checkField, checkStrictly = selectConfig.checkStrictly, checkMethod = selectConfig.checkMethod;
15239
15478
  onHalfSelectionProperty({
@@ -15281,8 +15520,8 @@ function hasCheckField(_ref233, value, _vm) {
15281
15520
  set(row2, property, value);
15282
15521
  }
15283
15522
  }
15284
- function onSelectTreeCheckStrictly(_ref234, value, _vm) {
15285
- var row2 = _ref234.row;
15523
+ function onSelectTreeCheckStrictly(_ref233, value, _vm) {
15524
+ var row2 = _ref233.row;
15286
15525
  var selection = _vm.selection, tableFullData = _vm.tableFullData, _vm$selectConfig2 = _vm.selectConfig, selectConfig = _vm$selectConfig2 === void 0 ? {} : _vm$selectConfig2, treeConfig = _vm.treeConfig, treeIndeterminates = _vm.treeIndeterminates;
15287
15526
  var property = selectConfig.checkField, checkStrictly = selectConfig.checkStrictly, checkMethod = selectConfig.checkMethod;
15288
15527
  onHalfSelection({
@@ -15326,8 +15565,8 @@ function onSelectTreeCheckStrictly(_ref234, value, _vm) {
15326
15565
  }
15327
15566
  }
15328
15567
  }
15329
- function onSelectOther(_ref235, value, _vm) {
15330
- var row2 = _ref235.row;
15568
+ function onSelectOther(_ref234, value, _vm) {
15569
+ var row2 = _ref234.row;
15331
15570
  var selection = _vm.selection, _vm$selectConfig3 = _vm.selectConfig, selectConfig = _vm$selectConfig3 === void 0 ? {} : _vm$selectConfig3, treeConfig = _vm.treeConfig;
15332
15571
  var property = selectConfig.checkField, checkStrictly = selectConfig.checkStrictly;
15333
15572
  if (!property && !(treeConfig && !checkStrictly)) {
@@ -15340,8 +15579,8 @@ function onSelectOther(_ref235, value, _vm) {
15340
15579
  }
15341
15580
  }
15342
15581
  }
15343
- function hasNoCheckField(_ref236, value, _vm) {
15344
- var row2 = _ref236.row;
15582
+ function hasNoCheckField(_ref235, value, _vm) {
15583
+ var row2 = _ref235.row;
15345
15584
  onSelectTreeCheckStrictly({
15346
15585
  row: row2
15347
15586
  }, value, _vm);
@@ -15349,8 +15588,8 @@ function hasNoCheckField(_ref236, value, _vm) {
15349
15588
  row: row2
15350
15589
  }, value, _vm);
15351
15590
  }
15352
- function pushSelectRow(_ref237) {
15353
- 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;
15591
+ function pushSelectRow(_ref236) {
15592
+ 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;
15354
15593
  if (!checkStrictly && value) {
15355
15594
  eachTree(afterFullData, function(row2, $rowIndex) {
15356
15595
  if (!checkMethod || checkMethod({
@@ -15372,8 +15611,8 @@ function pushSelectRow(_ref237) {
15372
15611
  }, treeConfig);
15373
15612
  }
15374
15613
  }
15375
- function hasCheckFieldNoStrictly(_ref238) {
15376
- var afterFullData = _ref238.afterFullData, checkMethod = _ref238.checkMethod, checkStrictly = _ref238.checkStrictly, property = _ref238.property, selection = _ref238.selection, treeConfig = _ref238.treeConfig, value = _ref238.value;
15614
+ function hasCheckFieldNoStrictly(_ref237) {
15615
+ var afterFullData = _ref237.afterFullData, checkMethod = _ref237.checkMethod, checkStrictly = _ref237.checkStrictly, property = _ref237.property, selection = _ref237.selection, treeConfig = _ref237.treeConfig, value = _ref237.value;
15377
15616
  if (!checkStrictly && property) {
15378
15617
  var indexKey = (treeConfig ? "$" : "") + "rowIndex";
15379
15618
  var setValFn = function setValFn2(row2, rowIndex) {
@@ -15399,8 +15638,8 @@ function hasCheckFieldNoStrictly(_ref238) {
15399
15638
  }
15400
15639
  }
15401
15640
  }
15402
- function filterSelectRow(_ref239) {
15403
- var afterFullData = _ref239.afterFullData, checkMethod = _ref239.checkMethod, checkStrictly = _ref239.checkStrictly, selectRows = _ref239.selectRows, selection = _ref239.selection, value = _ref239.value;
15641
+ function filterSelectRow(_ref238) {
15642
+ var afterFullData = _ref238.afterFullData, checkMethod = _ref238.checkMethod, checkStrictly = _ref238.checkStrictly, selectRows = _ref238.selectRows, selection = _ref238.selection, value = _ref238.value;
15404
15643
  if (!checkStrictly && value && checkMethod) {
15405
15644
  selectRows = afterFullData.filter(function(row2, rowIndex) {
15406
15645
  return selection.includes(row2) || checkMethod({
@@ -15422,8 +15661,8 @@ function filterSelectRow(_ref239) {
15422
15661
  }
15423
15662
  return selectRows;
15424
15663
  }
15425
- function hasNoCheckFieldNoStrictly(_ref240) {
15426
- var afterFullData = _ref240.afterFullData, checkMethod = _ref240.checkMethod, checkStrictly = _ref240.checkStrictly, property = _ref240.property, selection = _ref240.selection, treeConfig = _ref240.treeConfig, value = _ref240.value;
15664
+ function hasNoCheckFieldNoStrictly(_ref239) {
15665
+ var afterFullData = _ref239.afterFullData, checkMethod = _ref239.checkMethod, checkStrictly = _ref239.checkStrictly, property = _ref239.property, selection = _ref239.selection, treeConfig = _ref239.treeConfig, value = _ref239.value;
15427
15666
  var selectRows = [];
15428
15667
  if (treeConfig) {
15429
15668
  pushSelectRow({
@@ -15448,8 +15687,8 @@ function hasNoCheckFieldNoStrictly(_ref240) {
15448
15687
  }
15449
15688
  return selectRows;
15450
15689
  }
15451
- function setSelectionNoStrictly(_ref241) {
15452
- var _vm = _ref241._vm, checkStrictly = _ref241.checkStrictly, reserve = _ref241.reserve, selectRows = _ref241.selectRows, selection = _ref241.selection, value = _ref241.value, afterFullData = _ref241.afterFullData;
15690
+ function setSelectionNoStrictly(_ref240) {
15691
+ var _vm = _ref240._vm, checkStrictly = _ref240.checkStrictly, reserve = _ref240.reserve, selectRows = _ref240.selectRows, selection = _ref240.selection, value = _ref240.value, afterFullData = _ref240.afterFullData;
15453
15692
  if (!checkStrictly) {
15454
15693
  if (reserve) {
15455
15694
  var unCheckedRows = afterFullData.filter(function(row2) {
@@ -15469,7 +15708,7 @@ var Methods$1 = {
15469
15708
  // 处理默认勾选
15470
15709
  handleSelectionDefChecked: function handleSelectionDefChecked() {
15471
15710
  var fullDataRowIdData = this.fullDataRowIdData;
15472
- var _ref242 = this.selectConfig || {}, checkAll = _ref242.checkAll, checkRowKeys = _ref242.checkRowKeys;
15711
+ var _ref241 = this.selectConfig || {}, checkAll = _ref241.checkAll, checkRowKeys = _ref241.checkRowKeys;
15473
15712
  if (checkAll) {
15474
15713
  this.setAllSelection(true);
15475
15714
  return;
@@ -15503,8 +15742,8 @@ var Methods$1 = {
15503
15742
  return this.$nextTick();
15504
15743
  },
15505
15744
  // 多选,行选中事件。value:选中true、不选false、不确定-1
15506
- handleSelectRow: function handleSelectRow(_ref243, value) {
15507
- var row2 = _ref243.row;
15745
+ handleSelectRow: function handleSelectRow(_ref242, value) {
15746
+ var row2 = _ref242.row;
15508
15747
  hasCheckField({
15509
15748
  row: row2
15510
15749
  }, value, this);
@@ -15515,7 +15754,7 @@ var Methods$1 = {
15515
15754
  },
15516
15755
  handleToggleCheckRowEvent: function handleToggleCheckRowEvent(params, event) {
15517
15756
  var selection = this.selection;
15518
- var _ref244 = this.selectConfig || {}, checkField = _ref244.checkField;
15757
+ var _ref243 = this.selectConfig || {}, checkField = _ref243.checkField;
15519
15758
  var row2 = params.row;
15520
15759
  var value = checkField ? !get(row2, checkField) : !~selection.indexOf(row2);
15521
15760
  if (event) {
@@ -15583,8 +15822,8 @@ var Methods$1 = {
15583
15822
  // 根据表格选中状态,给头部复现框赋值状态(全选,半选,未选)
15584
15823
  checkSelectionStatus: function checkSelectionStatus() {
15585
15824
  var afterFullData = this.afterFullData, selection = this.selection, treeIndeterminates = this.treeIndeterminates;
15586
- var _ref245 = this.selectConfig || {}, checkField = _ref245.checkField, checkMethod = _ref245.checkMethod;
15587
- var _ref246 = {}, everyHandler = _ref246.everyHandler, someHandler = _ref246.someHandler;
15825
+ var _ref244 = this.selectConfig || {}, checkField = _ref244.checkField, checkMethod = _ref244.checkMethod;
15826
+ var _ref245 = {}, everyHandler = _ref245.everyHandler, someHandler = _ref245.someHandler;
15588
15827
  if (checkField) {
15589
15828
  everyHandler = checkMethod ? function(row2, rowIndex) {
15590
15829
  return !checkMethod({
@@ -15633,7 +15872,7 @@ var Methods$1 = {
15633
15872
  // 保留选中状态
15634
15873
  reserveCheckSelection: function reserveCheckSelection() {
15635
15874
  var fullDataRowIdData = this.fullDataRowIdData, selection = this.selection;
15636
- var _ref247 = this.selectConfig || {}, reserve = _ref247.reserve;
15875
+ var _ref246 = this.selectConfig || {}, reserve = _ref246.reserve;
15637
15876
  var rowkey = getRowkey(this);
15638
15877
  if (reserve && selection.length) {
15639
15878
  this.selection = selection.map(function(row2) {
@@ -15661,7 +15900,7 @@ var Methods$1 = {
15661
15900
  },
15662
15901
  clearSelection: function clearSelection() {
15663
15902
  var tableFullData = this.tableFullData, treeConfig = this.treeConfig;
15664
- var _ref248 = this.selectConfig || {}, checkField = _ref248.checkField;
15903
+ var _ref247 = this.selectConfig || {}, checkField = _ref247.checkField;
15665
15904
  if (checkField) {
15666
15905
  treeConfig ? eachTree(tableFullData, function(item) {
15667
15906
  return set(item, checkField, false);
@@ -15787,9 +16026,9 @@ var Checkbox = {
15787
16026
  };
15788
16027
  var Methods = {
15789
16028
  // 展开树节点事件
15790
- triggerTreeExpandEvent: function triggerTreeExpandEvent(event, _ref249) {
16029
+ triggerTreeExpandEvent: function triggerTreeExpandEvent(event, _ref248) {
15791
16030
  var _this84 = this;
15792
- var row2 = _ref249.row;
16031
+ var row2 = _ref248.row;
15793
16032
  var currentColumn = this.currentColumn, currentRow = this.currentRow;
15794
16033
  var rest = this.toggleTreeExpansion(row2);
15795
16034
  var eventParams = {