@opentinyvue/vue-grid 2.27.0 → 2.29.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';
@@ -295,6 +295,8 @@ var GlobalConfig$1 = {
295
295
  defaultTreeSpacing: 30,
296
296
  rowId: "_RID",
297
297
  // 行数据的唯一主键字段名
298
+ $rowIndex: Symbol("$rowIndex"),
299
+ // 虚拟滚动处理后的行索引
298
300
  version: 0,
299
301
  // 版本号,对于某些带数据缓存的功能有用到,上升版本号可以用于重置数据
300
302
  optimization: {
@@ -1833,7 +1835,7 @@ var useData = function useData2(props) {
1833
1835
  }], function(_ref15) {
1834
1836
  _ref15[0]; var length = _ref15[1];
1835
1837
  tiledLength.value = length;
1836
- $table == null ? void 0 : $table.handleDataChange();
1838
+ $table.updateRawData(props.data);
1837
1839
  });
1838
1840
  return {
1839
1841
  tiledLength
@@ -1856,7 +1858,7 @@ var calcHeader = function calcHeader2(collectColumn2) {
1856
1858
  levelMap.set(item, level);
1857
1859
  _traverseTree(item.children, level + 1, item);
1858
1860
  });
1859
- } else {
1861
+ } else if (parent) {
1860
1862
  leafColumns.push(parent);
1861
1863
  }
1862
1864
  };
@@ -1942,12 +1944,12 @@ var useHeader = function useHeader2(props, bodyVm, headerRowHeight) {
1942
1944
  };
1943
1945
  };
1944
1946
  var getEventSource = function getEventSource2(e, $table) {
1945
- var _tableEl$dataset, _$table$getColumnNode, _rowEl$dataset, _rowEl$dataset$rowid;
1947
+ var _tableEl$dataset, _$table$getColumnNode, _rowEl$dataset, _rowid;
1946
1948
  var target = e.target;
1947
1949
  var tableEl = target.closest(".tiny-grid__body");
1948
1950
  if (((_tableEl$dataset = tableEl.dataset) == null ? void 0 : _tableEl$dataset.tableid) !== String($table.id)) return;
1949
1951
  var cellEl = target.closest(".tiny-grid-header__column");
1950
- var rowEl, part, rowType, row2, column;
1952
+ var rowEl, part, rowType, row2, column, rowid2;
1951
1953
  if (cellEl) {
1952
1954
  rowEl = cellEl.parentNode;
1953
1955
  part = "header";
@@ -1960,12 +1962,17 @@ var getEventSource = function getEventSource2(e, $table) {
1960
1962
  }
1961
1963
  if (!part || !cellEl || !rowEl) return;
1962
1964
  column = (_$table$getColumnNode = $table.getColumnNode(cellEl)) == null ? void 0 : _$table$getColumnNode.item;
1963
- if ((_rowEl$dataset = rowEl.dataset) != null && (_rowEl$dataset$rowid = _rowEl$dataset.rowid) != null && _rowEl$dataset$rowid.startsWith("row_g_")) {
1965
+ rowid2 = (_rowEl$dataset = rowEl.dataset) == null ? void 0 : _rowEl$dataset.rowid;
1966
+ if ((_rowid = rowid2) != null && _rowid.startsWith("row_g_")) {
1964
1967
  rowType = "virtual";
1965
1968
  } else if (part === "body") {
1966
- var _$table$getRowNode;
1967
1969
  rowType = "normal";
1968
- row2 = (_$table$getRowNode = $table.getRowNode(rowEl)) == null ? void 0 : _$table$getRowNode.item;
1970
+ if ($table.editStore.insertMap.has(rowid2)) {
1971
+ row2 = $table.editStore.insertMap.get(rowid2);
1972
+ } else {
1973
+ var _$table$getRowNode;
1974
+ row2 = (_$table$getRowNode = $table.getRowNode(rowEl)) == null ? void 0 : _$table$getRowNode.item;
1975
+ }
1969
1976
  }
1970
1977
  return {
1971
1978
  part,
@@ -2308,9 +2315,9 @@ var useCellSpan = function useCellSpan2(bodyVm, bodyProps) {
2308
2315
  var leftList = columnStore.leftList, rightList = columnStore.rightList;
2309
2316
  var normalState = {};
2310
2317
  var normalTable = [];
2311
- for (var $rowIndex = 0; $rowIndex < tableData.length; $rowIndex++) {
2312
- var row2 = tableData[$rowIndex];
2313
- var rowLevel = tableNode[$rowIndex].level;
2318
+ for (var _index4 = 0; _index4 < tableData.length; _index4++) {
2319
+ var row2 = tableData[_index4];
2320
+ var rowLevel = tableNode[_index4].level;
2314
2321
  var rowIndex = $table.getRowIndex(row2);
2315
2322
  var virtualRow = false;
2316
2323
  if (hasVirtualRow) {
@@ -2320,7 +2327,7 @@ var useCellSpan = function useCellSpan2(bodyVm, bodyProps) {
2320
2327
  if (!isSkipRowRender) {
2321
2328
  seqCount.value = seqCount.value + 1;
2322
2329
  }
2323
- var seq = isOrdered ? seqCount.value : $rowIndex + 1;
2330
+ var seq = isOrdered ? seqCount.value : _index4 + 1;
2324
2331
  if (scrollYLoad) {
2325
2332
  seq += startIndex;
2326
2333
  }
@@ -2335,7 +2342,7 @@ var useCellSpan = function useCellSpan2(bodyVm, bodyProps) {
2335
2342
  $table,
2336
2343
  data: tableData,
2337
2344
  row: row2,
2338
- $rowIndex,
2345
+ $rowIndex: row2[GlobalConfig$1.$rowIndex],
2339
2346
  rowIndex,
2340
2347
  level: rowLevel,
2341
2348
  $seq: "",
@@ -2544,6 +2551,69 @@ var adjustColspan = function adjustColspan2(table, pos, isLeft) {
2544
2551
  }
2545
2552
  }
2546
2553
  };
2554
+ var useNormalData = function useNormalData2(_ref34) {
2555
+ var _hooks$getCurrentInst4;
2556
+ var props = _ref34.props, tableFullColumn = _ref34.tableFullColumn;
2557
+ var $table = (_hooks$getCurrentInst4 = hooks.getCurrentInstance()) == null ? void 0 : _hooks$getCurrentInst4.proxy;
2558
+ var rawData = hooks.ref([]);
2559
+ var rawDataVersion = hooks.ref(0);
2560
+ var editorColumns = hooks.ref([]);
2561
+ var editorColumnKey = hooks.ref("");
2562
+ hooks.watch(tableFullColumn, function(_tableFullColumn) {
2563
+ var columns2 = [];
2564
+ var columnKeys = [];
2565
+ for (var i = 0; i < _tableFullColumn.length; i++) {
2566
+ var column = _tableFullColumn[i];
2567
+ if (column.property && column.editor) {
2568
+ columns2.push(column);
2569
+ columnKeys.push(column.propety);
2570
+ }
2571
+ }
2572
+ var keyString = columnKeys.sort().join();
2573
+ if (editorColumnKey.value !== keyString) {
2574
+ editorColumnKey.value = keyString;
2575
+ editorColumns.value = columns2;
2576
+ }
2577
+ });
2578
+ hooks.watch(editorColumns, function(_editorColumns) {
2579
+ if (props.editConfig && _editorColumns.length > 0) {
2580
+ var _insertData = $table.editStore.insertList || [];
2581
+ var _rawData = rawData.value || [];
2582
+ var _data = [].concat(_insertData, _rawData);
2583
+ if (Array.isArray(_data)) {
2584
+ _data.forEach(function(row2) {
2585
+ return $table.defineField(row2, false, _editorColumns, true);
2586
+ });
2587
+ }
2588
+ }
2589
+ });
2590
+ hooks.watch(rawData, function(_rawData) {
2591
+ var _editorColumns = editorColumns.value;
2592
+ if (props.editConfig && _editorColumns.length > 0) {
2593
+ var _data = _rawData || [];
2594
+ if (Array.isArray(_data)) {
2595
+ _data.forEach(function(row2) {
2596
+ return $table.defineField(row2, false, _editorColumns);
2597
+ });
2598
+ }
2599
+ }
2600
+ rawDataVersion.value += 1;
2601
+ });
2602
+ hooks.watch(rawDataVersion, function() {
2603
+ var optimizeOpts = $table.optimizeOpts;
2604
+ var scrollY = optimizeOpts.scrollY;
2605
+ var _rawData = rawData.value || [];
2606
+ var tableFullData = Array.isArray(_rawData) ? _rawData.slice(0) : [];
2607
+ $table.tableFullData = tableFullData;
2608
+ $table.scrollYLoad = scrollY && scrollY.gt > 0 && scrollY.gt <= tableFullData.length;
2609
+ $table.updateCache(true, props.saveSource === "deep");
2610
+ $table.handleDataChange();
2611
+ });
2612
+ return {
2613
+ rawData,
2614
+ rawDataVersion
2615
+ };
2616
+ };
2547
2617
  var toRaw = hooks.toRaw;
2548
2618
  var VIRTUAL_ROW_KEY = "_$virtual_";
2549
2619
  var difference$1 = function difference$12(arr, other) {
@@ -2643,7 +2713,7 @@ var orderingGroupBy = function orderingGroupBy2(arr, key, equals, active, rowKey
2643
2713
  };
2644
2714
  var buildRowGroupFullData = function buildRowGroupFullData2(fullData, _vm) {
2645
2715
  var treeConfig = _vm.treeConfig, rowGroup = _vm.rowGroup;
2646
- var _ref34 = rowGroup || {}, field = _ref34.field, equals = _ref34.equals, activeMethod = _ref34.activeMethod;
2716
+ var _ref35 = rowGroup || {}, field = _ref35.field, equals = _ref35.equals, activeMethod = _ref35.activeMethod;
2647
2717
  _vm.hasVirtualRow = !treeConfig && rowGroup && field && fullData.length > 0;
2648
2718
  if (_vm.hasVirtualRow) {
2649
2719
  _vm.groupFullData = orderingGroupBy(fullData, field, equals || isEqual$1, activeMethod, getRowkey(_vm));
@@ -2667,14 +2737,14 @@ var handleRowGroupFold = function handleRowGroupFold2(row2, _vm) {
2667
2737
  buildRenderGraph(_vm);
2668
2738
  _vm.handleTableData().then(_vm.recalculate);
2669
2739
  };
2670
- var getFixedStyle = function getFixedStyle2(_ref35, _ref36) {
2671
- var fixedDetails = _ref35.fixedDetails;
2672
- var overflowX = _ref36.overflowX;
2740
+ var getFixedStyle = function getFixedStyle2(_ref36, _ref37) {
2741
+ var fixedDetails = _ref36.fixedDetails;
2742
+ var overflowX = _ref37.overflowX;
2673
2743
  return fixedDetails && overflowX ? fixedDetails.getStyle() : {};
2674
2744
  };
2675
- var getFixedClass = function getFixedClass2(_ref37, _ref38) {
2676
- var fixedDetails = _ref37.fixedDetails;
2677
- var overflowX = _ref38.overflowX;
2745
+ var getFixedClass = function getFixedClass2(_ref38, _ref39) {
2746
+ var fixedDetails = _ref38.fixedDetails;
2747
+ var overflowX = _ref39.overflowX;
2678
2748
  return _extends({
2679
2749
  "fixed__column": fixedDetails && overflowX
2680
2750
  }, fixedDetails && overflowX ? fixedDetails.getClass() : {});
@@ -2716,9 +2786,11 @@ var updatePool = function updatePool2(array, context) {
2716
2786
  var indices = /* @__PURE__ */ new WeakMap();
2717
2787
  expires.forEach(function(item) {
2718
2788
  var view = context.idViewMap.get(item.id);
2719
- view.used = false;
2720
- context.idViewMap.delete(item.id);
2721
- context.unusedViews.push(view);
2789
+ if (view) {
2790
+ view.used = false;
2791
+ context.idViewMap.delete(item.id);
2792
+ context.unusedViews.push(view);
2793
+ }
2722
2794
  });
2723
2795
  array.forEach(function(item, i) {
2724
2796
  indices.set(item, i);
@@ -2745,6 +2817,34 @@ var updatePool = function updatePool2(array, context) {
2745
2817
  });
2746
2818
  return context;
2747
2819
  };
2820
+ function addTableDataRowIndex(rowPool) {
2821
+ var treeTableData = [];
2822
+ var $rowIndex = GlobalConfig$1.$rowIndex;
2823
+ var tempChildren = Symbol("tempChildren");
2824
+ rowPool.forEach(function(rowPoolItem) {
2825
+ var _rowPoolItem$item = rowPoolItem.item, row2 = _rowPoolItem$item.payload, level = _rowPoolItem$item.level, parentNode = _rowPoolItem$item.parentNode, used = rowPoolItem.used;
2826
+ if (!used) {
2827
+ return;
2828
+ }
2829
+ if (level === 0) {
2830
+ treeTableData.push(row2);
2831
+ row2[$rowIndex] = treeTableData.length - 1;
2832
+ return;
2833
+ }
2834
+ var parent = parentNode == null ? void 0 : parentNode.payload;
2835
+ if (!parent) {
2836
+ return;
2837
+ }
2838
+ if (!parent[tempChildren]) {
2839
+ parent[tempChildren] = [];
2840
+ }
2841
+ parent[tempChildren].push(row2);
2842
+ row2[$rowIndex] = parent[tempChildren].length - 1;
2843
+ });
2844
+ rowPool.forEach(function(rowPoolItem) {
2845
+ delete rowPoolItem.item.payload[tempChildren];
2846
+ });
2847
+ }
2748
2848
  var usePool = function usePool2(props) {
2749
2849
  var columnPool = hooks.ref([]);
2750
2850
  var rowPool = hooks.ref([]);
@@ -2771,6 +2871,7 @@ var usePool = function usePool2(props) {
2771
2871
  rowContext = createPool(props.tableNode);
2772
2872
  }
2773
2873
  rowPool.value = ((_rowContext = rowContext) == null ? void 0 : _rowContext.pool) || rowPool.value;
2874
+ addTableDataRowIndex(rowPool.value);
2774
2875
  isNoData.value = !(((_props$tableNode = props.tableNode) == null ? void 0 : _props$tableNode.length) > 0);
2775
2876
  });
2776
2877
  return {
@@ -2801,21 +2902,21 @@ var renderBorder = function renderBorder2(type) {
2801
2902
  "class": "tiny-grid-border-left"
2802
2903
  })]);
2803
2904
  };
2804
- function renderColumn(_ref39) {
2805
- var _normalRows$rowid, _ref41;
2806
- 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;
2905
+ function renderColumn(_ref40) {
2906
+ var _normalRows$rowid, _ref42;
2907
+ 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;
2807
2908
  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;
2808
2909
  var height2 = $table.height, rowId = $table.rowId, scrollXLoad = $table.scrollXLoad, scrollYLoad = $table.scrollYLoad, validOpts2 = $table.validOpts, validStore = $table.validStore, validatedMap = $table.validatedMap;
2809
2910
  var normalRows = _vm.normalRows;
2810
- var _ref40 = ((_normalRows$rowid = normalRows[rowid2]) == null ? void 0 : _normalRows$rowid[column.id]) || {}, _ref40$attrs = _ref40.attrs, attrs = _ref40$attrs === void 0 ? {
2911
+ var _ref41 = ((_normalRows$rowid = normalRows[rowid2]) == null ? void 0 : _normalRows$rowid[column.id]) || {}, _ref41$attrs = _ref41.attrs, attrs = _ref41$attrs === void 0 ? {
2811
2912
  rowspan: 1,
2812
2913
  colspan: 1,
2813
2914
  visible: true
2814
- } : _ref40$attrs, _ref40$params = _ref40.params, params = _ref40$params === void 0 ? {
2915
+ } : _ref41$attrs, _ref41$params = _ref41.params, params = _ref41$params === void 0 ? {
2815
2916
  $table,
2816
2917
  row: row2,
2817
2918
  column
2818
- } : _ref40$params;
2919
+ } : _ref41$params;
2819
2920
  var isMessageDefault = validOpts2.isMessageDefault, isMessageInline = validOpts2.isMessageInline, highlightError = validOpts2.highlightError;
2820
2921
  var actived = editStore.actived;
2821
2922
  var validated = validatedMap[column.id + "-" + row2[rowId]];
@@ -2845,7 +2946,7 @@ function renderColumn(_ref39) {
2845
2946
  "rowspan": attrs.rowspan > 1 ? attrs.rowspan : void 0,
2846
2947
  "colspan": attrs.colspan > 1 ? attrs.colspan : void 0
2847
2948
  },
2848
- "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__highlight-error"] = highlightError && validated, _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 || ""]
2949
+ "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 || ""]
2849
2950
  }, [[
2850
2951
  // 行拖拽手柄
2851
2952
  dropConfig.rowHandle === "index" && column.type === "index" ? h("div", {
@@ -2892,9 +2993,9 @@ function renderHeaderRows(_vm) {
2892
2993
  $table,
2893
2994
  $rowIndex
2894
2995
  }) : headerRowClassName : ""]
2895
- }, [cols.map(function(_ref42, $columnIndex) {
2896
- var _column$children, _ref43;
2897
- var id3 = _ref42.id, column = _ref42.column, colspan = _ref42.colspan, rowspan = _ref42.rowspan, height2 = _ref42.height, top = _ref42.top;
2996
+ }, [cols.map(function(_ref43, $columnIndex) {
2997
+ var _column$children, _ref44;
2998
+ var id3 = _ref43.id, column = _ref43.column, colspan = _ref43.colspan, rowspan = _ref43.rowspan, height2 = _ref43.height, top = _ref43.top;
2898
2999
  var isColGroup = (_column$children = column.children) == null ? void 0 : _column$children.length;
2899
3000
  var headerAlign = column.headerAlign, align = column.align, headerClassName = column.headerClassName;
2900
3001
  var _getConfigOverflow3 = getConfigOverflow(column, $table), headerTip = _getConfigOverflow3.headerTip, headerOverflowTitle = _getConfigOverflow3.headerOverflowTitle, headerOverflowTooltip = _getConfigOverflow3.headerOverflowTooltip, headerOverflowEllipsis = _getConfigOverflow3.headerOverflowEllipsis, headerOverflowHint = _getConfigOverflow3.headerOverflowHint;
@@ -2925,7 +3026,7 @@ function renderHeaderRows(_vm) {
2925
3026
  top: top + "px",
2926
3027
  zIndex: column.fixed ? 20 : 10
2927
3028
  }],
2928
- "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)]
3029
+ "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)]
2929
3030
  }, [[
2930
3031
  !isColGroup && !(isBoolean(column.resizable) ? column.resizable : resizable) && column.type !== "index" ? h("div", {
2931
3032
  "class": {
@@ -2981,20 +3082,20 @@ function renderFooterRows(_vm) {
2981
3082
  $table,
2982
3083
  $rowIndex
2983
3084
  }) : footerRowClassName : ""]
2984
- }, [columnPool.map(function(_ref44, $columnIndex) {
2985
- var _footerRows$$rowIndex, _ref46;
2986
- var id3 = _ref44.id, column = _ref44.item, used = _ref44.used;
3085
+ }, [columnPool.map(function(_ref45, $columnIndex) {
3086
+ var _footerRows$$rowIndex, _ref47;
3087
+ var id3 = _ref45.id, column = _ref45.item, used = _ref45.used;
2987
3088
  var footerAlign = column.footerAlign, align = column.align, footerClassName = column.footerClassName;
2988
3089
  var ftAlign = footerAlign || align || allFooterAlign || allAlign;
2989
3090
  var _getConfigOverflow4 = getConfigOverflow(column, $table), cellOverflowHint = _getConfigOverflow4.cellOverflowHint;
2990
- var _ref45 = ((_footerRows$$rowIndex = footerRows[$rowIndex]) == null ? void 0 : _footerRows$$rowIndex[column.id]) || {}, _ref45$attrs = _ref45.attrs, attrs = _ref45$attrs === void 0 ? {
3091
+ var _ref46 = ((_footerRows$$rowIndex = footerRows[$rowIndex]) == null ? void 0 : _footerRows$$rowIndex[column.id]) || {}, _ref46$attrs = _ref46.attrs, attrs = _ref46$attrs === void 0 ? {
2991
3092
  rowspan: 1,
2992
3093
  colspan: 1,
2993
3094
  visible: true
2994
- } : _ref45$attrs, _ref45$params = _ref45.params, params = _ref45$params === void 0 ? {
3095
+ } : _ref46$attrs, _ref46$params = _ref46.params, params = _ref46$params === void 0 ? {
2995
3096
  $table,
2996
3097
  column
2997
- } : _ref45$params;
3098
+ } : _ref46$params;
2998
3099
  var rowspan = (attrs == null ? void 0 : attrs.rowspan) || 1;
2999
3100
  var tdBottom = trBottom - (rowspan > 1 ? (rowspan - 1) * rowHeight : 0);
3000
3101
  params.$columnIndex = $columnIndex;
@@ -3011,7 +3112,7 @@ function renderFooterRows(_vm) {
3011
3112
  zIndex: column.fixed ? 20 : 10,
3012
3113
  display: used && attrs.visible ? void 0 : "none"
3013
3114
  }],
3014
- "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 || ""]
3115
+ "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 || ""]
3015
3116
  }, [h("div", {
3016
3117
  "class": {
3017
3118
  "tiny-grid-cell": true,
@@ -3028,24 +3129,21 @@ function renderRows(_vm) {
3028
3129
  var expandMethod = expandConfig.activeMethod;
3029
3130
  var startIndex = scrollYStore.startIndex;
3030
3131
  var isOrdered = treeConfig ? !!treeOrdered : false;
3031
- var _ref47 = treeConfig || {}, hideMethod = _ref47.hideMethod;
3132
+ var _ref48 = treeConfig || {}, hideMethod = _ref48.hideMethod;
3032
3133
  var actived = editStore.actived;
3033
3134
  var rows = [];
3034
3135
  var seqCount = {
3035
3136
  value: 0
3036
3137
  };
3037
3138
  var $seq = "";
3038
- var lastVisibleIndex = rowPool.findLastIndex(function(_ref48) {
3039
- var used = _ref48.used;
3040
- return Boolean(used);
3041
- });
3042
- rowPool.forEach(function(_ref49, $rowIndex) {
3139
+ rowPool.forEach(function(_ref49) {
3043
3140
  var id3 = _ref49.id, _ref49$item = _ref49.item, row2 = _ref49$item.payload, rowLevel = _ref49$item.level, used = _ref49.used;
3044
3141
  var rowActived = editConfig && actived.row === row2;
3045
3142
  var virtualRow = isVirtualRow(row2);
3046
3143
  var isSkipRowRender = hideMethod && hideMethod(row2, rowLevel) || virtualRow;
3047
3144
  var rowid2 = getRowid($table, row2);
3048
3145
  var rowIndex = $table.getRowIndex(row2);
3146
+ var $rowIndex = row2[GlobalConfig$1.$rowIndex];
3049
3147
  if (!isSkipRowRender) {
3050
3148
  seqCount.value = seqCount.value + 1;
3051
3149
  }
@@ -3077,8 +3175,7 @@ function renderRows(_vm) {
3077
3175
  isSkipRowRender,
3078
3176
  row: row2,
3079
3177
  rowActived,
3080
- rowClassName,
3081
- lastVisibleIndex
3178
+ rowClassName
3082
3179
  };
3083
3180
  Object.assign(args, {
3084
3181
  rowIndex,
@@ -3089,7 +3186,8 @@ function renderRows(_vm) {
3089
3186
  seq,
3090
3187
  treeConfig,
3091
3188
  used,
3092
- selectRow
3189
+ selectRow,
3190
+ scrollYLoad
3093
3191
  });
3094
3192
  renderRow(args);
3095
3193
  renderRowAfter({
@@ -3175,9 +3273,8 @@ function renderRowAfter(_ref50) {
3175
3273
  }, h);
3176
3274
  }
3177
3275
  function renderRow(args) {
3178
- var _ref51;
3179
3276
  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;
3180
- 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;
3277
+ 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, scrollYLoad = args.scrollYLoad;
3181
3278
  if (isSkipRowRender) {
3182
3279
  return;
3183
3280
  }
@@ -3191,40 +3288,43 @@ function renderRow(args) {
3191
3288
  }
3192
3289
  }
3193
3290
  var columnPool = _vm.columnPool;
3194
- rows.push(h("tr", {
3195
- "key": key,
3196
- "attrs": {
3197
- "data-rowid": rowid2,
3198
- "data-rowindex": $rowIndex,
3199
- "data-rowlevel": rowLevel
3200
- },
3201
- "style": {
3202
- display: used ? void 0 : "none"
3203
- },
3204
- "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({
3205
- $table,
3206
- $seq,
3207
- seq,
3208
- fixedType: void 0,
3209
- rowLevel,
3210
- row: row2,
3211
- rowIndex,
3212
- $rowIndex
3213
- }) : rowClassName : ""]
3214
- }, [columnPool.map(function(_ref52, $columnIndex) {
3215
- var id4 = _ref52.id, column = _ref52.item, used2 = _ref52.used;
3216
- return renderColumn({
3217
- $columnIndex,
3218
- $table,
3219
- _vm,
3220
- column,
3221
- id: id4,
3222
- row: row2,
3223
- rowid: rowid2,
3224
- seq,
3225
- used: used2
3226
- });
3227
- })]));
3291
+ if (used || scrollYLoad) {
3292
+ var _ref51;
3293
+ rows.push(h("tr", {
3294
+ "key": key,
3295
+ "attrs": {
3296
+ "data-rowid": rowid2,
3297
+ "data-rowindex": $rowIndex,
3298
+ "data-rowlevel": rowLevel
3299
+ },
3300
+ "style": {
3301
+ display: used ? void 0 : "none"
3302
+ },
3303
+ "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({
3304
+ $table,
3305
+ $seq,
3306
+ seq,
3307
+ fixedType: void 0,
3308
+ rowLevel,
3309
+ row: row2,
3310
+ rowIndex,
3311
+ $rowIndex
3312
+ }) : rowClassName : ""]
3313
+ }, [columnPool.map(function(_ref52, $columnIndex) {
3314
+ var id4 = _ref52.id, column = _ref52.item, used2 = _ref52.used;
3315
+ return renderColumn({
3316
+ $columnIndex,
3317
+ $table,
3318
+ _vm,
3319
+ column,
3320
+ id: id4,
3321
+ row: row2,
3322
+ rowid: rowid2,
3323
+ seq,
3324
+ used: used2
3325
+ });
3326
+ })]));
3327
+ }
3228
3328
  }
3229
3329
  function renderRowGroupTds(_ref53) {
3230
3330
  var $table = _ref53.$table, closeable = _ref53.closeable, render19 = _ref53.render, renderGroupCell = _ref53.renderGroupCell, row2 = _ref53.row, tds = _ref53.tds, title = _ref53.title, _vm = _ref53._vm;
@@ -3440,9 +3540,9 @@ var Body = defineComponent({
3440
3540
  footerData: Array
3441
3541
  },
3442
3542
  setup: function setup3(props, _ref57) {
3443
- var _hooks$getCurrentInst4;
3543
+ var _hooks$getCurrentInst5;
3444
3544
  var slots = _ref57.slots;
3445
- var vm = (_hooks$getCurrentInst4 = hooks.getCurrentInstance()) == null ? void 0 : _hooks$getCurrentInst4.proxy;
3545
+ var vm = (_hooks$getCurrentInst5 = hooks.getCurrentInstance()) == null ? void 0 : _hooks$getCurrentInst5.proxy;
3446
3546
  var $table = vm == null ? void 0 : vm.$parent;
3447
3547
  var rowHeight = hooks.computed(function() {
3448
3548
  return $table.rowHeight;
@@ -3595,8 +3695,6 @@ var Body = defineComponent({
3595
3695
  "no-data": isNoData && $table.isShapeTable
3596
3696
  },
3597
3697
  "style": {
3598
- "--body-container-scroll-height": containerScrollHeight + "px",
3599
- "--body-container-scroll-width": containerScrollWidth + "px",
3600
3698
  height: bodyWrapperHeight ? bodyWrapperHeight + "px" : void 0,
3601
3699
  minHeight: bodyWrapperMinHeight ? bodyWrapperMinHeight + "px" : void 0,
3602
3700
  maxHeight: bodyWrapperMaxHeight ? bodyWrapperMaxHeight + "px" : void 0
@@ -4081,14 +4179,15 @@ var Panel$1 = defineComponent({
4081
4179
  }
4082
4180
  if (this.visible) {
4083
4181
  setTimeout(function() {
4182
+ var _this4$$grid;
4084
4183
  var _this4$filterStore = _this4.filterStore, targetElemParentTr = _this4$filterStore.targetElemParentTr, id3 = _this4$filterStore.id;
4085
4184
  var reference = targetElemParentTr && targetElemParentTr.querySelector("svg.tiny-grid-filter__btn." + id3);
4086
4185
  var popper = _this4.$el;
4087
4186
  popper.style.zIndex = PopupManager.nextZIndex();
4088
- _this4.popperJS = new PopperJS(reference, popper, {
4187
+ _this4.popperJS = new PopperJS(reference, popper, _extends({
4089
4188
  placement: "bottom-end",
4090
4189
  gpuAcceleration: false
4091
- });
4190
+ }, ((_this4$$grid = _this4.$grid) == null ? void 0 : _this4$$grid.filterPopperOptions) || {}));
4092
4191
  popper.style.display = "block";
4093
4192
  });
4094
4193
  }
@@ -5671,11 +5770,11 @@ function getColumnRuleTypeOther(_ref94) {
5671
5770
  var $table = _ref94.$table, _vm = _ref94._vm, colProps = _ref94.colProps, editor = _ref94.editor, filter2 = _ref94.filter, isTreeNode = _ref94.isTreeNode, renMaps = _ref94.renMaps, type = _ref94.type;
5672
5771
  return {
5673
5772
  match: function match() {
5674
- return !~["index", "radio", "selection", "expand", "operation"].indexOf(type);
5773
+ return !["index", "radio", "selection", "expand", "operation"].includes(type);
5675
5774
  },
5676
5775
  action: function action() {
5677
5776
  var sortable = colProps.sortable, remoteSort = colProps.remoteSort;
5678
- var isSortable = $table.sortable && (type ? false : sortable);
5777
+ var isSortable = $table.sortable && sortable;
5679
5778
  var isSortColumn = isSortable || remoteSort;
5680
5779
  if (editor) {
5681
5780
  renMaps.renderHeader = _vm.renderEditHeader;
@@ -5802,6 +5901,7 @@ var Cell = {
5802
5901
  var $table = params.$table, row2 = params.row, column = params.column;
5803
5902
  var slots = column.slots, renderer = column.renderer;
5804
5903
  var format = column.format || {};
5904
+ $table.columnSlotsWeakMap || ($table.columnSlotsWeakMap = /* @__PURE__ */ new WeakMap());
5805
5905
  if (slots && slots.default) {
5806
5906
  return slots.default(params, h2);
5807
5907
  }
@@ -6403,7 +6503,7 @@ var Cell = {
6403
6503
  return renderBig(buttonConfig, viewClass);
6404
6504
  });
6405
6505
  var scopedSlots = {
6406
- default: function _default28() {
6506
+ default: function _default29() {
6407
6507
  return h2(iconEllipsis(), {
6408
6508
  class: "tiny-grid__oper-col-elps"
6409
6509
  });
@@ -7645,7 +7745,7 @@ var Methods$d = {
7645
7745
  _this16.tableData = [];
7646
7746
  _this16.cellStatus.clear();
7647
7747
  _this16.clearValidateMap();
7648
- return _this16.loadTableData(data7 || _this16.tableFullData);
7748
+ return _this16.updateRawData(data7 || _this16.tableFullData);
7649
7749
  };
7650
7750
  return this.$nextTick().then(next);
7651
7751
  },
@@ -7697,18 +7797,10 @@ var Methods$d = {
7697
7797
  // 全量加载表格数据
7698
7798
  loadTableData: function loadTableData(datas, notRefresh) {
7699
7799
  var _this18 = this;
7700
- var editStore = this.editStore, height2 = this.height, maxHeight = this.maxHeight, lastScrollLeft = this.lastScrollLeft, lastScrollTop = this.lastScrollTop, optimizeOpts = this.optimizeOpts;
7701
- var scrollY = optimizeOpts.scrollY;
7702
- var tableFullData = isArray(datas) ? datas.slice(0) : [];
7703
- var scrollYLoad = scrollY && scrollY.gt > 0 && scrollY.gt <= tableFullData.length;
7800
+ var editStore = this.editStore, height2 = this.height, maxHeight = this.maxHeight, lastScrollLeft = this.lastScrollLeft, lastScrollTop = this.lastScrollTop, scrollYLoad = this.scrollYLoad;
7704
7801
  editStore.insertList = [];
7802
+ editStore.insertMap = /* @__PURE__ */ new Map();
7705
7803
  editStore.removeList = [];
7706
- Object.assign(this, {
7707
- tableFullData,
7708
- tableSynchData: datas,
7709
- scrollYLoad
7710
- });
7711
- this.updateCache(true, true);
7712
7804
  if (scrollYLoad && !(height2 || maxHeight)) {
7713
7805
  error("ui.grid.error.scrollYHeight");
7714
7806
  }
@@ -7724,31 +7816,51 @@ var Methods$d = {
7724
7816
  lastScrollTop
7725
7817
  });
7726
7818
  }
7819
+ }).then(function() {
7820
+ var _this18$resolveMap$lo;
7821
+ if (((_this18$resolveMap$lo = _this18.resolveMap.loadDataResolve) == null ? void 0 : _this18$resolveMap$lo.data) === datas) {
7822
+ _this18.resolveMap.loadDataResolve.resolveQueue.forEach(function(resolve) {
7823
+ return resolve();
7824
+ });
7825
+ _this18.resolveMap.loadDataResolve = null;
7826
+ }
7727
7827
  });
7728
7828
  },
7729
7829
  // 重新加载数据
7730
7830
  reloadData: function reloadData(datas) {
7731
7831
  var _this19 = this;
7732
7832
  return this.clearAll().then(function() {
7733
- return _this19.loadTableData(datas);
7833
+ return _this19.updateRawData(datas);
7734
7834
  });
7735
7835
  },
7736
7836
  // 加载全量数据
7737
7837
  loadData: function loadData(datas) {
7738
7838
  var _this20 = this;
7739
7839
  return new Promise(function(resolve) {
7740
- _this20.loadTableData(datas);
7741
- resolve();
7840
+ _this20.updateRawData(datas);
7841
+ if (_this20.resolveMap.loadDataResolve) {
7842
+ _this20.resolveMap.loadDataResolve.data = datas;
7843
+ _this20.resolveMap.loadDataResolve.resolveQueue.push(resolve);
7844
+ } else {
7845
+ _this20.resolveMap.loadDataResolve = {
7846
+ data: datas,
7847
+ resolveQueue: [resolve]
7848
+ };
7849
+ }
7742
7850
  });
7743
7851
  },
7852
+ updateRawData: function updateRawData(datas) {
7853
+ this.rawData = datas;
7854
+ this.rawDataVersion += 1;
7855
+ },
7744
7856
  getOriginRow: function getOriginRow(row2) {
7745
- var backupMap = this.backupMap;
7746
- return backupMap.has(row2) ? backupMap.get(row2) : null;
7857
+ var rowid2 = getRowid(this, row2);
7858
+ return rowid2 ? this.rowidCacheMap.get(rowid2) : null;
7747
7859
  },
7748
7860
  setOriginRow: function setOriginRow(row2, record) {
7749
- var backupMap = this.backupMap;
7750
- if (backupMap.has(row2) && record) {
7751
- backupMap.set(row2, record);
7861
+ var rowid2 = getRowid(this, row2);
7862
+ if (rowid2 && record) {
7863
+ this.rowidCacheMap.set(rowid2, record);
7752
7864
  }
7753
7865
  },
7754
7866
  reloadRow: function reloadRow(row2, record, field) {
@@ -7822,14 +7934,14 @@ var Methods$d = {
7822
7934
  if (deepCopy === void 0) {
7823
7935
  deepCopy = false;
7824
7936
  }
7825
- var tableFullData = this.tableFullData, treeConfig = this.treeConfig, treeOrdered = this.treeOrdered;
7937
+ 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;
7826
7938
  var rowKey = getRowkey(this);
7827
7939
  var _ref157 = treeConfig || {}, childrenKey = _ref157.children, _ref157$temporaryInde = _ref157.temporaryIndex, temporaryIndex = _ref157$temporaryInde === void 0 ? "_$index_" : _ref157$temporaryInde;
7828
7940
  var isTreeOrderedFalse = treeConfig && !treeOrdered;
7829
- var backupMap = /* @__PURE__ */ new WeakMap();
7830
- this.fullDataRowIdData = {};
7831
- this.fullDataRowMap.clear();
7832
- var copyRow = function copyRow2(row2, index2, parent) {
7941
+ var fullDataRowIdData = this.fullDataRowIdData = {};
7942
+ var fullDataRowMap = this.fullDataRowMap;
7943
+ fullDataRowMap.clear();
7944
+ eachTree(tableFullData, function(row2, index2, _array, _path, parent) {
7833
7945
  var rowId = getRowid(_this23, row2);
7834
7946
  if (!rowId) {
7835
7947
  rowId = getRowUniqueId();
@@ -7840,31 +7952,78 @@ var Methods$d = {
7840
7952
  rowid: rowId,
7841
7953
  index: index2
7842
7954
  };
7843
- _this23.fullDataRowIdData[rowId] = rowCache;
7844
- _this23.fullDataRowMap.set(hooks.toRaw(row2), rowCache);
7845
- if (backup) {
7846
- var _ref158;
7847
- if (isTreeOrderedFalse) {
7848
- var parentIndex;
7849
- if (parent) {
7850
- parentIndex = get(parent, temporaryIndex);
7851
- }
7852
- set(row2, temporaryIndex, (parentIndex ? parentIndex + "." : "") + (index2 + 1));
7955
+ if (fullDataRowIdData[rowId]) {
7956
+ warn("ui.grid.error.duplicateRowId", rowId);
7957
+ }
7958
+ fullDataRowIdData[rowId] = rowCache;
7959
+ fullDataRowMap.set(_this23.getRaw(row2), rowCache);
7960
+ if (isTreeOrderedFalse) {
7961
+ var parentIndex;
7962
+ if (parent) {
7963
+ parentIndex = get(parent, temporaryIndex);
7853
7964
  }
7854
- var childrenField = treeConfig ? (_ref158 = {}, _ref158[childrenKey] = void 0, _ref158) : {};
7855
- var backupRow = deepCopy ? clone(_extends({}, row2, childrenField), true) : _extends({}, row2, childrenField);
7856
- backupMap.set(row2, backupRow);
7857
- return backupRow;
7965
+ set(row2, temporaryIndex, (parentIndex ? parentIndex + "." : "") + (index2 + 1));
7858
7966
  }
7859
- };
7860
- var backupData = dfsCopy(tableFullData, copyRow, void 0, treeConfig, childrenKey);
7861
- if (backup) {
7862
- Object.assign(this, {
7863
- tableSourceData: backupData,
7864
- backupMap
7967
+ }, treeConfig);
7968
+ if (backup && (editConfig || saveSource)) {
7969
+ requestIdleCallback(function() {
7970
+ var rowidCacheMap = /* @__PURE__ */ new Map();
7971
+ var callback = function callback2(row2) {
7972
+ var _extends6;
7973
+ return rowidCacheMap.set(getRowid(_this23, row2), clone(childrenKey ? _extends({}, row2, (_extends6 = {}, _extends6[childrenKey] = null, _extends6)) : _extends({}, row2), deepCopy));
7974
+ };
7975
+ eachTree(tableFullData, callback, treeConfig);
7976
+ _this23.rowidCacheMap = rowidCacheMap;
7865
7977
  });
7866
7978
  }
7867
7979
  },
7980
+ getRaw: function getRaw(object) {
7981
+ var hooks_vue = hooks;
7982
+ return !isVue2 && hooks_vue.isProxy(object) ? hooks.toRaw(object) : object;
7983
+ },
7984
+ /**
7985
+ * 递归地将 Proxy 对象(如 Vue 3 的响应式对象)转换为普通对象。
7986
+ * @param {any} data 待处理的数据
7987
+ * @returns {any} 转换后的普通对象或原始数据
7988
+ */
7989
+ deepUnwrap: function deepUnwrap(data7) {
7990
+ if (data7 === null || typeof data7 !== "object") {
7991
+ return data7;
7992
+ }
7993
+ if (data7 instanceof Map) {
7994
+ return this.cloneMapAndUnwrap(data7);
7995
+ }
7996
+ if (data7 instanceof Set) {
7997
+ return new Set(Array.from(data7).map(this.deepUnwrap));
7998
+ }
7999
+ if (Array.isArray(data7)) {
8000
+ return data7.map(this.deepUnwrap);
8001
+ }
8002
+ var result = {};
8003
+ for (var key in data7) {
8004
+ if (Object.prototype.hasOwnProperty.call(data7, key)) {
8005
+ result[key] = this.deepUnwrap(data7[key]);
8006
+ }
8007
+ }
8008
+ return result;
8009
+ },
8010
+ /**
8011
+ * 复制 Map,并递归地将 Map 的值中包含的 Proxy 转换为普通对象。
8012
+ * @param {Map<any, any>} originalMap 原始 Map
8013
+ * @returns {Map<any, any>} 复制并解包后的新 Map
8014
+ */
8015
+ cloneMapAndUnwrap: function cloneMapAndUnwrap(originalMap) {
8016
+ if (!(originalMap instanceof Map)) {
8017
+ return originalMap;
8018
+ }
8019
+ var newMap = /* @__PURE__ */ new Map();
8020
+ for (var _iterator0 = _createForOfIteratorHelperLoose(originalMap.entries()), _step0; !(_step0 = _iterator0()).done; ) {
8021
+ var _step0$value = _step0.value, key = _step0$value[0], value = _step0$value[1];
8022
+ var unwrappedValue = this.deepUnwrap(value);
8023
+ newMap.set(key, unwrappedValue);
8024
+ }
8025
+ return newMap;
8026
+ },
7868
8027
  // 更新列的 Map
7869
8028
  cacheColumnMap: function cacheColumnMap(options) {
7870
8029
  var fullColumnMap = this.fullColumnMap;
@@ -7892,9 +8051,7 @@ var Methods$d = {
7892
8051
  return null;
7893
8052
  },
7894
8053
  getColumnNode: function getColumnNode(cell) {
7895
- if (!cell) {
7896
- return null;
7897
- }
8054
+ if (!cell) return null;
7898
8055
  var fullColumnIdData = this.fullColumnIdData, tableFullColumn = this.tableFullColumn;
7899
8056
  var dataColid = cell.dataset.colid;
7900
8057
  var colCache = fullColumnIdData[dataColid];
@@ -7908,31 +8065,41 @@ var Methods$d = {
7908
8065
  return null;
7909
8066
  },
7910
8067
  getRowIndex: function getRowIndex(row2) {
7911
- var rawRow = hooks.toRaw(row2);
7912
8068
  var fullDataRowMap = this.fullDataRowMap;
7913
- return fullDataRowMap.has(rawRow) ? fullDataRowMap.get(rawRow).index : -1;
8069
+ row2 = this.getRaw(row2);
8070
+ return fullDataRowMap.has(row2) ? fullDataRowMap.get(row2).index : -1;
7914
8071
  },
7915
8072
  getColumnIndex: function getColumnIndex(column) {
7916
8073
  var fullColumnMap = this.fullColumnMap;
7917
- return fullColumnMap.has(column) ? fullColumnMap.get(column).index : -1;
8074
+ return fullColumnMap.has(column) ? fullColumnMap.get(column).columnIndex : -1;
7918
8075
  },
7919
8076
  hasIndexColumn: function hasIndexColumn(column) {
7920
8077
  return (column == null ? void 0 : column.type) === "index";
7921
8078
  },
7922
- defineField: function defineField(row2, copy) {
7923
- if (!row2 || typeof row2 !== "object") {
7924
- return row2;
7925
- }
8079
+ defineField: function defineField(row2, copy, editorColumns, cache) {
8080
+ var _this24 = this;
8081
+ if (!row2 || typeof row2 !== "object") return row2;
7926
8082
  if (copy) {
7927
8083
  row2 = clone(row2, true);
7928
8084
  }
7929
8085
  var rowKey = getRowkey(this);
7930
- this.visibleColumn.forEach(function(_ref159) {
7931
- var property = _ref159.property, editor = _ref159.editor;
8086
+ var columns2 = editorColumns || this.visibleColumn;
8087
+ columns2.forEach(function(column) {
8088
+ var property = column.property, editor = column.editor;
7932
8089
  var propNotExist = property && !has(row2, property);
7933
8090
  var propDefaultValue = editor && !isUndefined(editor.defaultValue) ? editor.defaultValue : null;
7934
8091
  if (propNotExist) {
7935
- set(row2, property, propDefaultValue);
8092
+ if (cache) {
8093
+ var originRow = _this24.getOriginRow(row2);
8094
+ if (originRow) {
8095
+ originRow[property] = propDefaultValue;
8096
+ }
8097
+ }
8098
+ if (isVue2) {
8099
+ _this24.$set(row2, property, propDefaultValue);
8100
+ } else {
8101
+ set(row2, property, propDefaultValue);
8102
+ }
7936
8103
  }
7937
8104
  });
7938
8105
  var rowId = get(row2, rowKey);
@@ -7942,11 +8109,8 @@ var Methods$d = {
7942
8109
  return row2;
7943
8110
  },
7944
8111
  isTemporaryRow: function isTemporaryRow(row2) {
7945
- var _this24 = this;
7946
8112
  var rowid2 = getRowid(this, row2);
7947
- return find$1(this.temporaryRows, function(r) {
7948
- return rowid2 === getRowid(_this24, r);
7949
- });
8113
+ return this.editStore.insertMap.has(rowid2);
7950
8114
  },
7951
8115
  createData: function createData(records, copy) {
7952
8116
  var _this25 = this;
@@ -7986,7 +8150,7 @@ var Methods$d = {
7986
8150
  return this.$nextTick();
7987
8151
  },
7988
8152
  hasRowInsert: function hasRowInsert(row2) {
7989
- return this.editStore.insertList.includes(row2);
8153
+ return this.isTemporaryRow(row2);
7990
8154
  },
7991
8155
  compareRow: function compareRow(row2, originalRow, field) {
7992
8156
  var value = get(row2, field);
@@ -8012,20 +8176,20 @@ var Methods$d = {
8012
8176
  },
8013
8177
  hasRowChange: function hasRowChange(row2, field) {
8014
8178
  var _editConfig$insertCha;
8015
- var treeConfig = this.treeConfig, visibleColumn = this.visibleColumn, backupMap = this.backupMap, editConfig = this.editConfig;
8179
+ var treeConfig = this.treeConfig, visibleColumn = this.visibleColumn, _this$editConfig2 = this.editConfig, editConfig = _this$editConfig2 === void 0 ? {} : _this$editConfig2;
8016
8180
  var insertChanged = (_editConfig$insertCha = editConfig == null ? void 0 : editConfig.insertChanged) != null ? _editConfig$insertCha : false;
8017
8181
  var argsLength = arguments.length;
8018
8182
  var originRow;
8019
8183
  if (this.isTemporaryRow(row2)) {
8020
8184
  return insertChanged;
8021
8185
  }
8022
- var cacheRow = backupMap.get(row2);
8186
+ var cacheRow = this.getOriginRow(row2);
8023
8187
  if (cacheRow) {
8024
8188
  if (treeConfig) {
8025
- var _extends6, _extends7;
8189
+ var _extends7, _extends8;
8026
8190
  var children = treeConfig.children;
8027
- row2 = _extends({}, row2, (_extends6 = {}, _extends6[children] = null, _extends6));
8028
- originRow = _extends({}, cacheRow, (_extends7 = {}, _extends7[children] = null, _extends7));
8191
+ row2 = _extends({}, row2, (_extends7 = {}, _extends7[children] = null, _extends7));
8192
+ originRow = _extends({}, cacheRow, (_extends8 = {}, _extends8[children] = null, _extends8));
8029
8193
  } else {
8030
8194
  originRow = _extends({}, cacheRow);
8031
8195
  }
@@ -8072,7 +8236,7 @@ var Methods$d = {
8072
8236
  },
8073
8237
  // 获取表格所有数据
8074
8238
  getData: function getData(rowIndex) {
8075
- var allRows = this.data || this.tableSynchData;
8239
+ var allRows = this.rawData || [];
8076
8240
  if (!arguments.length) {
8077
8241
  return allRows.slice(0);
8078
8242
  }
@@ -8086,7 +8250,7 @@ var Methods$d = {
8086
8250
  var _this$selectConfig = this.selectConfig, selectConfig = _this$selectConfig === void 0 ? {} : _this$selectConfig, selection = this.selection;
8087
8251
  var tableFullData = this.tableFullData, treeConfig = this.treeConfig;
8088
8252
  var checkField = selectConfig.checkField;
8089
- var _ref160 = {}, _ref160$rowList = _ref160.rowList, rowList = _ref160$rowList === void 0 ? [] : _ref160$rowList;
8253
+ var _ref158 = {}, _ref158$rowList = _ref158.rowList, rowList = _ref158$rowList === void 0 ? [] : _ref158$rowList;
8090
8254
  if (checkField && treeConfig) {
8091
8255
  rowList = filterTree(tableFullData, function(row2) {
8092
8256
  return get(row2, checkField);
@@ -8115,8 +8279,8 @@ var Methods$d = {
8115
8279
  var tableData = this.tableFullData;
8116
8280
  var updateFilter = function updateFilter2(tableData2) {
8117
8281
  var remoteFilter = _this27.remoteFilter, visibleColumn = _this27.visibleColumn;
8118
- var filterColumn = visibleColumn.filter(function(_ref161) {
8119
- var filter2 = _ref161.filter;
8282
+ var filterColumn = visibleColumn.filter(function(_ref159) {
8283
+ var filter2 = _ref159.filter;
8120
8284
  return !!filter2;
8121
8285
  });
8122
8286
  return tableData2.filter(function(row2) {
@@ -8145,8 +8309,8 @@ var Methods$d = {
8145
8309
  } else {
8146
8310
  var sortedFlag = false;
8147
8311
  if (sortOpts2.multipleColumnSort) {
8148
- var sortColumns = visibleColumn.filter(function(_ref162) {
8149
- var order2 = _ref162.order;
8312
+ var sortColumns = visibleColumn.filter(function(_ref160) {
8313
+ var order2 = _ref160.order;
8150
8314
  return !!order2;
8151
8315
  });
8152
8316
  if (sortColumns.length > 1) {
@@ -8208,9 +8372,10 @@ var Methods$d = {
8208
8372
  return this.scrollLoad ? this.scrollLoad.pageSize || 10 : ((_this$_graphInfo = this._graphInfo) == null ? void 0 : _this$_graphInfo.graphed.length) || 0;
8209
8373
  },
8210
8374
  getRowById: function getRowById(rowid2) {
8211
- var fullDataRowIdData = this.fullDataRowIdData;
8212
- var rowCache = fullDataRowIdData[rowid2];
8213
- return rowCache ? rowCache.row : null;
8375
+ var _fullDataRowIdData$ro, _editStore$insertMap;
8376
+ var fullDataRowIdData = this.fullDataRowIdData, editStore = this.editStore;
8377
+ 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));
8378
+ return rowCache || null;
8214
8379
  },
8215
8380
  // 获取处理后的表格数据
8216
8381
  getTableData: function getTableData() {
@@ -8254,7 +8419,7 @@ var Methods$d = {
8254
8419
  });
8255
8420
  }
8256
8421
  if (hasCustomsOrColWidth && !isGroupOrNonSort) {
8257
- 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;
8422
+ 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;
8258
8423
  mapTree(customColumns, function(customCol) {
8259
8424
  var targetCol = find$1(fullColumn, function(item) {
8260
8425
  return customCol.property && item.property === customCol.property;
@@ -8320,7 +8485,8 @@ var Methods$d = {
8320
8485
  var options = {
8321
8486
  columnCaches: []
8322
8487
  };
8323
- var fullColumn = getColumnList(value, options);
8488
+ this.markColumnIndex = 0;
8489
+ var fullColumn = getColumnList(this, value, options);
8324
8490
  if (options.isGroup && options.hasFixed) {
8325
8491
  value.forEach(function(root) {
8326
8492
  return repairFixed(root);
@@ -8591,8 +8757,8 @@ var Methods$d = {
8591
8757
  }
8592
8758
  end && end();
8593
8759
  },
8594
- blurOutside: function blurOutside(_ref164, event) {
8595
- var row2 = _ref164.row, args = _ref164.args, column = _ref164.column;
8760
+ blurOutside: function blurOutside(_ref162, event) {
8761
+ var row2 = _ref162.row, args = _ref162.args, column = _ref162.column;
8596
8762
  var editConfig = this.editConfig, getEventTargetNode2 = this.getEventTargetNode, $el = this.$el;
8597
8763
  if (column && row2) {
8598
8764
  var editor = column.editor;
@@ -8652,7 +8818,7 @@ var Methods$d = {
8652
8818
  // 处理单选框默认勾选
8653
8819
  handleRadioDefChecked: function handleRadioDefChecked() {
8654
8820
  var fullDataRowIdData = this.fullDataRowIdData;
8655
- var _ref165 = this.radioConfig || {}, checkRowKey = _ref165.checkRowKey;
8821
+ var _ref163 = this.radioConfig || {}, checkRowKey = _ref163.checkRowKey;
8656
8822
  var rowid2 = checkRowKey && encodeURIComponent(checkRowKey);
8657
8823
  var rowCache = fullDataRowIdData[rowid2];
8658
8824
  if (rowid2 && rowCache) {
@@ -8662,7 +8828,7 @@ var Methods$d = {
8662
8828
  // 单选,行选中事件
8663
8829
  triggerRadioRowEvent: function triggerRadioRowEvent(event, params) {
8664
8830
  var selectRow = this.selectRow;
8665
- var _ref166 = this.radioConfig || {}, checkMethod = _ref166.checkMethod;
8831
+ var _ref164 = this.radioConfig || {}, checkMethod = _ref164.checkMethod;
8666
8832
  if (checkMethod && !checkMethod(params)) {
8667
8833
  return;
8668
8834
  }
@@ -8868,7 +9034,7 @@ var Methods$d = {
8868
9034
  // 点击排序事件
8869
9035
  triggerSortEvent: function triggerSortEvent(event, column, order) {
8870
9036
  var property = column.property;
8871
- var isColumnSortable = column.type ? false : column.sortable || column.remoteSort;
9037
+ var isColumnSortable = column.sortable || column.remoteSort;
8872
9038
  if (this.sortable && isColumnSortable) {
8873
9039
  var evntParams = {
8874
9040
  $table: this,
@@ -8893,7 +9059,7 @@ var Methods$d = {
8893
9059
  return item.property === field;
8894
9060
  });
8895
9061
  var isRemote = isBoolean(column.remoteSort) ? column.remoteSort : remoteSort;
8896
- var isColumnSortable = column.type ? false : column.sortable || column.remoteSort;
9062
+ var isColumnSortable = column.sortable || column.remoteSort;
8897
9063
  if (this.sortable && isColumnSortable) {
8898
9064
  if (column.order !== order) {
8899
9065
  tableFullColumn.forEach(function(column2) {
@@ -8917,8 +9083,8 @@ var Methods$d = {
8917
9083
  this.groupExpandeds.push(row2);
8918
9084
  },
8919
9085
  // 展开行事件
8920
- triggerRowExpandEvent: function triggerRowExpandEvent(event, _ref167) {
8921
- var row2 = _ref167.row;
9086
+ triggerRowExpandEvent: function triggerRowExpandEvent(event, _ref165) {
9087
+ var row2 = _ref165.row;
8922
9088
  var rest = this.toggleRowExpansion(row2);
8923
9089
  var eventParams = {
8924
9090
  $table: this,
@@ -8935,7 +9101,7 @@ var Methods$d = {
8935
9101
  // 处理默认展开行
8936
9102
  handleDefaultRowExpand: function handleDefaultRowExpand() {
8937
9103
  var fullDataRowIdData = this.fullDataRowIdData, tableFullData = this.tableFullData;
8938
- var _ref168 = this.expandConfig || {}, expandAll = _ref168.expandAll, expandRowKeys = _ref168.expandRowKeys;
9104
+ var _ref166 = this.expandConfig || {}, expandAll = _ref166.expandAll, expandRowKeys = _ref166.expandRowKeys;
8939
9105
  if (expandAll) {
8940
9106
  this.expandeds = tableFullData.slice(0);
8941
9107
  return;
@@ -8956,7 +9122,7 @@ var Methods$d = {
8956
9122
  // 设置展开行,二个参数设置这一行展开与否;支持单行;支持多行
8957
9123
  setRowExpansion: function setRowExpansion(rows, expanded) {
8958
9124
  var expandeds = this.expandeds;
8959
- var _ref169 = this.expandConfig || {}, accordion = _ref169.accordion;
9125
+ var _ref167 = this.expandConfig || {}, accordion = _ref167.accordion;
8960
9126
  var isToggle = arguments.length === 1;
8961
9127
  var isAccordionCloseAll = false;
8962
9128
  if (!rows) {
@@ -9032,7 +9198,7 @@ var Methods$d = {
9032
9198
  var scrollXStore = this.scrollXStore, visibleColumn = this.visibleColumn;
9033
9199
  var offsetSize = scrollXStore.offsetSize, renderSize = scrollXStore.renderSize, startIndex = scrollXStore.startIndex, visibleIndex = scrollXStore.visibleIndex, visibleSize = scrollXStore.visibleSize;
9034
9200
  var scrollLeft = this.$refs.tableBody.$el.scrollLeft;
9035
- 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;
9201
+ 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;
9036
9202
  for (var i = 0; i < visibleColumn.length; i++) {
9037
9203
  width += visibleColumn[i].renderWidth;
9038
9204
  if (scrollLeft < width) {
@@ -9222,7 +9388,7 @@ var Methods$d = {
9222
9388
  return this.$nextTick();
9223
9389
  },
9224
9390
  scrollToRow: function scrollToRow(row2, column, isDelay, move) {
9225
- var hasRowCache = this.fullDataRowMap.has(hooks.toRaw(row2));
9391
+ var hasRowCache = this.fullDataRowMap.has(this.getRaw(row2));
9226
9392
  var isDelayArg = isDelay || isBoolean(column);
9227
9393
  row2 && hasRowCache && rowToVisible(this, row2);
9228
9394
  return this.scrollToColumn(column, isDelayArg, move);
@@ -9363,8 +9529,8 @@ var Methods$d = {
9363
9529
  return _this44.validCellRules(type, row2, column, cellValue).then(function() {
9364
9530
  refreshStatus();
9365
9531
  _this44.clearValidate();
9366
- }).catch(function(_ref171) {
9367
- var rule = _ref171.rule;
9532
+ }).catch(function(_ref169) {
9533
+ var rule = _ref169.rule;
9368
9534
  refreshStatus();
9369
9535
  _this44.showValidTooltip({
9370
9536
  rule,
@@ -9411,8 +9577,8 @@ var Methods$d = {
9411
9577
  return fetchColumns;
9412
9578
  }
9413
9579
  tableColumn2.forEach(function(col) {
9414
- var _ref172 = col.format || {}, async = _ref172.async;
9415
- var _ref173 = async || {}, fetch = _ref173.fetch, _ref173$splitConfig = _ref173.splitConfig, splitConfig = _ref173$splitConfig === void 0 ? {} : _ref173$splitConfig;
9580
+ var _ref170 = col.format || {}, async = _ref170.async;
9581
+ var _ref171 = async || {}, fetch = _ref171.fetch, _ref171$splitConfig = _ref171.splitConfig, splitConfig = _ref171$splitConfig === void 0 ? {} : _ref171$splitConfig;
9416
9582
  if (typeof fetch === "function") {
9417
9583
  var columnValues = [];
9418
9584
  tableData.forEach(function(row2) {
@@ -9472,8 +9638,8 @@ var Methods$d = {
9472
9638
  }, this));
9473
9639
  },
9474
9640
  // Publish methods 与工具栏对接
9475
- connect: function connect(_ref174) {
9476
- var toolbar = _ref174.toolbar;
9641
+ connect: function connect(_ref172) {
9642
+ var toolbar = _ref172.toolbar;
9477
9643
  this.$toolbar = toolbar;
9478
9644
  },
9479
9645
  // 检查触发源是否属于目标节点
@@ -9498,8 +9664,8 @@ var Methods$d = {
9498
9664
  return column.order ? column.order === "asc" ? "desc" : null : "asc";
9499
9665
  },
9500
9666
  handleDataChange: function handleDataChange() {
9501
- if (Array.isArray(this.data)) {
9502
- !this._isUpdateData && this.loadTableData(this.data);
9667
+ if (Array.isArray(this.rawData)) {
9668
+ !this._isUpdateData && this.loadTableData(this.rawData);
9503
9669
  this._isUpdateData = false;
9504
9670
  }
9505
9671
  },
@@ -9533,7 +9699,7 @@ var Methods$d = {
9533
9699
  // 尝试恢复滚动位置,规范了最大滚动位置的取值
9534
9700
  attemptRestoreScroll: function attemptRestoreScroll(options) {
9535
9701
  var _this47 = this;
9536
- var _ref175 = options || this, lastScrollTop = _ref175.lastScrollTop, lastScrollLeft = _ref175.lastScrollLeft;
9702
+ var _ref173 = options || this, lastScrollTop = _ref173.lastScrollTop, lastScrollLeft = _ref173.lastScrollLeft;
9537
9703
  var scrollXLoad = this.scrollXLoad, scrollYLoad = this.scrollYLoad, elemStore = this.elemStore;
9538
9704
  var tableBodyElem = elemStore["main-body-wrapper"];
9539
9705
  if ((lastScrollTop || lastScrollLeft) && tableBodyElem) {
@@ -9805,8 +9971,8 @@ var __vue2_script$7 = defineComponent({
9805
9971
  return typeof hidden === "boolean" && hidden || typeof hidden === "function" && hidden(row2);
9806
9972
  };
9807
9973
  var handleItemClick = function handleItemClick2(name) {
9808
- var buttonConfig = visibleButtons.find(function(_ref176) {
9809
- var buttonName = _ref176.name;
9974
+ var buttonConfig = visibleButtons.find(function(_ref174) {
9975
+ var buttonName = _ref174.name;
9810
9976
  return buttonName === name;
9811
9977
  });
9812
9978
  buttonConfig.click(window.event || {}, _extends({
@@ -9839,7 +10005,7 @@ var __vue2_script$7 = defineComponent({
9839
10005
  })]);
9840
10006
  } else {
9841
10007
  var scopedSlots = {
9842
- default: function _default28() {
10008
+ default: function _default29() {
9843
10009
  return h(IconEllipsis(), {
9844
10010
  class: "mf-table-more outline-none text-base cursor-pointer"
9845
10011
  });
@@ -10621,7 +10787,7 @@ function mergeScrollDirStore(scrollDir, scrollDirStore) {
10621
10787
  }
10622
10788
  function loadStatic(data7, _vm) {
10623
10789
  if (data7 && data7.length > 0) {
10624
- _vm.loadTableData(data7, true);
10790
+ _vm.updateRawData(data7);
10625
10791
  _vm.updateStyle();
10626
10792
  }
10627
10793
  }
@@ -11025,6 +11191,7 @@ var Table = defineComponent({
11025
11191
  columns: []
11026
11192
  },
11027
11193
  insertList: [],
11194
+ insertMap: /* @__PURE__ */ new Map(),
11028
11195
  removeList: [],
11029
11196
  // 选中源
11030
11197
  selected: {
@@ -11106,15 +11273,7 @@ var Table = defineComponent({
11106
11273
  // 在编辑模式下 单元格在失去焦点验证的状态
11107
11274
  validatedMap: {},
11108
11275
  // 表格父容器的高度
11109
- parentHeight: 0,
11110
- // 水平滚动条的状态
11111
- horizonScroll: {
11112
- fixed: false,
11113
- threshold: 2,
11114
- max: 0,
11115
- isLeft: true,
11116
- isRight: false
11117
- }
11276
+ parentHeight: 0
11118
11277
  };
11119
11278
  },
11120
11279
  computed: {
@@ -11239,9 +11398,10 @@ var Table = defineComponent({
11239
11398
  // 选项式监控在vue2可以检测到顶层数组splice项替换/$set项替换
11240
11399
  // array.splice(index, 1, newItem)
11241
11400
  // this.$set(array, index, newItem)
11401
+ // 在数组中的行对象上动态添加字段也会触发此选项式监听
11242
11402
  data: function data5(array1, array2) {
11243
11403
  if (isVue2 && array1 === array2 && array1.length === array2.length) {
11244
- this.handleDataChange();
11404
+ this.updateRawData(this.data);
11245
11405
  }
11246
11406
  }
11247
11407
  },
@@ -11258,8 +11418,6 @@ var Table = defineComponent({
11258
11418
  fullColumnMap: /* @__PURE__ */ new Map(),
11259
11419
  fullDataRowIdData: {},
11260
11420
  fullDataRowMap: /* @__PURE__ */ new Map(),
11261
- // 临时插入数据集
11262
- temporaryRows: [],
11263
11421
  // 最后滚动位置
11264
11422
  lastScrollLeft: 0,
11265
11423
  lastScrollTop: 0,
@@ -11353,6 +11511,13 @@ var Table = defineComponent({
11353
11511
  // 百分比最小宽度列表集合
11354
11512
  scaleMinList: []
11355
11513
  });
11514
+ var horizonScroll = hooks.ref({
11515
+ fixed: false,
11516
+ threshold: 2,
11517
+ max: 0,
11518
+ isLeft: true,
11519
+ isRight: false
11520
+ });
11356
11521
  var bodyProps = hooks.computed(function() {
11357
11522
  return {
11358
11523
  collectColumn: collectColumn2.value,
@@ -11372,6 +11537,10 @@ var Table = defineComponent({
11372
11537
  };
11373
11538
  });
11374
11539
  var tableWrapper = hooks.ref();
11540
+ var _useNormalData = useNormalData({
11541
+ props,
11542
+ tableFullColumn
11543
+ }), rawData = _useNormalData.rawData, rawDataVersion = _useNormalData.rawDataVersion;
11375
11544
  var tinyTheme = hooks.ref(resolveTheme(props, context));
11376
11545
  var $table = hooks.getCurrentInstance().proxy;
11377
11546
  var $grid = hooks.inject("$grid", null);
@@ -11417,6 +11586,38 @@ var Table = defineComponent({
11417
11586
  columnStore
11418
11587
  });
11419
11588
  var _useData = useData(props), tiledLength = _useData.tiledLength;
11589
+ var updateFixedClasses = function updateFixedClasses2(isLeft, isRight) {
11590
+ if (!$table.$el) return;
11591
+ var el = $table.$el;
11592
+ var hasLeftClass = el.classList.contains("tiny-grid-fixed__left");
11593
+ var hasRightClass = el.classList.contains("tiny-grid-fixed__right");
11594
+ var shouldHaveLeft = !isLeft;
11595
+ var shouldHaveRight = !isRight;
11596
+ if (hasLeftClass !== shouldHaveLeft) {
11597
+ if (shouldHaveLeft) {
11598
+ el.classList.add("tiny-grid-fixed__left");
11599
+ } else {
11600
+ el.classList.remove("tiny-grid-fixed__left");
11601
+ }
11602
+ }
11603
+ if (hasRightClass !== shouldHaveRight) {
11604
+ if (shouldHaveRight) {
11605
+ el.classList.add("tiny-grid-fixed__right");
11606
+ } else {
11607
+ el.classList.remove("tiny-grid-fixed__right");
11608
+ }
11609
+ }
11610
+ };
11611
+ var resolveMap = {};
11612
+ hooks.watch(function() {
11613
+ var _horizonScroll$value, _horizonScroll$value2;
11614
+ return [(_horizonScroll$value = horizonScroll.value) == null ? void 0 : _horizonScroll$value.isLeft, (_horizonScroll$value2 = horizonScroll.value) == null ? void 0 : _horizonScroll$value2.isRight];
11615
+ }, function(_ref175) {
11616
+ var newIsLeft = _ref175[0], newIsRight = _ref175[1];
11617
+ hooks.nextTick(function() {
11618
+ return updateFixedClasses(newIsLeft, newIsRight);
11619
+ });
11620
+ });
11420
11621
  hooks.onMounted(function() {
11421
11622
  $table.addIntersectionObserver();
11422
11623
  if (tableWrapper.value) {
@@ -11424,6 +11625,18 @@ var Table = defineComponent({
11424
11625
  }
11425
11626
  hooks.nextTick(function() {
11426
11627
  $table.afterMounted = true;
11628
+ setTimeout(function() {
11629
+ if ($table.$el && $table.horizonScroll) {
11630
+ var _horizonScroll$value3, _horizonScroll$value4;
11631
+ var el = $table.$el;
11632
+ if (!((_horizonScroll$value3 = horizonScroll.value) != null && _horizonScroll$value3.isLeft)) {
11633
+ el.classList.add("tiny-grid-fixed__left");
11634
+ }
11635
+ if (!((_horizonScroll$value4 = horizonScroll.value) != null && _horizonScroll$value4.isRight)) {
11636
+ el.classList.add("tiny-grid-fixed__right");
11637
+ }
11638
+ }
11639
+ });
11427
11640
  if (props.autoResize && Grid$1._resize) {
11428
11641
  $table.bindResize();
11429
11642
  }
@@ -11447,6 +11660,7 @@ var Table = defineComponent({
11447
11660
  }
11448
11661
  unbindEvent($table);
11449
11662
  $table._tileInfo = $table._graphInfo = null;
11663
+ $table.rowidCacheMap = null;
11450
11664
  });
11451
11665
  hooks.onActivated(function() {
11452
11666
  var lastScrollLeft = $table.lastScrollLeft, lastScrollTop = $table.lastScrollTop;
@@ -11465,6 +11679,9 @@ var Table = defineComponent({
11465
11679
  unbindEvent($table);
11466
11680
  });
11467
11681
  var tableListeners = getListeners(attrs, listeners);
11682
+ var markColumnIndex = hooks.ref(0);
11683
+ var rowidCacheMap = /* @__PURE__ */ new Map();
11684
+ var columnSlotsWeakMap = /* @__PURE__ */ new WeakMap();
11468
11685
  return {
11469
11686
  slots,
11470
11687
  tableListeners,
@@ -11497,7 +11714,14 @@ var Table = defineComponent({
11497
11714
  bodyTableWidth,
11498
11715
  scrollLoadScrollHeight,
11499
11716
  columnStore,
11500
- tiledLength
11717
+ tiledLength,
11718
+ rawDataVersion,
11719
+ rawData,
11720
+ markColumnIndex,
11721
+ rowidCacheMap,
11722
+ horizonScroll,
11723
+ resolveMap,
11724
+ columnSlotsWeakMap
11501
11725
  };
11502
11726
  },
11503
11727
  render: function render16() {
@@ -11515,7 +11739,7 @@ var Table = defineComponent({
11515
11739
  return h("div", {
11516
11740
  class: (_class4 = {
11517
11741
  "tiny-grid h-full sm:h-auto !bg-transparent sm:!bg-color-bg-1 after:border-none sm:after:border-solid": true
11518
- }, _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["tiny-grid-fixed__left"] = !horizonScroll.isLeft, _class4["tiny-grid-fixed__right"] = !horizonScroll.isRight, _class4)
11742
+ }, _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)
11519
11743
  }, [
11520
11744
  // 隐藏列
11521
11745
  h("div", {
@@ -11746,8 +11970,8 @@ var Column = defineComponent({
11746
11970
  default: null
11747
11971
  }
11748
11972
  },
11749
- setup: function setup7(props, _ref177) {
11750
- var slots = _ref177.slots;
11973
+ setup: function setup7(props, _ref176) {
11974
+ var slots = _ref176.slots;
11751
11975
  var reactive = hooks.reactive, inject = hooks.inject, getCurrentInstance = hooks.getCurrentInstance, onUpdated = hooks.onUpdated, watch = hooks.watch, nextTick = hooks.nextTick;
11752
11976
  var currentInstance = getCurrentInstance();
11753
11977
  var instance = currentInstance.proxy;
@@ -11801,7 +12025,7 @@ var Column = defineComponent({
11801
12025
  warn("ui.grid.error.chainCallError");
11802
12026
  }
11803
12027
  var hasSubColumn = findTree(slotVnode, function(node) {
11804
- var _ref178 = node || {}, componentOptions = _ref178.componentOptions, type = _ref178.type;
12028
+ var _ref177 = node || {}, componentOptions = _ref177.componentOptions, type = _ref177.type;
11805
12029
  var componentName = type && type.name || componentOptions && componentOptions.Ctor.extendOptions.name;
11806
12030
  return $table.isValidCustomColumn(componentName);
11807
12031
  }, null, null);
@@ -11879,7 +12103,13 @@ var Grid = defineComponent({
11879
12103
  default: false
11880
12104
  },
11881
12105
  isMultipleHistory: Boolean,
11882
- selectToolbar: [Boolean, Object]
12106
+ selectToolbar: [Boolean, Object],
12107
+ filterPopperOptions: {
12108
+ type: Object,
12109
+ default: function _default28() {
12110
+ return {};
12111
+ }
12112
+ }
11883
12113
  }),
11884
12114
  data: function data6() {
11885
12115
  return {
@@ -12049,8 +12279,8 @@ var Grid = defineComponent({
12049
12279
  var tinyTheme = hooks.ref(resolveTheme(props, context));
12050
12280
  var tinyMode = hooks.ref(resolveMode(props, context));
12051
12281
  var breakpoint = useBreakpoint();
12052
- var renderless = function renderless2(props2, hooks2, _ref179) {
12053
- var _ref179$designConfig = _ref179.designConfig, designConfig = _ref179$designConfig === void 0 ? null : _ref179$designConfig;
12282
+ var renderless = function renderless2(props2, hooks2, _ref178) {
12283
+ var _ref178$designConfig = _ref178.designConfig, designConfig = _ref178$designConfig === void 0 ? null : _ref178$designConfig;
12054
12284
  return {
12055
12285
  tableListeners,
12056
12286
  designConfig,
@@ -12157,8 +12387,8 @@ var Grid = defineComponent({
12157
12387
  this.tasks.updateParentHeight();
12158
12388
  },
12159
12389
  // 向缓存添加实例
12160
- connect: function connect2(_ref180) {
12161
- var name = _ref180.name, vm = _ref180.vm;
12390
+ connect: function connect2(_ref179) {
12391
+ var name = _ref179.name, vm = _ref179.vm;
12162
12392
  if (name && typeof name === "string" && vm) {
12163
12393
  this.vmStore[name] = vm;
12164
12394
  }
@@ -12230,30 +12460,25 @@ var Grid = defineComponent({
12230
12460
  Grid.install = function(Vue) {
12231
12461
  Vue.component(Grid.name, Grid);
12232
12462
  };
12233
- function operArrs(_ref181) {
12234
- 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;
12463
+ function operArrs(_ref180) {
12464
+ var _vm = _ref180._vm, editStore = _ref180.editStore, newRecords = _ref180.newRecords, row2 = _ref180.row, tableFullData = _ref180.tableFullData;
12235
12465
  if (row2 === -1) {
12236
- Array.prototype.push.apply(nowData, newRecords);
12237
12466
  Array.prototype.push.apply(tableFullData, newRecords);
12238
- Array.prototype.push.apply(tableSourceData, newRecordsCopy);
12239
12467
  }
12240
12468
  if (row2 && row2 !== -1) {
12241
- var targetIndex = nowData.indexOf(row2);
12242
- if (targetIndex === -1) {
12469
+ var insertIndex = tableFullData.indexOf(row2);
12470
+ if (insertIndex === -1) {
12243
12471
  throw new Error(error("ui.grid.error.unableInsert"));
12244
12472
  }
12245
- var insertIndex = tableFullData.indexOf(row2);
12246
- Array.prototype.splice.apply(nowData, [targetIndex, 0].concat(newRecords));
12247
12473
  Array.prototype.splice.apply(tableFullData, [insertIndex, 0].concat(newRecords));
12248
- Array.prototype.splice.apply(tableSourceData, [insertIndex, 0].concat(newRecordsCopy));
12249
12474
  }
12250
12475
  if (!row2) {
12251
- Array.prototype.unshift.apply(nowData, newRecords);
12252
12476
  Array.prototype.unshift.apply(tableFullData, newRecords);
12253
- Array.prototype.unshift.apply(tableSourceData, newRecordsCopy);
12254
12477
  }
12255
12478
  Array.prototype.unshift.apply(editStore.insertList, newRecords);
12256
- Array.prototype.push.apply(_vm.temporaryRows, newRecordsCopy);
12479
+ newRecords.forEach(function(row22) {
12480
+ return editStore.insertMap.set(getRowid(_vm, row22), row22);
12481
+ });
12257
12482
  }
12258
12483
  var _setActiveCell = function _setActiveCell2(row2, field) {
12259
12484
  var _this53 = this;
@@ -12298,35 +12523,29 @@ var Methods$c = {
12298
12523
  // 根据位置从指定行添加数据
12299
12524
  _insertAt: function _insertAt(records, row2) {
12300
12525
  var _this54 = this;
12301
- 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;
12526
+ var editStore = this.editStore, isAsyncColumn = this.isAsyncColumn, scrollYLoad = this.scrollYLoad, tableFullData = this.tableFullData, treeConfig = this.treeConfig, visibleColumn = this.visibleColumn;
12302
12527
  if (treeConfig) {
12303
12528
  throw new Error(error("ui.grid.error.treeInsert"));
12304
12529
  }
12305
- if (isAsyncColumn) {
12306
- var columnSet = this.getColumns();
12307
- columnSet.forEach(function(column) {
12308
- if (column.format && column.format.async && column.format.async.fetch) {
12309
- records[GlobalConfig$1.constant.insertedField] = true;
12310
- }
12311
- });
12312
- }
12313
12530
  if (!isArray(records)) {
12314
12531
  records = [records];
12315
12532
  }
12316
- var nowData = afterFullData;
12533
+ var isColumnFormat = isAsyncColumn && visibleColumn.some(function(column) {
12534
+ var _column$format, _column$format$async;
12535
+ return (_column$format = column.format) == null ? void 0 : (_column$format$async = _column$format.async) == null ? void 0 : _column$format$async.fetch;
12536
+ });
12537
+ var defaultRowId = "_RID";
12317
12538
  var newRecords = records.map(function(record) {
12318
- return hooks.reactive(_this54.defineField(_extends({}, record)));
12539
+ isColumnFormat && (record[GlobalConfig$1.constant.insertedField] = true);
12540
+ delete record[defaultRowId];
12541
+ return hooks.reactive(_this54.defineField(Object.assign({}, record)));
12319
12542
  });
12320
- var newRecordsCopy = clone(newRecords, true);
12321
12543
  operArrs({
12322
12544
  _vm: this,
12323
12545
  editStore,
12324
- newRecords,
12325
- newRecordsCopy,
12326
- nowData,
12327
12546
  row: row2,
12328
12547
  tableFullData,
12329
- tableSourceData
12548
+ newRecords
12330
12549
  });
12331
12550
  this.updateCache();
12332
12551
  this.handleTableData(true);
@@ -12351,9 +12570,9 @@ var Methods$c = {
12351
12570
  */
12352
12571
  _remove: function _remove(rows) {
12353
12572
  var _this55 = this;
12354
- var afterFullData = this.afterFullData, scrollYLoad = this.scrollYLoad, _this$selectConfig3 = this.selectConfig, selectConfig = _this$selectConfig3 === void 0 ? {} : _this$selectConfig3;
12355
- var selection = this.selection, tableFullData = this.tableFullData, treeConfig = this.treeConfig, _this$tableSourceData2 = this.tableSourceData, tableSourceData = _this$tableSourceData2 === void 0 ? [] : _this$tableSourceData2;
12356
- var _this$editStore = this.editStore, insertList = _this$editStore.insertList, removeList = _this$editStore.removeList;
12573
+ var afterFullData = this.afterFullData, _this$selectConfig3 = this.selectConfig, selectConfig = _this$selectConfig3 === void 0 ? {} : _this$selectConfig3;
12574
+ var selection = this.selection, tableFullData = this.tableFullData, treeConfig = this.treeConfig;
12575
+ var _this$editStore = this.editStore, insertList = _this$editStore.insertList, insertMap = _this$editStore.insertMap, removeList = _this$editStore.removeList;
12357
12576
  var checkField = selectConfig.checkField;
12358
12577
  var nowData = afterFullData;
12359
12578
  var rest = [];
@@ -12372,7 +12591,7 @@ var Methods$c = {
12372
12591
  }
12373
12592
  for (var i = 0; i < rows.length; i++) {
12374
12593
  var row2 = rows[i];
12375
- if (this.hasRowInsert(row2)) continue;
12594
+ if (this.isTemporaryRow(row2)) continue;
12376
12595
  removeList.push(row2);
12377
12596
  }
12378
12597
  if (!checkField) {
@@ -12392,23 +12611,15 @@ var Methods$c = {
12392
12611
  return inArr(row3, rows);
12393
12612
  });
12394
12613
  }
12395
- remove(tableSourceData, function(row3) {
12396
- return find$1(insertList, function(r) {
12397
- return getRowid(_this55, r) === getRowid(_this55, row3);
12398
- }) && find$1(rows, function(r) {
12399
- return getRowid(_this55, r) === getRowid(_this55, row3);
12400
- });
12401
- });
12402
12614
  remove(insertList, function(row3) {
12403
- return inArr(row3, rows);
12615
+ var exist = inArr(row3, rows);
12616
+ exist && insertMap.delete(getRowid(_this55, row3));
12617
+ return exist;
12404
12618
  });
12405
12619
  this.updateCache();
12406
12620
  this.handleTableData(true);
12407
12621
  this.checkSelectionStatus();
12408
12622
  this.updateFooter();
12409
- if (scrollYLoad) {
12410
- this.updateScrollYSpace();
12411
- }
12412
12623
  var res = {
12413
12624
  row: rows && rows.length ? rows[rows.length - 1] : null,
12414
12625
  rows: rest
@@ -12442,12 +12653,12 @@ var Methods$c = {
12442
12653
  * 如果还额外传了field则还原指定单元格。
12443
12654
  */
12444
12655
  _revertData: function _revertData(rows, field) {
12445
- var tableSynchData = this.tableSynchData;
12656
+ var rawData = this.rawData;
12446
12657
  if (arguments.length && rows && !isArray(rows)) {
12447
12658
  rows = [rows];
12448
12659
  }
12449
12660
  if (!arguments.length) {
12450
- rows = tableSynchData || [];
12661
+ rows = rawData || [];
12451
12662
  }
12452
12663
  for (var i = 0; i < rows.length; i++) {
12453
12664
  var row2 = rows[i];
@@ -12464,7 +12675,7 @@ var Methods$c = {
12464
12675
  if (arguments.length) {
12465
12676
  return this.$nextTick();
12466
12677
  }
12467
- return this.reloadData(tableSynchData);
12678
+ return this.reloadData(rawData || []);
12468
12679
  },
12469
12680
  /**
12470
12681
  * 获取表格操作数据集
@@ -12521,7 +12732,7 @@ var Methods$c = {
12521
12732
  editConfig,
12522
12733
  row: row2
12523
12734
  });
12524
- if (!(editor && cell && isActiveCell)) {
12735
+ if (!(editor && cell && isActiveCell && editConfig)) {
12525
12736
  _context.n = 2;
12526
12737
  break;
12527
12738
  }
@@ -12599,7 +12810,7 @@ var Methods$c = {
12599
12810
  */
12600
12811
  _clearActived: function _clearActived(event) {
12601
12812
  var _this59 = this;
12602
- var _this$editConfig2 = this.editConfig, editConfig = _this$editConfig2 === void 0 ? {} : _this$editConfig2, editStore = this.editStore, tableColumn2 = this.tableColumn;
12813
+ var _this$editConfig3 = this.editConfig, editConfig = _this$editConfig3 === void 0 ? {} : _this$editConfig3, editStore = this.editStore, tableColumn2 = this.tableColumn;
12603
12814
  var actived = editStore.actived;
12604
12815
  var args = actived.args, column = actived.column, row2 = actived.row;
12605
12816
  var isActived = row2 || column;
@@ -12616,7 +12827,7 @@ var Methods$c = {
12616
12827
  this.updateRowStatus(actived.row);
12617
12828
  this.updateFooter();
12618
12829
  var row22 = args.row, column2 = args.column;
12619
- var _ref182 = column2 || {}, editor = _ref182.editor;
12830
+ var _ref181 = column2 || {}, editor = _ref181.editor;
12620
12831
  if ((editor == null ? void 0 : editor.component) === "input" && (editor == null ? void 0 : (_editor$attrs = editor.attrs) == null ? void 0 : _editor$attrs.type) === "number") {
12621
12832
  row22[column2.property] = +row22[column2.property];
12622
12833
  }
@@ -12737,7 +12948,7 @@ var Methods$c = {
12737
12948
  var _this61 = this;
12738
12949
  var editConfig = this.editConfig, editStore = this.editStore, elemStore = this.elemStore, _this$mouseConfig3 = this.mouseConfig, mouseConfig = _this$mouseConfig3 === void 0 ? {} : _this$mouseConfig3;
12739
12950
  var actived = editStore.actived, selected = editStore.selected;
12740
- var _ref183 = params || {}, cell = _ref183.cell, column = _ref183.column, row2 = _ref183.row;
12951
+ var _ref182 = params || {}, cell = _ref182.cell, column = _ref182.column, row2 = _ref182.row;
12741
12952
  var selectMethod = function selectMethod2() {
12742
12953
  var _cell$parentNode;
12743
12954
  if (selected.row === row2 && selected.column === column || actived.row === row2 && (editConfig.mode !== "cell" || actived.column === column)) {
@@ -12793,10 +13004,10 @@ function findLeft(params) {
12793
13004
  targetRowIndex
12794
13005
  };
12795
13006
  }
12796
- for (var _index4 = columnIndex - 1; _index4 >= 0; _index4--) {
12797
- if (checkColumn(visibleColumn[_index4])) {
12798
- targetColumnIndex = _index4;
12799
- targetColumn = visibleColumn[_index4];
13007
+ for (var _index5 = columnIndex - 1; _index5 >= 0; _index5--) {
13008
+ if (checkColumn(visibleColumn[_index5])) {
13009
+ targetColumnIndex = _index5;
13010
+ targetColumn = visibleColumn[_index5];
12800
13011
  break;
12801
13012
  }
12802
13013
  }
@@ -12810,10 +13021,10 @@ function findLeft(params) {
12810
13021
  }
12811
13022
  targetRowIndex = rowIndex - 1;
12812
13023
  targetRow = tableData[targetRowIndex];
12813
- for (var _index5 = visibleColumn.length - 1; _index5 >= 0; _index5--) {
12814
- if (checkColumn(visibleColumn[_index5])) {
12815
- targetColumnIndex = _index5;
12816
- targetColumn = visibleColumn[_index5];
13024
+ for (var _index6 = visibleColumn.length - 1; _index6 >= 0; _index6--) {
13025
+ if (checkColumn(visibleColumn[_index6])) {
13026
+ targetColumnIndex = _index6;
13027
+ targetColumn = visibleColumn[_index6];
12817
13028
  break;
12818
13029
  }
12819
13030
  }
@@ -12835,10 +13046,10 @@ function findRight(params) {
12835
13046
  targetRowIndex
12836
13047
  };
12837
13048
  }
12838
- for (var _index6 = columnIndex + 1; _index6 < visibleColumn.length; _index6++) {
12839
- if (checkColumn(visibleColumn[_index6])) {
12840
- targetColumnIndex = _index6;
12841
- targetColumn = visibleColumn[_index6];
13049
+ for (var _index7 = columnIndex + 1; _index7 < visibleColumn.length; _index7++) {
13050
+ if (checkColumn(visibleColumn[_index7])) {
13051
+ targetColumnIndex = _index7;
13052
+ targetColumn = visibleColumn[_index7];
12842
13053
  break;
12843
13054
  }
12844
13055
  }
@@ -12852,10 +13063,10 @@ function findRight(params) {
12852
13063
  }
12853
13064
  targetRowIndex = rowIndex + 1;
12854
13065
  targetRow = tableData[targetRowIndex];
12855
- for (var _index7 = 0; _index7 < visibleColumn.length; _index7++) {
12856
- if (checkColumn(visibleColumn[_index7])) {
12857
- targetColumnIndex = _index7;
12858
- targetColumn = visibleColumn[_index7];
13066
+ for (var _index8 = 0; _index8 < visibleColumn.length; _index8++) {
13067
+ if (checkColumn(visibleColumn[_index8])) {
13068
+ targetColumnIndex = _index8;
13069
+ targetColumn = visibleColumn[_index8];
12859
13070
  break;
12860
13071
  }
12861
13072
  }
@@ -12918,7 +13129,7 @@ function handleCellMousedownEvent(args1) {
12918
13129
  var $el = args1.$el, _vm = args1._vm, bodyList = args1.bodyList, cell = args1.cell, cellFirstElementChild = args1.cellFirstElementChild;
12919
13130
  var cellLastElementChild = args1.cellLastElementChild, headStart = args1.headStart, headerList = args1.headerList, isIndex = args1.isIndex, startCellNode = args1.startCellNode;
12920
13131
  var _vm$mouseConfig2 = _vm.mouseConfig, mouseConfig = _vm$mouseConfig2 === void 0 ? {} : _vm$mouseConfig2;
12921
- var _ref184 = mouseConfig || {}, _ref184$updateInterva = _ref184.updateInterval, updateInterval = _ref184$updateInterva === void 0 ? 10 : _ref184$updateInterva;
13132
+ var _ref183 = mouseConfig || {}, _ref183$updateInterva = _ref183.updateInterval, updateInterval = _ref183$updateInterva === void 0 ? 10 : _ref183$updateInterva;
12922
13133
  var oldMousemove = document.onmousemove;
12923
13134
  var oldMouseup = document.onmouseup;
12924
13135
  var updateEvent = function updateEvent2(event) {
@@ -12957,8 +13168,8 @@ function onCellMousedownSelectEditable(args) {
12957
13168
  _vm.handleSelected(params, event);
12958
13169
  }
12959
13170
  }
12960
- function onCellMousedownSelect(_ref185) {
12961
- var _vm = _ref185._vm, editConfig = _ref185.editConfig, event = _ref185.event, mouseConfig = _ref185.mouseConfig, params = _ref185.params;
13171
+ function onCellMousedownSelect(_ref184) {
13172
+ var _vm = _ref184._vm, editConfig = _ref184.editConfig, event = _ref184.event, mouseConfig = _ref184.mouseConfig, params = _ref184.params;
12962
13173
  if (!editConfig && mouseConfig.selected) {
12963
13174
  _vm.handleSelected(params, event);
12964
13175
  }
@@ -12977,8 +13188,8 @@ function onCellMousedownIndexColumn(args) {
12977
13188
  _vm.handleIndexChecked(getRowNodes(bodyList, getCellNodeIndex(firstCell), getCellNodeIndex(cell)));
12978
13189
  }
12979
13190
  }
12980
- function onCellMousedownNotIndexColumn(_ref186) {
12981
- var _vm = _ref186._vm, cell = _ref186.cell, column = _ref186.column, event = _ref186.event, headerList = _ref186.headerList, isIndex = _ref186.isIndex, params = _ref186.params;
13191
+ function onCellMousedownNotIndexColumn(_ref185) {
13192
+ var _vm = _ref185._vm, cell = _ref185.cell, column = _ref185.column, event = _ref185.event, headerList = _ref185.headerList, isIndex = _ref185.isIndex, params = _ref185.params;
12982
13193
  if (!isIndex) {
12983
13194
  var firstCell = cell.parentNode.firstElementChild;
12984
13195
  _vm.handleSelected(params, event);
@@ -12986,8 +13197,8 @@ function onCellMousedownNotIndexColumn(_ref186) {
12986
13197
  _vm.handleIndexChecked([[firstCell]]);
12987
13198
  }
12988
13199
  }
12989
- function handleHeaderCellMousedownEvent(_ref187) {
12990
- var $el = _ref187.$el, _vm = _ref187._vm, bodyList = _ref187.bodyList, cell = _ref187.cell, headerList = _ref187.headerList, startCell = _ref187.startCell;
13200
+ function handleHeaderCellMousedownEvent(_ref186) {
13201
+ var $el = _ref186.$el, _vm = _ref186._vm, bodyList = _ref186.bodyList, cell = _ref186.cell, headerList = _ref186.headerList, startCell = _ref186.startCell;
12991
13202
  var oldMousemove = document.onmousemove;
12992
13203
  var oldMouseup = document.onmouseup;
12993
13204
  var updateEvent = function updateEvent2(event) {
@@ -13020,8 +13231,8 @@ var removeCellClass = function removeCellClass2(bodyRef, clazz) {
13020
13231
  return removeClass(elem, clazz);
13021
13232
  });
13022
13233
  };
13023
- var getCellIndex = function getCellIndex2(_ref188) {
13024
- var cell = _ref188.cell, bodyList = _ref188.bodyList;
13234
+ var getCellIndex = function getCellIndex2(_ref187) {
13235
+ var cell = _ref187.cell, bodyList = _ref187.bodyList;
13025
13236
  var trElem = cell.parentNode;
13026
13237
  var cIndex = arrayIndexOf(trElem.children, cell);
13027
13238
  var rIndex = arrayIndexOf(bodyList, trElem);
@@ -13030,8 +13241,8 @@ var getCellIndex = function getCellIndex2(_ref188) {
13030
13241
  cIndex
13031
13242
  };
13032
13243
  };
13033
- var getModify = function getModify2(_ref189) {
13034
- var offsetTop = _ref189.offsetTop, offsetLeft = _ref189.offsetLeft, cWidth = _ref189.cWidth, cHeight = _ref189.cHeight;
13244
+ var getModify = function getModify2(_ref188) {
13245
+ var offsetTop = _ref188.offsetTop, offsetLeft = _ref188.offsetLeft, cWidth = _ref188.cWidth, cHeight = _ref188.cHeight;
13035
13246
  var modifyDomStyle = function modifyDomStyle2(dom, styleOptions) {
13036
13247
  return dom && Object.assign(dom.style, styleOptions);
13037
13248
  };
@@ -13058,8 +13269,8 @@ var getModify = function getModify2(_ref189) {
13058
13269
  });
13059
13270
  };
13060
13271
  };
13061
- var writeClipboardText = function writeClipboardText2(_ref190) {
13062
- var $table = _ref190.$table, columns2 = _ref190.columns, rows = _ref190.rows, rowNodes = _ref190.rowNodes;
13272
+ var writeClipboardText = function writeClipboardText2(_ref189) {
13273
+ var $table = _ref189.$table, columns2 = _ref189.columns, rows = _ref189.rows, rowNodes = _ref189.rowNodes;
13063
13274
  var _$table$keyboardConfi = $table.keyboardConfig, keyboardConfig = _$table$keyboardConfi === void 0 ? {} : _$table$keyboardConfi;
13064
13275
  var _keyboardConfig$clipb = keyboardConfig.clipboard, clipboard = _keyboardConfig$clipb === void 0 ? {} : _keyboardConfig$clipb;
13065
13276
  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;
@@ -13106,7 +13317,7 @@ var Methods$b = {
13106
13317
  var params = _extends({}, args);
13107
13318
  var columnIndex = visibleColumn.indexOf(params.column);
13108
13319
  var rowIndex = tableData.indexOf(params.row);
13109
- var _ref191 = {}, targetColumn = _ref191.targetColumn, targetColumnIndex = _ref191.targetColumnIndex, targetRow = _ref191.targetRow, targetRowIndex = _ref191.targetRowIndex;
13320
+ var _ref190 = {}, targetColumn = _ref190.targetColumn, targetColumnIndex = _ref190.targetColumnIndex, targetRow = _ref190.targetRow, targetRowIndex = _ref190.targetRowIndex;
13110
13321
  event.preventDefault();
13111
13322
  var checkColumn = function checkColumn2(column) {
13112
13323
  return !hasIndexColumn2(column) && (edit ? column.editor : true);
@@ -13200,9 +13411,9 @@ var Methods$b = {
13200
13411
  }
13201
13412
  },
13202
13413
  // 可编辑方向键移动处理
13203
- moveSelected: function moveSelected(_ref192) {
13414
+ moveSelected: function moveSelected(_ref191) {
13204
13415
  var _this63 = this;
13205
- var args = _ref192.args, isLeftArrow = _ref192.isLeftArrow, isUpArrow = _ref192.isUpArrow, isRightArrow = _ref192.isRightArrow, isDownArrow = _ref192.isDownArrow, event = _ref192.event;
13416
+ var args = _ref191.args, isLeftArrow = _ref191.isLeftArrow, isUpArrow = _ref191.isUpArrow, isRightArrow = _ref191.isRightArrow, isDownArrow = _ref191.isDownArrow, event = _ref191.event;
13206
13417
  var hasIndexColumn2 = this.hasIndexColumn, visibleColumn = this.tableColumn, tableData = this.tableFullData;
13207
13418
  var params = _extends({}, args);
13208
13419
  var column = params.column;
@@ -13424,7 +13635,7 @@ var Methods$b = {
13424
13635
  _getMouseCheckeds: function _getMouseCheckeds() {
13425
13636
  var _this65 = this;
13426
13637
  var _this$editStore$check = this.editStore.checked.rowNodes, rowNodes = _this$editStore$check === void 0 ? [] : _this$editStore$check;
13427
- var _ref193 = {}, _ref193$rows = _ref193.rows, rows = _ref193$rows === void 0 ? [] : _ref193$rows, _ref193$columns = _ref193.columns, columns2 = _ref193$columns === void 0 ? [] : _ref193$columns;
13638
+ var _ref192 = {}, _ref192$rows = _ref192.rows, rows = _ref192$rows === void 0 ? [] : _ref192$rows, _ref192$columns = _ref192.columns, columns2 = _ref192$columns === void 0 ? [] : _ref192$columns;
13428
13639
  var res = {
13429
13640
  rows,
13430
13641
  columns: columns2,
@@ -13453,7 +13664,7 @@ var Methods$b = {
13453
13664
  if (!mouseConfig || !mouseConfig.checked) {
13454
13665
  return;
13455
13666
  }
13456
- var _ref194 = {}, cHeight = _ref194.cHeight, cWidth = _ref194.cWidth, offsetLeft = _ref194.offsetLeft, offsetTop = _ref194.offsetTop;
13667
+ var _ref193 = {}, cHeight = _ref193.cHeight, cWidth = _ref193.cWidth, offsetLeft = _ref193.offsetLeft, offsetTop = _ref193.offsetTop;
13457
13668
  cWidth = cHeight = -2;
13458
13669
  offsetTop = offsetLeft = 0;
13459
13670
  this.clearChecked();
@@ -13582,7 +13793,7 @@ var Methods$b = {
13582
13793
  var editStore = this.editStore, tableColumn2 = this.tableColumn, tableData = this.tableData;
13583
13794
  var copyed = editStore.copyed;
13584
13795
  var rowNodes = editStore.checked.rowNodes;
13585
- 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;
13796
+ 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;
13586
13797
  cWidth = cHeight = -3;
13587
13798
  offsetTop = offsetLeft = 0;
13588
13799
  this.clearCopyed();
@@ -13705,13 +13916,13 @@ function adjustParams(rows, cb, vaildDatas) {
13705
13916
  vaildDatas
13706
13917
  };
13707
13918
  }
13708
- var columnHandler = function columnHandler2(_ref196) {
13709
- var _vm = _ref196._vm, colValidPromiseArr = _ref196.colValidPromiseArr, editRules = _ref196.editRules, isAll = _ref196.isAll, row2 = _ref196.row, validRest = _ref196.validRest;
13919
+ var columnHandler = function columnHandler2(_ref195) {
13920
+ var _vm = _ref195._vm, colValidPromiseArr = _ref195.colValidPromiseArr, editRules = _ref195.editRules, isAll = _ref195.isAll, row2 = _ref195.row, validRest = _ref195.validRest;
13710
13921
  return function(column, columnIndex) {
13711
13922
  if (has(editRules, column.property)) {
13712
13923
  colValidPromiseArr.push(new Promise(function(resolve, reject) {
13713
- _vm.validCellRules("all", row2, column).then(resolve).catch(function(_ref197) {
13714
- var rule = _ref197.rule, rules = _ref197.rules;
13924
+ _vm.validCellRules("all", row2, column).then(resolve).catch(function(_ref196) {
13925
+ var rule = _ref196.rule, rules = _ref196.rules;
13715
13926
  var rowIndex = _vm.getRowIndex(row2);
13716
13927
  var rest = {
13717
13928
  rule,
@@ -13735,8 +13946,8 @@ var columnHandler = function columnHandler2(_ref196) {
13735
13946
  }
13736
13947
  };
13737
13948
  };
13738
- function validTree(_ref198) {
13739
- var treeConfig = _ref198.treeConfig, handleVaild = _ref198.handleVaild, hasTreeExpand2 = _ref198.hasTreeExpand, vaildDatas = _ref198.vaildDatas, treeOpts = _ref198.treeOpts;
13949
+ function validTree(_ref197) {
13950
+ var treeConfig = _ref197.treeConfig, handleVaild = _ref197.handleVaild, hasTreeExpand2 = _ref197.hasTreeExpand, vaildDatas = _ref197.vaildDatas, treeOpts = _ref197.treeOpts;
13740
13951
  if (treeConfig.validHidden === false) {
13741
13952
  var _recurValid = function recurValid(row2) {
13742
13953
  var children = row2[treeConfig.children || "children"];
@@ -13750,8 +13961,8 @@ function validTree(_ref198) {
13750
13961
  eachTree(vaildDatas, handleVaild, treeOpts);
13751
13962
  }
13752
13963
  }
13753
- var realValid = function realValid2(_ref199) {
13754
- 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;
13964
+ var realValid = function realValid2(_ref198) {
13965
+ 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;
13755
13966
  var rowValids = [];
13756
13967
  var columns2 = _vm.getColumns();
13757
13968
  var handleVaild = function handleVaild2(row2) {
@@ -13803,8 +14014,8 @@ var Rule = /* @__PURE__ */ (function() {
13803
14014
  var onRejected = function onRejected2(opt, _this) {
13804
14015
  var isAll = opt.isAll, validRest = opt.validRest, cb = opt.cb, afterFullData = opt.afterFullData, treeConfig = opt.treeConfig;
13805
14016
  return function(params) {
13806
- var _ref200;
13807
- var args = isAll ? validRest : (_ref200 = {}, _ref200[params.column.property] = params, _ref200);
14017
+ var _ref199;
14018
+ var args = isAll ? validRest : (_ref199 = {}, _ref199[params.column.property] = params, _ref199);
13808
14019
  var funcFinish = function funcFinish2(args2, reject, resolve) {
13809
14020
  return function() {
13810
14021
  opt.status = false;
@@ -13871,10 +14082,10 @@ var Methods$a = {
13871
14082
  },
13872
14083
  validatePromise: function validatePromise(row2, column, columnIndex, isAll, validRest) {
13873
14084
  var _this68 = this;
13874
- function onrejected(_ref202) {
13875
- var _vm = _ref202._vm, reject = _ref202.reject, resolve = _ref202.resolve;
13876
- return function(_ref203) {
13877
- var rule = _ref203.rule, rules = _ref203.rules;
14085
+ function onrejected(_ref201) {
14086
+ var _vm = _ref201._vm, reject = _ref201.reject, resolve = _ref201.resolve;
14087
+ return function(_ref202) {
14088
+ var rule = _ref202.rule, rules = _ref202.rules;
13878
14089
  var rest = {
13879
14090
  $table: _vm,
13880
14091
  column,
@@ -13910,7 +14121,7 @@ var Methods$a = {
13910
14121
  */
13911
14122
  beginValidate: function beginValidate(rows, callback, isAll) {
13912
14123
  var afterFullData = this.afterFullData, editRules = this.editRules, hasTreeExpand2 = this.hasTreeExpand, treeConfig = this.treeConfig, treeOpts = this.treeOpts;
13913
- 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;
14124
+ 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;
13914
14125
  var _adjustParams = adjustParams(rows, callback, afterFullData), vaildDatas = _adjustParams.vaildDatas, cb = _adjustParams.cb;
13915
14126
  var opt = {
13916
14127
  isAll,
@@ -13948,8 +14159,8 @@ var Methods$a = {
13948
14159
  };
13949
14160
  return Promise.all(rowValids).then(onFulfilled).catch(onRejected(opt, this));
13950
14161
  },
13951
- hasCellRules: function hasCellRules(type, row2, _ref205) {
13952
- var property = _ref205.property;
14162
+ hasCellRules: function hasCellRules(type, row2, _ref204) {
14163
+ var property = _ref204.property;
13953
14164
  if (!property || !this.editRules) {
13954
14165
  return false;
13955
14166
  }
@@ -13982,7 +14193,7 @@ var Methods$a = {
13982
14193
  var _this69 = this;
13983
14194
  var editRules = this.editRules, rowId = this.rowId;
13984
14195
  var property = column.property;
13985
- var _ref206 = {}, _ref206$descriptor = _ref206.descriptor, descriptor = _ref206$descriptor === void 0 ? {} : _ref206$descriptor, _ref206$model = _ref206.model, model = _ref206$model === void 0 ? {} : _ref206$model;
14196
+ var _ref205 = {}, _ref205$descriptor = _ref205.descriptor, descriptor = _ref205$descriptor === void 0 ? {} : _ref205$descriptor, _ref205$model = _ref205.model, model = _ref205$model === void 0 ? {} : _ref205$model;
13986
14197
  if (property && editRules) {
13987
14198
  var rules = get(editRules, property);
13988
14199
  var cellValue = isUndefined(defaultValue) ? get(row2, property) : defaultValue;
@@ -14007,8 +14218,8 @@ var Methods$a = {
14007
14218
  column
14008
14219
  }
14009
14220
  };
14010
- var onRejected3 = function onRejected32(_ref207) {
14011
- var fields = _ref207.fields;
14221
+ var onRejected3 = function onRejected32(_ref206) {
14222
+ var fields = _ref206.fields;
14012
14223
  var cellErrors = Object.keys(fields).map(function(prop) {
14013
14224
  var rules2 = _descriptor[prop];
14014
14225
  _descriptor[prop] = !rules2.message ? Object.assign(rules2, {
@@ -14067,8 +14278,8 @@ var Methods$a = {
14067
14278
  var onfulfilled = function onfulfilled2() {
14068
14279
  editConfig.mode === "row" && validStore.visible && validStore.row === row2 && validStore.column === column && _this70.clearValidate();
14069
14280
  };
14070
- var onrejected = function onrejected2(_ref208) {
14071
- var rule = _ref208.rule;
14281
+ var onrejected = function onrejected2(_ref207) {
14282
+ var rule = _ref207.rule;
14072
14283
  if (rule.trigger && type !== rule.trigger) {
14073
14284
  return Promise.resolve();
14074
14285
  }
@@ -14162,7 +14373,7 @@ var Methods$8 = {
14162
14373
  initFetchOption: function initFetchOption() {
14163
14374
  var _this$fetchData = this.fetchData, fetchData = _this$fetchData === void 0 ? {} : _this$fetchData, _this$dataset = this.dataset, dataset = _this$dataset === void 0 ? {} : _this$dataset;
14164
14375
  if (fetchData.api || dataset.source || dataset.value || dataset.api) {
14165
- var _ref209 = fetchData || dataset.source || dataset.api || {}, loading = _ref209.loading, fields = _ref209.fields, api = _ref209.api, reloadConfig = _ref209.reloadConfig;
14376
+ var _ref208 = fetchData || dataset.source || dataset.api || {}, loading = _ref208.loading, fields = _ref208.fields, api = _ref208.api, reloadConfig = _ref208.reloadConfig;
14166
14377
  var isReloadFilter = false;
14167
14378
  var isReloadScroll = false;
14168
14379
  if (reloadConfig) {
@@ -14200,7 +14411,7 @@ var Methods$8 = {
14200
14411
  error("ui.grid.error.notQuery");
14201
14412
  return this.$nextTick();
14202
14413
  }
14203
- var _ref210 = fetchData || dataset.source || dataset.api || {}, args = _ref210.args, loading = _ref210.loading;
14414
+ var _ref209 = fetchData || dataset.source || dataset.api || {}, args = _ref209.args, loading = _ref209.loading;
14204
14415
  var field = sortData.field, order = sortData.order, prop = sortData.prop, property = sortData.property;
14205
14416
  var sortByData = {
14206
14417
  field,
@@ -14308,8 +14519,8 @@ var Methods$7 = {
14308
14519
  }
14309
14520
  },
14310
14521
  // 表格内置分页渲染器
14311
- renderPager: function renderPager(_ref211) {
14312
- var $slots = _ref211.$slots, _vm = _ref211._vm, loading = _ref211.loading, pager = _ref211.pager, pagerConfig = _ref211.pagerConfig, tableLoading = _ref211.tableLoading, vSize3 = _ref211.vSize;
14522
+ renderPager: function renderPager(_ref210) {
14523
+ var $slots = _ref210.$slots, _vm = _ref210._vm, loading = _ref210.loading, pager = _ref210.pager, pagerConfig = _ref210.pagerConfig, tableLoading = _ref210.tableLoading, vSize3 = _ref210.vSize;
14313
14524
  var res = null;
14314
14525
  var fetchData = _vm.fetchData;
14315
14526
  if ($slots.pager) {
@@ -14403,8 +14614,8 @@ var Pager = {
14403
14614
  Object.assign(host.methods, Methods$7);
14404
14615
  }
14405
14616
  };
14406
- function setBodyRecords(_ref212) {
14407
- var body = _ref212.body, insertRecords = _ref212.insertRecords, pendingRecords = _ref212.pendingRecords;
14617
+ function setBodyRecords(_ref211) {
14618
+ var body = _ref211.body, insertRecords = _ref211.insertRecords, pendingRecords = _ref211.pendingRecords;
14408
14619
  if (insertRecords.length) {
14409
14620
  body.pendingRecords = pendingRecords.filter(function(row2) {
14410
14621
  return !insertRecords.includes(row2);
@@ -14419,8 +14630,8 @@ function setBodyRecords(_ref212) {
14419
14630
  function canInvokeSaveDataApi(body, removeRecords, updateRecords) {
14420
14631
  return body.insertRecords.length || removeRecords.length || updateRecords.length || body.pendingRecords.length;
14421
14632
  }
14422
- function doRemoveOrShowMsg(_ref213) {
14423
- var _vm = _ref213._vm, canInvoke = _ref213.canInvoke, code = _ref213.code, isMsg2 = _ref213.isMsg, pendingRecords = _ref213.pendingRecords, resolve = _ref213.resolve, valid = _ref213.valid;
14633
+ function doRemoveOrShowMsg(_ref212) {
14634
+ var _vm = _ref212._vm, canInvoke = _ref212.canInvoke, code = _ref212.code, isMsg2 = _ref212.isMsg, pendingRecords = _ref212.pendingRecords, resolve = _ref212.resolve, valid = _ref212.valid;
14424
14635
  if (valid && !canInvoke) {
14425
14636
  if (isMsg2) {
14426
14637
  if (pendingRecords.length) {
@@ -14436,8 +14647,8 @@ function doRemoveOrShowMsg(_ref213) {
14436
14647
  resolve();
14437
14648
  }
14438
14649
  }
14439
- function invokeSaveDataApi(_ref214) {
14440
- 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;
14650
+ function invokeSaveDataApi(_ref213) {
14651
+ 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;
14441
14652
  var canInvoke = false;
14442
14653
  if (valid) {
14443
14654
  canInvoke = canInvokeSaveDataApi(body, removeRecords, updateRecords);
@@ -14464,8 +14675,8 @@ function invokeSaveDataApi(_ref214) {
14464
14675
  }
14465
14676
  var Methods$6 = {
14466
14677
  // 表格工具栏渲染器
14467
- getRenderedToolbar: function getRenderedToolbar(_ref215) {
14468
- var $slots = _ref215.$slots, _vm = _ref215._vm, loading = _ref215.loading, tableLoading = _ref215.tableLoading, toolbar = _ref215.toolbar;
14678
+ getRenderedToolbar: function getRenderedToolbar(_ref214) {
14679
+ var $slots = _ref214.$slots, _vm = _ref214._vm, loading = _ref214.loading, tableLoading = _ref214.tableLoading, toolbar = _ref214.toolbar;
14469
14680
  return _vm.renderedToolbar = (function() {
14470
14681
  var res = null;
14471
14682
  if ($slots.toolbar) {
@@ -14567,9 +14778,9 @@ var Methods$6 = {
14567
14778
  };
14568
14779
  this.remove(selecteds).then(afterRemove);
14569
14780
  },
14570
- handleFullScreen: function handleFullScreen(_ref216) {
14781
+ handleFullScreen: function handleFullScreen(_ref215) {
14571
14782
  var _this78 = this;
14572
- var show2 = _ref216[0];
14783
+ var show2 = _ref215[0];
14573
14784
  this.fullScreenClass = show2 ? "tiny-fullscreen-full" : "";
14574
14785
  this.$nextTick(function() {
14575
14786
  _this78.recalculate();
@@ -14586,8 +14797,8 @@ var Methods$6 = {
14586
14797
  if (code === "insert") {
14587
14798
  this.insert();
14588
14799
  } else if (code === "insert_actived") {
14589
- this.insert().then(function(_ref217) {
14590
- var row2 = _ref217.row;
14800
+ this.insert().then(function(_ref216) {
14801
+ var row2 = _ref216.row;
14591
14802
  return _this79.setActiveRow(row2);
14592
14803
  });
14593
14804
  } else if (code === "mark_cancel") {
@@ -14674,7 +14885,7 @@ var Methods$6 = {
14674
14885
  });
14675
14886
  }
14676
14887
  if (selecteds.length) {
14677
- 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;
14888
+ 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;
14678
14889
  selecteds.forEach(function(data7) {
14679
14890
  var selectedPending = pendings.includes(data7);
14680
14891
  tmp = selectedPending ? minus : plus;
@@ -14697,8 +14908,8 @@ var Toolbar = {
14697
14908
  };
14698
14909
  var Methods$5 = {
14699
14910
  renderColumnAnchor: function renderColumnAnchor(params, _vm) {
14700
- var _ref219 = params || {}, _ref219$anchors = _ref219.anchors, anchors = _ref219$anchors === void 0 ? [] : _ref219$anchors, _ref219$action = _ref219.action, action = _ref219$action === void 0 ? function() {
14701
- } : _ref219$action;
14911
+ var _ref218 = params || {}, _ref218$anchors = _ref218.anchors, anchors = _ref218$anchors === void 0 ? [] : _ref218$anchors, _ref218$action = _ref218.action, action = _ref218$action === void 0 ? function() {
14912
+ } : _ref218$action;
14702
14913
  var viewType2 = _vm.viewType;
14703
14914
  return h("div", {
14704
14915
  class: ["tiny-grid__column-anchor", _vm.viewCls("columnAnchor")],
@@ -14733,8 +14944,8 @@ var Methods$5 = {
14733
14944
  }, [iconVnode, spanVnode]);
14734
14945
  }));
14735
14946
  },
14736
- buildColumnAnchor: function buildColumnAnchor(_ref220) {
14737
- var property = _ref220.property, label = _ref220.label, anchors = _ref220.anchors, activeAnchor = _ref220.activeAnchor;
14947
+ buildColumnAnchor: function buildColumnAnchor(_ref219) {
14948
+ var property = _ref219.property, label = _ref219.label, anchors = _ref219.anchors, activeAnchor = _ref219.activeAnchor;
14738
14949
  var visibleColumn = this.getColumns();
14739
14950
  var column = visibleColumn.find(function(col) {
14740
14951
  return !col.type && col.property === property;
@@ -14825,8 +15036,8 @@ var Methods$5 = {
14825
15036
  }, activeAnchor.delay);
14826
15037
  };
14827
15038
  },
14828
- anchorAction: function anchorAction(_ref221) {
14829
- var field = _ref221.field, anchors = _ref221.anchors, _vm = _ref221._vm;
15039
+ anchorAction: function anchorAction(_ref220) {
15040
+ var field = _ref220.field, anchors = _ref220.anchors, _vm = _ref220._vm;
14830
15041
  var fromAnchor = anchors.find(function(anchor) {
14831
15042
  return anchor.active;
14832
15043
  });
@@ -14872,8 +15083,8 @@ var ColumnAnchor = {
14872
15083
  Object.assign(host.methods, Methods$5);
14873
15084
  }
14874
15085
  };
14875
- var createHandlerOnEnd = function createHandlerOnEnd2(_ref222) {
14876
- var _vm = _ref222._vm, refresh = _ref222.refresh;
15086
+ var createHandlerOnEnd = function createHandlerOnEnd2(_ref221) {
15087
+ var _vm = _ref221._vm, refresh = _ref221.refresh;
14877
15088
  return function(event) {
14878
15089
  var insertRecords = _vm.getInsertRecords();
14879
15090
  if (insertRecords.length) {
@@ -14885,7 +15096,7 @@ var createHandlerOnEnd = function createHandlerOnEnd2(_ref222) {
14885
15096
  var targetTrElem = event.item;
14886
15097
  var wrapperElem = targetTrElem.parentNode, prevEl = targetTrElem.previousElementSibling, nextEl = targetTrElem.nextElementSibling;
14887
15098
  var prevTrElem = prevEl && prevEl.classList.contains("tiny-grid-body__row") ? prevEl : prevEl && prevEl.previousElementSibling;
14888
- var tableTreeData = _vm.data || _vm.tableData;
15099
+ var tableTreeData = _vm.rawData || _vm.tableData;
14889
15100
  var selfRow = _vm.getRowNode(targetTrElem).item;
14890
15101
  var selfNode = findTree$1(tableTreeData, function(row2) {
14891
15102
  return row2 === selfRow;
@@ -14919,7 +15130,7 @@ var createHandlerOnEnd = function createHandlerOnEnd2(_ref222) {
14919
15130
  _vm.tableFullData = [].concat(tableTreeData);
14920
15131
  }
14921
15132
  _vm.$emit("row-drop-end", event, _vm, _vm.scrollYLoad ? tableTreeData : _vm.tableFullData);
14922
- refresh && _vm.data && _vm.refreshData(_vm.data);
15133
+ refresh && _vm.rawData && _vm.refreshData(_vm.rawData);
14923
15134
  };
14924
15135
  };
14925
15136
  var getSortColumns = function getSortColumns2(columns2) {
@@ -14942,7 +15153,7 @@ var Methods$4 = {
14942
15153
  // 处理列拖拽
14943
15154
  columnDrop: function columnDrop(headerEl) {
14944
15155
  var _this81 = this;
14945
- var _ref223 = this.dropConfig || {}, plugin = _ref223.plugin, onBeforeMove = _ref223.onBeforeMove, filter2 = _ref223.filter;
15156
+ var _ref222 = this.dropConfig || {}, plugin = _ref222.plugin, onBeforeMove = _ref222.onBeforeMove, filter2 = _ref222.filter;
14946
15157
  var columnDropContainer = headerEl.querySelector(".tiny-grid-header__row");
14947
15158
  var columnDropOptions = _extends({}, this.dropConfig, {
14948
15159
  handle: ".tiny-grid-header__column:not(.col__fixed)",
@@ -15035,8 +15246,8 @@ var Sort = {
15035
15246
  Object.assign(host.methods, Methods$3);
15036
15247
  }
15037
15248
  };
15038
- function createTooltipRange(_ref224) {
15039
- var _vm = _ref224._vm, cell = _ref224.cell, column = _ref224.column, isHeader = _ref224.isHeader;
15249
+ function createTooltipRange(_ref223) {
15250
+ var _vm = _ref223._vm, cell = _ref223.cell, column = _ref223.column, isHeader = _ref223.isHeader;
15040
15251
  var range = document.createRange();
15041
15252
  var rangeEnd;
15042
15253
  range.setStart(cell, 0);
@@ -15054,8 +15265,8 @@ function createTooltipRange(_ref224) {
15054
15265
  range.setEnd(cell, rangeEnd);
15055
15266
  return range;
15056
15267
  }
15057
- function processContentMethod(_ref225) {
15058
- 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;
15268
+ function processContentMethod(_ref224) {
15269
+ 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;
15059
15270
  if (contentMethod) {
15060
15271
  _vm.tooltipContent = contentMethod({
15061
15272
  event,
@@ -15207,15 +15418,15 @@ var Tooltip = {
15207
15418
  Object.assign(host.methods, Methods$2);
15208
15419
  }
15209
15420
  };
15210
- function onHalfSelectionProperty(_ref226) {
15211
- var checkStrictly = _ref226.checkStrictly, property = _ref226.property, row2 = _ref226.row, treeConfig = _ref226.treeConfig, treeIndeterminates = _ref226.treeIndeterminates, value = _ref226.value;
15421
+ function onHalfSelectionProperty(_ref225) {
15422
+ var checkStrictly = _ref225.checkStrictly, property = _ref225.property, row2 = _ref225.row, treeConfig = _ref225.treeConfig, treeIndeterminates = _ref225.treeIndeterminates, value = _ref225.value;
15212
15423
  if (property && treeConfig && !checkStrictly && value === -1) {
15213
15424
  treeIndeterminates.push(row2);
15214
15425
  set(row2, property, false);
15215
15426
  }
15216
15427
  }
15217
- function onFullSelectionProperty(_ref227) {
15218
- var checkMethod = _ref227.checkMethod, checkStrictly = _ref227.checkStrictly, property = _ref227.property, row2 = _ref227.row, treeConfig = _ref227.treeConfig, treeIndeterminates = _ref227.treeIndeterminates, value = _ref227.value;
15428
+ function onFullSelectionProperty(_ref226) {
15429
+ var checkMethod = _ref226.checkMethod, checkStrictly = _ref226.checkStrictly, property = _ref226.property, row2 = _ref226.row, treeConfig = _ref226.treeConfig, treeIndeterminates = _ref226.treeIndeterminates, value = _ref226.value;
15219
15430
  if (property && treeConfig && !checkStrictly && value !== -1) {
15220
15431
  eachTree([row2], function(item, $rowIndex) {
15221
15432
  if (row2 === item || !checkMethod || checkMethod({
@@ -15230,8 +15441,8 @@ function onFullSelectionProperty(_ref227) {
15230
15441
  }, treeConfig);
15231
15442
  }
15232
15443
  }
15233
- function getVItemsOnParentSlctProp(_ref228) {
15234
- var checkMethod = _ref228.checkMethod, matchObj = _ref228.matchObj;
15444
+ function getVItemsOnParentSlctProp(_ref227) {
15445
+ var checkMethod = _ref227.checkMethod, matchObj = _ref227.matchObj;
15235
15446
  var tinyItems;
15236
15447
  if (checkMethod) {
15237
15448
  tinyItems = matchObj.items.filter(function(item, $rowIndex) {
@@ -15245,8 +15456,8 @@ function getVItemsOnParentSlctProp(_ref228) {
15245
15456
  }
15246
15457
  return tinyItems;
15247
15458
  }
15248
- function getParentStatusOnParentSlctProp(_ref229) {
15249
- var indeterminatesItem = _ref229.indeterminatesItem, matchObj = _ref229.matchObj, property = _ref229.property, vItems = _ref229.vItems, value = _ref229.value;
15459
+ function getParentStatusOnParentSlctProp(_ref228) {
15460
+ var indeterminatesItem = _ref228.indeterminatesItem, matchObj = _ref228.matchObj, property = _ref228.property, vItems = _ref228.vItems, value = _ref228.value;
15250
15461
  var parentStatus;
15251
15462
  if (indeterminatesItem) {
15252
15463
  parentStatus = -1;
@@ -15261,8 +15472,8 @@ function getParentStatusOnParentSlctProp(_ref229) {
15261
15472
  }
15262
15473
  return parentStatus;
15263
15474
  }
15264
- function onHalfSelection(_ref230) {
15265
- var checkStrictly = _ref230.checkStrictly, property = _ref230.property, row2 = _ref230.row, selection = _ref230.selection, treeConfig = _ref230.treeConfig, treeIndeterminates = _ref230.treeIndeterminates, value = _ref230.value;
15475
+ function onHalfSelection(_ref229) {
15476
+ var checkStrictly = _ref229.checkStrictly, property = _ref229.property, row2 = _ref229.row, selection = _ref229.selection, treeConfig = _ref229.treeConfig, treeIndeterminates = _ref229.treeIndeterminates, value = _ref229.value;
15266
15477
  if (!property && treeConfig && !checkStrictly && value === -1) {
15267
15478
  treeIndeterminates.push(row2);
15268
15479
  remove(selection, function(item) {
@@ -15273,8 +15484,8 @@ function onHalfSelection(_ref230) {
15273
15484
  var addSelection = function addSelection2(selection, item) {
15274
15485
  return !selection.includes(item) && selection.push(item);
15275
15486
  };
15276
- function onFullSelection(_ref231) {
15277
- 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;
15487
+ function onFullSelection(_ref230) {
15488
+ 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;
15278
15489
  if (!property && treeConfig && !checkStrictly && value !== -1) {
15279
15490
  eachTree([row2], function(item, $rowIndex) {
15280
15491
  if (row2 === item || !checkMethod || checkMethod({
@@ -15295,8 +15506,8 @@ function onFullSelection(_ref231) {
15295
15506
  }, treeConfig);
15296
15507
  }
15297
15508
  }
15298
- function getParentStatusOnParentSelection(_ref232) {
15299
- var indeterminatesItem = _ref232.indeterminatesItem, matchObj = _ref232.matchObj, selection = _ref232.selection, vItems = _ref232.vItems, value = _ref232.value;
15509
+ function getParentStatusOnParentSelection(_ref231) {
15510
+ var indeterminatesItem = _ref231.indeterminatesItem, matchObj = _ref231.matchObj, selection = _ref231.selection, vItems = _ref231.vItems, value = _ref231.value;
15300
15511
  var parentStatus;
15301
15512
  if (indeterminatesItem) {
15302
15513
  parentStatus = -1;
@@ -15309,8 +15520,8 @@ function getParentStatusOnParentSelection(_ref232) {
15309
15520
  }
15310
15521
  return parentStatus;
15311
15522
  }
15312
- function hasCheckField(_ref233, value, _vm) {
15313
- var row2 = _ref233.row;
15523
+ function hasCheckField(_ref232, value, _vm) {
15524
+ var row2 = _ref232.row;
15314
15525
  var tableFullData = _vm.tableFullData, _vm$selectConfig = _vm.selectConfig, selectConfig = _vm$selectConfig === void 0 ? {} : _vm$selectConfig, treeConfig = _vm.treeConfig, treeIndeterminates = _vm.treeIndeterminates;
15315
15526
  var property = selectConfig.checkField, checkStrictly = selectConfig.checkStrictly, checkMethod = selectConfig.checkMethod;
15316
15527
  onHalfSelectionProperty({
@@ -15358,8 +15569,8 @@ function hasCheckField(_ref233, value, _vm) {
15358
15569
  set(row2, property, value);
15359
15570
  }
15360
15571
  }
15361
- function onSelectTreeCheckStrictly(_ref234, value, _vm) {
15362
- var row2 = _ref234.row;
15572
+ function onSelectTreeCheckStrictly(_ref233, value, _vm) {
15573
+ var row2 = _ref233.row;
15363
15574
  var selection = _vm.selection, tableFullData = _vm.tableFullData, _vm$selectConfig2 = _vm.selectConfig, selectConfig = _vm$selectConfig2 === void 0 ? {} : _vm$selectConfig2, treeConfig = _vm.treeConfig, treeIndeterminates = _vm.treeIndeterminates;
15364
15575
  var property = selectConfig.checkField, checkStrictly = selectConfig.checkStrictly, checkMethod = selectConfig.checkMethod;
15365
15576
  onHalfSelection({
@@ -15403,8 +15614,8 @@ function onSelectTreeCheckStrictly(_ref234, value, _vm) {
15403
15614
  }
15404
15615
  }
15405
15616
  }
15406
- function onSelectOther(_ref235, value, _vm) {
15407
- var row2 = _ref235.row;
15617
+ function onSelectOther(_ref234, value, _vm) {
15618
+ var row2 = _ref234.row;
15408
15619
  var selection = _vm.selection, _vm$selectConfig3 = _vm.selectConfig, selectConfig = _vm$selectConfig3 === void 0 ? {} : _vm$selectConfig3, treeConfig = _vm.treeConfig;
15409
15620
  var property = selectConfig.checkField, checkStrictly = selectConfig.checkStrictly;
15410
15621
  if (!property && !(treeConfig && !checkStrictly)) {
@@ -15417,8 +15628,8 @@ function onSelectOther(_ref235, value, _vm) {
15417
15628
  }
15418
15629
  }
15419
15630
  }
15420
- function hasNoCheckField(_ref236, value, _vm) {
15421
- var row2 = _ref236.row;
15631
+ function hasNoCheckField(_ref235, value, _vm) {
15632
+ var row2 = _ref235.row;
15422
15633
  onSelectTreeCheckStrictly({
15423
15634
  row: row2
15424
15635
  }, value, _vm);
@@ -15426,8 +15637,8 @@ function hasNoCheckField(_ref236, value, _vm) {
15426
15637
  row: row2
15427
15638
  }, value, _vm);
15428
15639
  }
15429
- function pushSelectRow(_ref237) {
15430
- 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;
15640
+ function pushSelectRow(_ref236) {
15641
+ 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;
15431
15642
  if (!checkStrictly && value) {
15432
15643
  eachTree(afterFullData, function(row2, $rowIndex) {
15433
15644
  if (!checkMethod || checkMethod({
@@ -15449,8 +15660,8 @@ function pushSelectRow(_ref237) {
15449
15660
  }, treeConfig);
15450
15661
  }
15451
15662
  }
15452
- function hasCheckFieldNoStrictly(_ref238) {
15453
- var afterFullData = _ref238.afterFullData, checkMethod = _ref238.checkMethod, checkStrictly = _ref238.checkStrictly, property = _ref238.property, selection = _ref238.selection, treeConfig = _ref238.treeConfig, value = _ref238.value;
15663
+ function hasCheckFieldNoStrictly(_ref237) {
15664
+ var afterFullData = _ref237.afterFullData, checkMethod = _ref237.checkMethod, checkStrictly = _ref237.checkStrictly, property = _ref237.property, selection = _ref237.selection, treeConfig = _ref237.treeConfig, value = _ref237.value;
15454
15665
  if (!checkStrictly && property) {
15455
15666
  var indexKey = (treeConfig ? "$" : "") + "rowIndex";
15456
15667
  var setValFn = function setValFn2(row2, rowIndex) {
@@ -15476,8 +15687,8 @@ function hasCheckFieldNoStrictly(_ref238) {
15476
15687
  }
15477
15688
  }
15478
15689
  }
15479
- function filterSelectRow(_ref239) {
15480
- var afterFullData = _ref239.afterFullData, checkMethod = _ref239.checkMethod, checkStrictly = _ref239.checkStrictly, selectRows = _ref239.selectRows, selection = _ref239.selection, value = _ref239.value;
15690
+ function filterSelectRow(_ref238) {
15691
+ var afterFullData = _ref238.afterFullData, checkMethod = _ref238.checkMethod, checkStrictly = _ref238.checkStrictly, selectRows = _ref238.selectRows, selection = _ref238.selection, value = _ref238.value;
15481
15692
  if (!checkStrictly && value && checkMethod) {
15482
15693
  selectRows = afterFullData.filter(function(row2, rowIndex) {
15483
15694
  return selection.includes(row2) || checkMethod({
@@ -15499,8 +15710,8 @@ function filterSelectRow(_ref239) {
15499
15710
  }
15500
15711
  return selectRows;
15501
15712
  }
15502
- function hasNoCheckFieldNoStrictly(_ref240) {
15503
- var afterFullData = _ref240.afterFullData, checkMethod = _ref240.checkMethod, checkStrictly = _ref240.checkStrictly, property = _ref240.property, selection = _ref240.selection, treeConfig = _ref240.treeConfig, value = _ref240.value;
15713
+ function hasNoCheckFieldNoStrictly(_ref239) {
15714
+ var afterFullData = _ref239.afterFullData, checkMethod = _ref239.checkMethod, checkStrictly = _ref239.checkStrictly, property = _ref239.property, selection = _ref239.selection, treeConfig = _ref239.treeConfig, value = _ref239.value;
15504
15715
  var selectRows = [];
15505
15716
  if (treeConfig) {
15506
15717
  pushSelectRow({
@@ -15525,8 +15736,8 @@ function hasNoCheckFieldNoStrictly(_ref240) {
15525
15736
  }
15526
15737
  return selectRows;
15527
15738
  }
15528
- function setSelectionNoStrictly(_ref241) {
15529
- var _vm = _ref241._vm, checkStrictly = _ref241.checkStrictly, reserve = _ref241.reserve, selectRows = _ref241.selectRows, selection = _ref241.selection, value = _ref241.value, afterFullData = _ref241.afterFullData;
15739
+ function setSelectionNoStrictly(_ref240) {
15740
+ var _vm = _ref240._vm, checkStrictly = _ref240.checkStrictly, reserve = _ref240.reserve, selectRows = _ref240.selectRows, selection = _ref240.selection, value = _ref240.value, afterFullData = _ref240.afterFullData;
15530
15741
  if (!checkStrictly) {
15531
15742
  if (reserve) {
15532
15743
  var unCheckedRows = afterFullData.filter(function(row2) {
@@ -15546,7 +15757,7 @@ var Methods$1 = {
15546
15757
  // 处理默认勾选
15547
15758
  handleSelectionDefChecked: function handleSelectionDefChecked() {
15548
15759
  var fullDataRowIdData = this.fullDataRowIdData;
15549
- var _ref242 = this.selectConfig || {}, checkAll = _ref242.checkAll, checkRowKeys = _ref242.checkRowKeys;
15760
+ var _ref241 = this.selectConfig || {}, checkAll = _ref241.checkAll, checkRowKeys = _ref241.checkRowKeys;
15550
15761
  if (checkAll) {
15551
15762
  this.setAllSelection(true);
15552
15763
  return;
@@ -15580,8 +15791,8 @@ var Methods$1 = {
15580
15791
  return this.$nextTick();
15581
15792
  },
15582
15793
  // 多选,行选中事件。value:选中true、不选false、不确定-1
15583
- handleSelectRow: function handleSelectRow(_ref243, value) {
15584
- var row2 = _ref243.row;
15794
+ handleSelectRow: function handleSelectRow(_ref242, value) {
15795
+ var row2 = _ref242.row;
15585
15796
  hasCheckField({
15586
15797
  row: row2
15587
15798
  }, value, this);
@@ -15592,7 +15803,7 @@ var Methods$1 = {
15592
15803
  },
15593
15804
  handleToggleCheckRowEvent: function handleToggleCheckRowEvent(params, event) {
15594
15805
  var selection = this.selection;
15595
- var _ref244 = this.selectConfig || {}, checkField = _ref244.checkField;
15806
+ var _ref243 = this.selectConfig || {}, checkField = _ref243.checkField;
15596
15807
  var row2 = params.row;
15597
15808
  var value = checkField ? !get(row2, checkField) : !~selection.indexOf(row2);
15598
15809
  if (event) {
@@ -15660,8 +15871,8 @@ var Methods$1 = {
15660
15871
  // 根据表格选中状态,给头部复现框赋值状态(全选,半选,未选)
15661
15872
  checkSelectionStatus: function checkSelectionStatus() {
15662
15873
  var afterFullData = this.afterFullData, selection = this.selection, treeIndeterminates = this.treeIndeterminates;
15663
- var _ref245 = this.selectConfig || {}, checkField = _ref245.checkField, checkMethod = _ref245.checkMethod;
15664
- var _ref246 = {}, everyHandler = _ref246.everyHandler, someHandler = _ref246.someHandler;
15874
+ var _ref244 = this.selectConfig || {}, checkField = _ref244.checkField, checkMethod = _ref244.checkMethod;
15875
+ var _ref245 = {}, everyHandler = _ref245.everyHandler, someHandler = _ref245.someHandler;
15665
15876
  if (checkField) {
15666
15877
  everyHandler = checkMethod ? function(row2, rowIndex) {
15667
15878
  return !checkMethod({
@@ -15710,7 +15921,7 @@ var Methods$1 = {
15710
15921
  // 保留选中状态
15711
15922
  reserveCheckSelection: function reserveCheckSelection() {
15712
15923
  var fullDataRowIdData = this.fullDataRowIdData, selection = this.selection;
15713
- var _ref247 = this.selectConfig || {}, reserve = _ref247.reserve;
15924
+ var _ref246 = this.selectConfig || {}, reserve = _ref246.reserve;
15714
15925
  var rowkey = getRowkey(this);
15715
15926
  if (reserve && selection.length) {
15716
15927
  this.selection = selection.map(function(row2) {
@@ -15738,7 +15949,7 @@ var Methods$1 = {
15738
15949
  },
15739
15950
  clearSelection: function clearSelection() {
15740
15951
  var tableFullData = this.tableFullData, treeConfig = this.treeConfig;
15741
- var _ref248 = this.selectConfig || {}, checkField = _ref248.checkField;
15952
+ var _ref247 = this.selectConfig || {}, checkField = _ref247.checkField;
15742
15953
  if (checkField) {
15743
15954
  treeConfig ? eachTree(tableFullData, function(item) {
15744
15955
  return set(item, checkField, false);
@@ -15864,9 +16075,9 @@ var Checkbox = {
15864
16075
  };
15865
16076
  var Methods = {
15866
16077
  // 展开树节点事件
15867
- triggerTreeExpandEvent: function triggerTreeExpandEvent(event, _ref249) {
16078
+ triggerTreeExpandEvent: function triggerTreeExpandEvent(event, _ref248) {
15868
16079
  var _this84 = this;
15869
- var row2 = _ref249.row;
16080
+ var row2 = _ref248.row;
15870
16081
  var currentColumn = this.currentColumn, currentRow = this.currentRow;
15871
16082
  var rest = this.toggleTreeExpansion(row2);
15872
16083
  var eventParams = {
@@ -15951,7 +16162,7 @@ var Methods = {
15951
16162
  var treeExpandedsCopy = [].concat(treeExpandeds);
15952
16163
  rows.forEach(function(row2) {
15953
16164
  if (row2[children] && row2[children].length) {
15954
- var _index8 = treeExpandedsCopy.indexOf(row2);
16165
+ var _index9 = treeExpandedsCopy.indexOf(row2);
15955
16166
  if (accordion) {
15956
16167
  var matchObj = findTree$1(tableFullData, function(item) {
15957
16168
  return item === row2;
@@ -15960,11 +16171,11 @@ var Methods = {
15960
16171
  return ~matchObj.items.indexOf(item);
15961
16172
  });
15962
16173
  }
15963
- if (~_index8 && (isToggle || !expanded)) {
15964
- treeExpandedsCopy.splice(_index8, 1);
16174
+ if (~_index9 && (isToggle || !expanded)) {
16175
+ treeExpandedsCopy.splice(_index9, 1);
15965
16176
  return;
15966
16177
  }
15967
- if (!~_index8 && (isToggle || expanded)) {
16178
+ if (!~_index9 && (isToggle || expanded)) {
15968
16179
  treeExpandedsCopy.push(row2);
15969
16180
  }
15970
16181
  }