vxe-table 4.1.6 → 4.1.9

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.
Files changed (53) hide show
  1. package/es/button/src/button.js +14 -14
  2. package/es/edit/src/hook.js +3 -3
  3. package/es/export/src/hook.js +17 -6
  4. package/es/filter/src/hook.js +20 -1
  5. package/es/grid/src/grid.js +6 -2
  6. package/es/table/src/body.js +11 -14
  7. package/es/table/src/cell.js +16 -14
  8. package/es/table/src/props.js +6 -6
  9. package/es/table/src/table.js +102 -89
  10. package/es/table/src/util.js +3 -0
  11. package/es/tools/dom.js +2 -8
  12. package/es/v-x-e-table/src/conf.js +3 -0
  13. package/lib/button/src/button.js +15 -14
  14. package/lib/button/src/button.min.js +1 -1
  15. package/lib/edit/src/hook.js +3 -0
  16. package/lib/edit/src/hook.min.js +1 -1
  17. package/lib/export/src/hook.js +25 -10
  18. package/lib/export/src/hook.min.js +1 -1
  19. package/lib/filter/src/hook.js +23 -0
  20. package/lib/filter/src/hook.min.js +1 -1
  21. package/lib/grid/src/grid.js +6 -3
  22. package/lib/grid/src/grid.min.js +1 -1
  23. package/lib/index.umd.js +307 -208
  24. package/lib/index.umd.min.js +1 -1
  25. package/lib/table/src/body.js +8 -16
  26. package/lib/table/src/body.min.js +1 -1
  27. package/lib/table/src/cell.js +16 -16
  28. package/lib/table/src/cell.min.js +1 -1
  29. package/lib/table/src/props.js +6 -6
  30. package/lib/table/src/table.js +158 -114
  31. package/lib/table/src/table.min.js +1 -1
  32. package/lib/table/src/util.js +7 -0
  33. package/lib/table/src/util.min.js +1 -1
  34. package/lib/tools/dom.js +2 -9
  35. package/lib/tools/dom.min.js +1 -1
  36. package/lib/v-x-e-table/src/conf.js +3 -0
  37. package/lib/v-x-e-table/src/conf.min.js +1 -1
  38. package/package.json +1 -1
  39. package/packages/button/src/button.ts +14 -14
  40. package/packages/edit/src/hook.ts +3 -3
  41. package/packages/export/src/hook.ts +17 -6
  42. package/packages/filter/src/hook.ts +20 -1
  43. package/packages/grid/src/grid.ts +6 -2
  44. package/packages/table/src/body.ts +11 -14
  45. package/packages/table/src/cell.ts +16 -14
  46. package/packages/table/src/props.ts +6 -6
  47. package/packages/table/src/table.ts +102 -89
  48. package/packages/table/src/util.ts +4 -0
  49. package/packages/tools/dom.ts +2 -7
  50. package/packages/v-x-e-table/src/conf.ts +3 -0
  51. package/types/filter.d.ts +5 -0
  52. package/types/plugins/pro.d.ts +5 -0
  53. package/types/table.d.ts +12 -2
package/lib/index.umd.js CHANGED
@@ -8500,6 +8500,9 @@ var GlobalConfig = {
8500
8500
  mouseConfig: {
8501
8501
  extension: true
8502
8502
  },
8503
+ keyboardConfig: {
8504
+ isEsc: true
8505
+ },
8503
8506
  areaConfig: {
8504
8507
  selectCellByHeader: true
8505
8508
  },
@@ -8942,6 +8945,9 @@ var es_number_to_fixed = __webpack_require__("b680");
8942
8945
  // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
8943
8946
  var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
8944
8947
 
8948
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.constructor.js
8949
+ var es_number_constructor = __webpack_require__("a9e3");
8950
+
8945
8951
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js
8946
8952
  var es_array_splice = __webpack_require__("a434");
8947
8953
 
@@ -8951,6 +8957,9 @@ var es_array_slice = __webpack_require__("fb6a");
8951
8957
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
8952
8958
  var es_object_to_string = __webpack_require__("d3b7");
8953
8959
 
8960
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js
8961
+ var es_promise = __webpack_require__("e6cf");
8962
+
8954
8963
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.fixed.js
8955
8964
  var es_string_fixed = __webpack_require__("c7cd");
8956
8965
 
@@ -9319,16 +9328,9 @@ function scrollToView(elem) {
9319
9328
  }
9320
9329
  }
9321
9330
  function dom_triggerEvent(targetElem, type) {
9322
- var evnt;
9323
-
9324
- if (typeof Event === 'function') {
9325
- evnt = new Event(type);
9326
- } else {
9327
- evnt = document.createEvent('Event');
9328
- evnt.initEvent(type, true, true);
9331
+ if (targetElem) {
9332
+ targetElem.dispatchEvent(new Event(type));
9329
9333
  }
9330
-
9331
- targetElem.dispatchEvent(evnt);
9332
9334
  }
9333
9335
  // CONCATENATED MODULE: ./packages/table/src/util.ts
9334
9336
 
@@ -9341,6 +9343,9 @@ function dom_triggerEvent(targetElem, type) {
9341
9343
 
9342
9344
 
9343
9345
 
9346
+
9347
+
9348
+
9344
9349
  function restoreScrollLocation($xetable, scrollLeft, scrollTop) {
9345
9350
  var internalData = $xetable.internalData;
9346
9351
  return $xetable.clearScroll().then(function () {
@@ -9436,6 +9441,11 @@ function toFilters(filters) {
9436
9441
 
9437
9442
  return filters;
9438
9443
  }
9444
+ function toTreePathSeq(path) {
9445
+ return path.map(function (num, i) {
9446
+ return i % 2 === 0 ? Number(num) + 1 : '.';
9447
+ }).join('');
9448
+ }
9439
9449
  function getCellValue(row, column) {
9440
9450
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, column.property);
9441
9451
  }
@@ -10946,6 +10956,9 @@ var Icon = {
10946
10956
  return renderVN;
10947
10957
  }
10948
10958
  }));
10959
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.assign.js
10960
+ var es_object_assign = __webpack_require__("cca6");
10961
+
10949
10962
  // CONCATENATED MODULE: ./packages/filter/src/hook.ts
10950
10963
 
10951
10964
 
@@ -10957,6 +10970,7 @@ var Icon = {
10957
10970
 
10958
10971
 
10959
10972
 
10973
+
10960
10974
  var tableFilterMethodKeys = ['setFilter', 'clearFilter', 'getCheckedFilters'];
10961
10975
  var tableFilterHook = {
10962
10976
  setupTable: function setupTable($xetable) {
@@ -11183,6 +11197,29 @@ var tableFilterHook = {
11183
11197
  }
11184
11198
  };
11185
11199
  var filterMethods = {
11200
+ /**
11201
+ * 手动弹出筛选面板
11202
+ * @param column
11203
+ */
11204
+ openFilter: function openFilter(fieldOrColumn) {
11205
+ var column = util_handleFieldOrColumn($xetable, fieldOrColumn);
11206
+
11207
+ if (column && column.filters) {
11208
+ var elemStore = internalData.elemStore;
11209
+ var fixed = column.fixed;
11210
+ return $xetable.scrollToColumn(column).then(function () {
11211
+ var headerWrapperElem = elemStore["".concat(fixed || 'main', "-header-wrapper")] || elemStore['main-header-wrapper'];
11212
+
11213
+ if (headerWrapperElem) {
11214
+ var filterBtnElem = headerWrapperElem.querySelector(".vxe-header--column.".concat(column.id, " .vxe-filter--btn"));
11215
+ dom_triggerEvent(filterBtnElem, 'click');
11216
+ }
11217
+ });
11218
+ }
11219
+
11220
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])();
11221
+ },
11222
+
11186
11223
  /**
11187
11224
  * 修改筛选条件列表
11188
11225
  * @param {ColumnInfo} fieldOrColumn 列或字段名
@@ -12029,6 +12066,7 @@ function _toConsumableArray(arr) {
12029
12066
 
12030
12067
 
12031
12068
 
12069
+
12032
12070
  var tableEditMethodKeys = ['insert', 'insertAt', 'remove', 'removeCheckboxRow', 'removeRadioRow', 'removeCurrentRow', 'getRecordset', 'getInsertRecords', 'getRemoveRecords', 'getUpdateRecords', 'getActiveRecord', 'getSelectedCell', 'clearActived', 'clearSelected', 'isActiveByRow', 'setActiveRow', 'setActiveCell', 'setSelectCell'];
12033
12071
  var editHook = {
12034
12072
  setupTable: function setupTable($xetable) {
@@ -12129,6 +12167,7 @@ var editHook = {
12129
12167
  var rest = {
12130
12168
  row: item,
12131
12169
  rowid: rowid,
12170
+ seq: -1,
12132
12171
  index: -1,
12133
12172
  _index: -1,
12134
12173
  $index: -1,
@@ -12150,6 +12189,7 @@ var editHook = {
12150
12189
  var _rest = {
12151
12190
  row: item,
12152
12191
  rowid: rowid,
12192
+ seq: -1,
12153
12193
  index: -1,
12154
12194
  _index: -1,
12155
12195
  $index: -1,
@@ -12271,6 +12311,7 @@ var editHook = {
12271
12311
  var rest = {
12272
12312
  row: item,
12273
12313
  rowid: rowid,
12314
+ seq: -1,
12274
12315
  index: -1,
12275
12316
  _index: -1,
12276
12317
  $index: -1,
@@ -13016,9 +13057,6 @@ function _nonIterableRest() {
13016
13057
  function _slicedToArray(arr, i) {
13017
13058
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
13018
13059
  }
13019
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.constructor.js
13020
- var es_number_constructor = __webpack_require__("a9e3");
13021
-
13022
13060
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js
13023
13061
  var es_string_split = __webpack_require__("1276");
13024
13062
 
@@ -13045,6 +13083,7 @@ function useSize(props) {
13045
13083
 
13046
13084
 
13047
13085
 
13086
+
13048
13087
  /* harmony default export */ var src_button = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({
13049
13088
  name: 'VxeButton',
13050
13089
  props: {
@@ -13197,48 +13236,49 @@ function useSize(props) {
13197
13236
  };
13198
13237
 
13199
13238
  var _getAbsolutePos = getAbsolutePos(targetElem),
13239
+ top = _getAbsolutePos.top,
13240
+ left = _getAbsolutePos.left,
13200
13241
  boundingTop = _getAbsolutePos.boundingTop,
13201
- boundingLeft = _getAbsolutePos.boundingLeft,
13202
13242
  visibleHeight = _getAbsolutePos.visibleHeight,
13203
13243
  visibleWidth = _getAbsolutePos.visibleWidth;
13204
13244
 
13205
13245
  var panelPlacement = 'bottom';
13206
13246
 
13207
13247
  if (transfer) {
13208
- var left = boundingLeft + targetWidth - panelWidth;
13209
- var top = boundingTop + targetHeight;
13248
+ var btnLeft = left + targetWidth - panelWidth;
13249
+ var btnTop = top + targetHeight;
13210
13250
 
13211
13251
  if (placement === 'top') {
13212
13252
  panelPlacement = 'top';
13213
- top = boundingTop - panelHeight;
13253
+ btnTop = top - panelHeight;
13214
13254
  } else if (!placement) {
13215
13255
  // 如果下面不够放,则向上
13216
- if (top + panelHeight + marginSize > visibleHeight) {
13256
+ if (boundingTop + targetHeight + panelHeight + marginSize > visibleHeight) {
13217
13257
  panelPlacement = 'top';
13218
- top = boundingTop - panelHeight;
13258
+ btnTop = top - panelHeight;
13219
13259
  } // 如果上面不够放,则向下(优先)
13220
13260
 
13221
13261
 
13222
- if (top < marginSize) {
13262
+ if (btnTop < marginSize) {
13223
13263
  panelPlacement = 'bottom';
13224
- top = boundingTop + targetHeight;
13264
+ btnTop = top + targetHeight;
13225
13265
  }
13226
13266
  } // 如果溢出右边
13227
13267
 
13228
13268
 
13229
- if (left + panelWidth + marginSize > visibleWidth) {
13230
- left -= left + panelWidth + marginSize - visibleWidth;
13269
+ if (btnLeft + panelWidth + marginSize > visibleWidth) {
13270
+ btnLeft -= btnLeft + panelWidth + marginSize - visibleWidth;
13231
13271
  } // 如果溢出左边
13232
13272
 
13233
13273
 
13234
- if (left < marginSize) {
13235
- left = marginSize;
13274
+ if (btnLeft < marginSize) {
13275
+ btnLeft = marginSize;
13236
13276
  }
13237
13277
 
13238
13278
  Object.assign(panelStyle, {
13239
- left: "".concat(left, "px"),
13279
+ left: "".concat(btnLeft, "px"),
13240
13280
  right: 'auto',
13241
- top: "".concat(top, "px"),
13281
+ top: "".concat(btnTop, "px"),
13242
13282
  minWidth: "".concat(targetWidth, "px")
13243
13283
  });
13244
13284
  } else {
@@ -18975,6 +19015,12 @@ var es_string_repeat = __webpack_require__("38cf");
18975
19015
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.trim.js
18976
19016
  var es_string_trim = __webpack_require__("498a");
18977
19017
 
19018
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
19019
+ var es_array_iterator = __webpack_require__("e260");
19020
+
19021
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.map.js
19022
+ var es_map = __webpack_require__("4ec9");
19023
+
18978
19024
  // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.js
18979
19025
  var web_url = __webpack_require__("2b3d");
18980
19026
 
@@ -19217,6 +19263,12 @@ var util_saveLocalFile = function saveLocalFile(options) {
19217
19263
 
19218
19264
 
19219
19265
 
19266
+
19267
+
19268
+
19269
+
19270
+
19271
+
19220
19272
 
19221
19273
 
19222
19274
 
@@ -19324,6 +19376,10 @@ function getFooterData(opts, footerTableData) {
19324
19376
 
19325
19377
  function getCsvCellTypeLabel(column, cellValue) {
19326
19378
  if (cellValue) {
19379
+ if (column.type === 'seq') {
19380
+ return "\t".concat(cellValue);
19381
+ }
19382
+
19327
19383
  switch (column.cellType) {
19328
19384
  case 'string':
19329
19385
  if (!isNaN(cellValue)) {
@@ -19565,15 +19621,24 @@ var tableExportHook = {
19565
19621
  return row[treeOpts.children] && row[treeOpts.children].length;
19566
19622
  };
19567
19623
 
19568
- var getSeq = function getSeq(row, rowIndex, column, columnIndex) {
19624
+ var getSeq = function getSeq(row, rowIndex, column, columnIndex, path) {
19569
19625
  var seqOpts = computeSeqOpts.value;
19570
19626
  var seqMethod = seqOpts.seqMethod || column.seqMethod;
19571
- return seqMethod ? seqMethod({
19572
- row: row,
19573
- rowIndex: rowIndex,
19574
- column: column,
19575
- columnIndex: columnIndex
19576
- }) : seqOpts.startIndex + rowIndex + 1;
19627
+
19628
+ if (seqMethod) {
19629
+ return seqMethod({
19630
+ row: row,
19631
+ rowIndex: rowIndex,
19632
+ column: column,
19633
+ columnIndex: columnIndex
19634
+ });
19635
+ }
19636
+
19637
+ if (path) {
19638
+ return toTreePathSeq(path);
19639
+ }
19640
+
19641
+ return seqOpts.startIndex + rowIndex + 1;
19577
19642
  };
19578
19643
 
19579
19644
  var toBooleanValue = function toBooleanValue(cellValue) {
@@ -19594,11 +19659,12 @@ var tableExportHook = {
19594
19659
  if (treeConfig) {
19595
19660
  // 如果是树表格只允许导出数据源
19596
19661
  var rest = [];
19662
+ var expandMaps = new Map();
19597
19663
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(datas, function (item, rowIndex, items, path, parent, nodes) {
19598
19664
  var row = item._row || item;
19599
19665
  var parentRow = parent && parent._row ? parent._row : parent;
19600
19666
 
19601
- if (isAllExpand || !parentRow || $xetable.isTreeExpandByRow(parentRow)) {
19667
+ if (isAllExpand || !parentRow || expandMaps.has(parentRow) && $xetable.isTreeExpandByRow(parentRow)) {
19602
19668
  var hasRowChild = hasTreeChildren(row);
19603
19669
  var _item = {
19604
19670
  _row: row,
@@ -19629,7 +19695,7 @@ var tableExportHook = {
19629
19695
  } else {
19630
19696
  switch (column.type) {
19631
19697
  case 'seq':
19632
- cellValue = getSeq(row, rowIndex, column, columnIndex);
19698
+ cellValue = getSeq(row, rowIndex, column, columnIndex, path);
19633
19699
  break;
19634
19700
 
19635
19701
  case 'checkbox':
@@ -19671,6 +19737,7 @@ var tableExportHook = {
19671
19737
 
19672
19738
  _item[column.id] = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toValueString(cellValue);
19673
19739
  });
19740
+ expandMaps.set(row, 1);
19674
19741
  rest.push(Object.assign(_item, row));
19675
19742
  }
19676
19743
  }, treeOpts);
@@ -19704,7 +19771,7 @@ var tableExportHook = {
19704
19771
  } else {
19705
19772
  switch (column.type) {
19706
19773
  case 'seq':
19707
- cellValue = getSeq(row, rowIndex, column, columnIndex);
19774
+ cellValue = getSeq(row, rowIndex, column, columnIndex, []);
19708
19775
  break;
19709
19776
 
19710
19777
  case 'checkbox':
@@ -22793,6 +22860,7 @@ var Footer = Object.assign(footer, {
22793
22860
 
22794
22861
 
22795
22862
 
22863
+
22796
22864
  function renderHelpIcon(params) {
22797
22865
  var $table = params.$table,
22798
22866
  column = params.column;
@@ -22918,8 +22986,8 @@ var Cell = {
22918
22986
 
22919
22987
  switch (type) {
22920
22988
  case 'seq':
22921
- renConfs.renderHeader = Cell.renderIndexHeader;
22922
- renConfs.renderCell = treeNode ? Cell.renderTreeIndexCell : Cell.renderIndexCell;
22989
+ renConfs.renderHeader = Cell.renderSeqHeader;
22990
+ renConfs.renderCell = treeNode ? Cell.renderTreeIndexCell : Cell.renderSeqCell;
22923
22991
  break;
22924
22992
 
22925
22993
  case 'radio':
@@ -22928,8 +22996,8 @@ var Cell = {
22928
22996
  break;
22929
22997
 
22930
22998
  case 'checkbox':
22931
- renConfs.renderHeader = Cell.renderSelectionHeader;
22932
- renConfs.renderCell = checkboxOpts.checkField ? treeNode ? Cell.renderTreeSelectionCellByProp : Cell.renderSelectionCellByProp : treeNode ? Cell.renderTreeSelectionCell : Cell.renderSelectionCell;
22999
+ renConfs.renderHeader = Cell.renderCheckboxHeader;
23000
+ renConfs.renderCell = checkboxOpts.checkField ? treeNode ? Cell.renderTreeSelectionCellByProp : Cell.renderCheckboxCellByProp : treeNode ? Cell.renderTreeSelectionCell : Cell.renderCheckboxCell;
22933
23001
  break;
22934
23002
 
22935
23003
  case 'expand':
@@ -23112,16 +23180,18 @@ var Cell = {
23112
23180
  /**
23113
23181
  * 索引
23114
23182
  */
23115
- renderIndexHeader: function renderIndexHeader(params) {
23183
+ renderSeqHeader: function renderSeqHeader(params) {
23116
23184
  var $table = params.$table,
23117
23185
  column = params.column;
23118
23186
  var slots = column.slots;
23119
23187
  var headerSlot = slots ? slots.header : null;
23120
23188
  return renderTitleContent(params, headerSlot ? $table.callSlot(headerSlot, params) : formatText(column.getTitle(), 1));
23121
23189
  },
23122
- renderIndexCell: function renderIndexCell(params) {
23190
+ renderSeqCell: function renderSeqCell(params) {
23123
23191
  var $table = params.$table,
23124
23192
  column = params.column;
23193
+ var props = $table.props;
23194
+ var treeConfig = props.treeConfig;
23125
23195
 
23126
23196
  var _$table$getComputeMap3 = $table.getComputeMaps(),
23127
23197
  computeSeqOpts = _$table$getComputeMap3.computeSeqOpts;
@@ -23134,14 +23204,12 @@ var Cell = {
23134
23204
  return $table.callSlot(defaultSlot, params);
23135
23205
  }
23136
23206
 
23137
- var $seq = params.$seq,
23138
- seq = params.seq,
23139
- level = params.level;
23207
+ var seq = params.seq;
23140
23208
  var seqMethod = seqOpts.seqMethod;
23141
- return [formatText(seqMethod ? seqMethod(params) : level ? "".concat($seq, ".").concat(seq) : (seqOpts.startIndex || 0) + seq, 1)];
23209
+ return [formatText(seqMethod ? seqMethod(params) : treeConfig ? seq : (seqOpts.startIndex || 0) + seq, 1)];
23142
23210
  },
23143
23211
  renderTreeIndexCell: function renderTreeIndexCell(params) {
23144
- return Cell.renderTreeIcon(params, Cell.renderIndexCell(params));
23212
+ return Cell.renderTreeIcon(params, Cell.renderSeqCell(params));
23145
23213
  },
23146
23214
 
23147
23215
  /**
@@ -23238,7 +23306,7 @@ var Cell = {
23238
23306
  /**
23239
23307
  * 多选
23240
23308
  */
23241
- renderSelectionHeader: function renderSelectionHeader(params) {
23309
+ renderCheckboxHeader: function renderCheckboxHeader(params) {
23242
23310
  var $table = params.$table,
23243
23311
  column = params.column,
23244
23312
  isHidden = params.isHidden;
@@ -23303,7 +23371,7 @@ var Cell = {
23303
23371
  class: 'vxe-checkbox--label'
23304
23372
  }, titleSlot ? $table.callSlot(titleSlot, checkboxParams) : headerTitle)] : []))]);
23305
23373
  },
23306
- renderSelectionCell: function renderSelectionCell(params) {
23374
+ renderCheckboxCell: function renderCheckboxCell(params) {
23307
23375
  var $table = params.$table,
23308
23376
  row = params.row,
23309
23377
  column = params.column,
@@ -23391,9 +23459,9 @@ var Cell = {
23391
23459
  }, ons), checkVNs)];
23392
23460
  },
23393
23461
  renderTreeSelectionCell: function renderTreeSelectionCell(params) {
23394
- return Cell.renderTreeIcon(params, Cell.renderSelectionCell(params));
23462
+ return Cell.renderTreeIcon(params, Cell.renderCheckboxCell(params));
23395
23463
  },
23396
- renderSelectionCellByProp: function renderSelectionCellByProp(params) {
23464
+ renderCheckboxCellByProp: function renderCheckboxCellByProp(params) {
23397
23465
  var $table = params.$table,
23398
23466
  row = params.row,
23399
23467
  column = params.column,
@@ -23482,7 +23550,7 @@ var Cell = {
23482
23550
  }, ons), checkVNs)];
23483
23551
  },
23484
23552
  renderTreeSelectionCellByProp: function renderTreeSelectionCellByProp(params) {
23485
- return Cell.renderTreeIcon(params, Cell.renderSelectionCellByProp(params));
23553
+ return Cell.renderTreeIcon(params, Cell.renderCheckboxCellByProp(params));
23486
23554
  },
23487
23555
 
23488
23556
  /**
@@ -24046,35 +24114,35 @@ var es_array_sort = __webpack_require__("4e82");
24046
24114
  return conf.table.showHeader;
24047
24115
  }
24048
24116
  },
24049
- // 是否要高亮当前选中行
24117
+ // (即将废弃)是否要高亮当前选中行
24050
24118
  highlightCurrentRow: {
24051
24119
  type: Boolean,
24052
24120
  default: function _default() {
24053
24121
  return conf.table.highlightCurrentRow;
24054
24122
  }
24055
24123
  },
24056
- // 鼠标移到行是否要高亮显示
24124
+ // (即将废弃)鼠标移到行是否要高亮显示
24057
24125
  highlightHoverRow: {
24058
24126
  type: Boolean,
24059
24127
  default: function _default() {
24060
24128
  return conf.table.highlightHoverRow;
24061
24129
  }
24062
24130
  },
24063
- // 是否要高亮当前选中列
24131
+ // (即将废弃)是否要高亮当前选中列
24064
24132
  highlightCurrentColumn: {
24065
24133
  type: Boolean,
24066
24134
  default: function _default() {
24067
24135
  return conf.table.highlightCurrentColumn;
24068
24136
  }
24069
24137
  },
24070
- // 鼠标移到列是否要高亮显示
24138
+ // (即将废弃)鼠标移到列是否要高亮显示
24071
24139
  highlightHoverColumn: {
24072
24140
  type: Boolean,
24073
24141
  default: function _default() {
24074
24142
  return conf.table.highlightHoverColumn;
24075
24143
  }
24076
24144
  },
24077
- // 激活单元格编辑时是否高亮显示
24145
+ // (即将废弃)激活单元格编辑时是否高亮显示
24078
24146
  highlightCell: Boolean,
24079
24147
  // 是否显示表尾合计
24080
24148
  showFooter: Boolean,
@@ -24220,7 +24288,7 @@ var es_array_sort = __webpack_require__("4e82");
24220
24288
  scrollX: Object,
24221
24289
  // 纵向虚拟滚动配置项
24222
24290
  scrollY: Object,
24223
- // 优化相关
24291
+ // (即将废弃)优化相关
24224
24292
  animat: {
24225
24293
  type: Boolean,
24226
24294
  default: function _default() {
@@ -24257,6 +24325,8 @@ var es_array_sort = __webpack_require__("4e82");
24257
24325
 
24258
24326
 
24259
24327
 
24328
+
24329
+
24260
24330
 
24261
24331
 
24262
24332
  var tableComponentPropKeys = Object.keys(src_props);
@@ -25331,7 +25401,12 @@ var gridComponentEmits = [].concat(_toConsumableArray(emits), ['page-change', 'f
25331
25401
  } // 只校验新增和修改的数据
25332
25402
 
25333
25403
 
25334
- return $xetable.validate(_body.insertRecords.concat(updateRecords)).then(function () {
25404
+ return $xetable.validate(_body.insertRecords.concat(updateRecords)).then(function (errMap) {
25405
+ if (errMap) {
25406
+ // 如果校验不通过
25407
+ return;
25408
+ }
25409
+
25335
25410
  if (_body.insertRecords.length || _removeRecords.length || updateRecords.length || _body.pendingRecords.length) {
25336
25411
  reactData.tableLoading = true;
25337
25412
  return Promise.resolve((beforeSave || _ajaxMethods2).apply(void 0, _toConsumableArray(_applyArgs2))).then(function (rest) {
@@ -25391,8 +25466,6 @@ var gridComponentEmits = [].concat(_toConsumableArray(emits), ['page-change', 'f
25391
25466
  });
25392
25467
  }
25393
25468
  }
25394
- }).catch(function (errMap) {
25395
- return errMap;
25396
25469
  });
25397
25470
  } else {
25398
25471
  if (true) {
@@ -30657,18 +30730,6 @@ var Pulldown = Object.assign(pulldown, {
30657
30730
  }
30658
30731
  });
30659
30732
  /* harmony default export */ var packages_pulldown = (Pulldown);
30660
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.assign.js
30661
- var es_object_assign = __webpack_require__("cca6");
30662
-
30663
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js
30664
- var es_promise = __webpack_require__("e6cf");
30665
-
30666
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
30667
- var es_array_iterator = __webpack_require__("e260");
30668
-
30669
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.map.js
30670
- var es_map = __webpack_require__("4ec9");
30671
-
30672
30733
  // CONCATENATED MODULE: ./packages/table/src/body.ts
30673
30734
 
30674
30735
 
@@ -30685,6 +30746,7 @@ var es_map = __webpack_require__("4ec9");
30685
30746
 
30686
30747
 
30687
30748
 
30749
+
30688
30750
  var body_renderType = 'body';
30689
30751
  var lineOffsetSizes = {
30690
30752
  mini: 3,
@@ -30815,7 +30877,7 @@ var lineOffsetSizes = {
30815
30877
  */
30816
30878
 
30817
30879
 
30818
- var renderColumn = function renderColumn($seq, seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, columns, items) {
30880
+ var renderColumn = function renderColumn(seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, columns, items) {
30819
30881
  var _ref2;
30820
30882
 
30821
30883
  var columnKey = tableProps.columnKey,
@@ -30876,7 +30938,6 @@ var lineOffsetSizes = {
30876
30938
  };
30877
30939
  var params = {
30878
30940
  $table: $xetable,
30879
- $seq: $seq,
30880
30941
  seq: seq,
30881
30942
  rowid: rowid,
30882
30943
  row: row,
@@ -31056,7 +31117,7 @@ var lineOffsetSizes = {
31056
31117
  }, tdOns), tdVNs);
31057
31118
  };
31058
31119
 
31059
- var renderRows = function renderRows($seq, fixedType, tableData, tableColumn) {
31120
+ var renderRows = function renderRows(fixedType, tableData, tableColumn) {
31060
31121
  var stripe = tableProps.stripe,
31061
31122
  rowKey = tableProps.rowKey,
31062
31123
  highlightHoverRow = tableProps.highlightHoverRow,
@@ -31072,8 +31133,7 @@ var lineOffsetSizes = {
31072
31133
  rowExpandeds = tableReactData.rowExpandeds,
31073
31134
  expandColumn = tableReactData.expandColumn,
31074
31135
  selectRow = tableReactData.selectRow;
31075
- var fullAllDataRowIdData = tableInternalData.fullAllDataRowIdData,
31076
- scrollYStore = tableInternalData.scrollYStore;
31136
+ var fullDataRowIdData = tableInternalData.fullDataRowIdData;
31077
31137
  var checkboxOpts = computeCheckboxOpts.value;
31078
31138
  var radioOpts = computeRadioOpts.value;
31079
31139
  var treeOpts = computeTreeOpts.value;
@@ -31083,11 +31143,6 @@ var lineOffsetSizes = {
31083
31143
  tableData.forEach(function (row, $rowIndex) {
31084
31144
  var trOn = {};
31085
31145
  var rowIndex = $rowIndex;
31086
- var seq = rowIndex + 1;
31087
-
31088
- if (scrollYLoad) {
31089
- seq += scrollYStore.startIndex;
31090
- }
31091
31146
 
31092
31147
  var _rowIndex = $xetable.getVTRowIndex(row); // 确保任何情况下 rowIndex 都精准指向真实 data 索引
31093
31148
 
@@ -31116,11 +31171,11 @@ var lineOffsetSizes = {
31116
31171
  }
31117
31172
 
31118
31173
  var rowid = util_getRowid($xetable, row);
31119
- var rest = fullAllDataRowIdData[rowid];
31174
+ var rest = fullDataRowIdData[rowid];
31120
31175
  var rowLevel = rest ? rest.level : 0;
31176
+ var seq = rest ? rest.seq : -1;
31121
31177
  var params = {
31122
31178
  $table: $xetable,
31123
- $seq: $seq,
31124
31179
  seq: seq,
31125
31180
  rowid: rowid,
31126
31181
  fixed: fixedType,
@@ -31149,7 +31204,7 @@ var lineOffsetSizes = {
31149
31204
  style: rowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(rowStyle) ? rowStyle(params) : rowStyle : null,
31150
31205
  key: rowKey || treeConfig ? rowid : $rowIndex
31151
31206
  }, trOn), tableColumn.map(function (column, $columnIndex) {
31152
- return renderColumn($seq, seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
31207
+ return renderColumn(seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
31153
31208
  }))); // 如果行被展开了
31154
31209
 
31155
31210
  if (expandColumn && rowExpandeds.length && $xetable.findRowIndexOf(rowExpandeds, row) > -1) {
@@ -31165,7 +31220,6 @@ var lineOffsetSizes = {
31165
31220
  var hasEllipsis = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(showOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(showOverflow) ? allColumnOverflow : showOverflow;
31166
31221
  var expandParams = {
31167
31222
  $table: $xetable,
31168
- $seq: $seq,
31169
31223
  seq: seq,
31170
31224
  column: expandColumn,
31171
31225
  fixed: fixedType,
@@ -31197,7 +31251,7 @@ var lineOffsetSizes = {
31197
31251
  var rowChildren = row[treeOpts.children];
31198
31252
 
31199
31253
  if (rowChildren && rowChildren.length && $xetable.findRowIndexOf(treeExpandeds, row) > -1) {
31200
- rows.push.apply(rows, _toConsumableArray(renderRows($seq ? "".concat($seq, ".").concat(seq) : "".concat(seq), fixedType, rowChildren, tableColumn)));
31254
+ rows.push.apply(rows, _toConsumableArray(renderRows(fixedType, rowChildren, tableColumn)));
31201
31255
  }
31202
31256
  }
31203
31257
  });
@@ -31557,7 +31611,7 @@ var lineOffsetSizes = {
31557
31611
  */
31558
31612
  Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('tbody', {
31559
31613
  ref: refBodyTBody
31560
- }, renderRows('', fixedType, tableData, tableColumn))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
31614
+ }, renderRows(fixedType, tableData, tableColumn))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
31561
31615
  class: 'vxe-table--checkbox-range'
31562
31616
  }), mouseConfig && mouseOpts.area ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["h"])('div', {
31563
31617
  class: 'vxe-table--cell-area'
@@ -31630,6 +31684,7 @@ var lineOffsetSizes = {
31630
31684
 
31631
31685
 
31632
31686
 
31687
+
31633
31688
 
31634
31689
 
31635
31690
  var isWebkit = browse['-webkit'] && !browse.edge;
@@ -31881,8 +31936,9 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
31881
31936
  tableFullColumn: [],
31882
31937
  // 渲染所有列
31883
31938
  visibleColumn: [],
31884
- // 缓存数据集
31939
+ // 总的缓存数据集
31885
31940
  fullAllDataRowIdData: {},
31941
+ // 渲染中缓存数据
31886
31942
  fullDataRowIdData: {},
31887
31943
  fullColumnIdData: {},
31888
31944
  fullColumnFieldData: {},
@@ -32863,30 +32919,102 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
32863
32919
  return cellValue;
32864
32920
  };
32865
32921
  };
32922
+ /**
32923
+ * 预编译
32924
+ * 对渲染中的数据提前解析序号及索引。牺牲提前编译耗时换取渲染中额外损耗,使运行时更加流畅
32925
+ */
32926
+
32866
32927
 
32867
32928
  var updateAfterDataIndex = function updateAfterDataIndex() {
32929
+ var treeConfig = props.treeConfig;
32868
32930
  var afterFullData = internalData.afterFullData,
32869
- fullDataRowIdData = internalData.fullDataRowIdData;
32870
- afterFullData.forEach(function (row, _index) {
32871
- var rowid = util_getRowid($xetable, row);
32931
+ fullDataRowIdData = internalData.fullDataRowIdData,
32932
+ fullAllDataRowIdData = internalData.fullAllDataRowIdData;
32933
+ var treeFullData = internalData.treeFullData;
32934
+ var treeOpts = computeTreeOpts.value;
32872
32935
 
32873
- var rest = fullDataRowIdData[rowid];
32936
+ if (treeConfig) {
32937
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(treeFullData, function (row, index, items, path) {
32938
+ var rowid = util_getRowid($xetable, row);
32874
32939
 
32875
- if (rest) {
32876
- rest._index = _index;
32877
- } else {
32878
- fullDataRowIdData[rowid] = {
32879
- row: row,
32880
- rowid: rowid,
32881
- index: -1,
32882
- $index: -1,
32883
- _index: _index,
32884
- items: [],
32885
- parent: null,
32886
- level: 0
32887
- };
32888
- }
32889
- });
32940
+ var allrest = fullAllDataRowIdData[rowid];
32941
+ var fullrest = fullDataRowIdData[rowid];
32942
+ var seq = path.map(function (num, i) {
32943
+ return i % 2 === 0 ? Number(num) + 1 : '.';
32944
+ }).join('');
32945
+
32946
+ if (allrest) {
32947
+ allrest.seq = seq;
32948
+ }
32949
+
32950
+ if (fullrest) {
32951
+ fullrest.seq = seq;
32952
+ } else {
32953
+ fullAllDataRowIdData[rowid] = {
32954
+ row: row,
32955
+ rowid: rowid,
32956
+ seq: seq,
32957
+ index: -1,
32958
+ $index: -1,
32959
+ _index: index,
32960
+ items: [],
32961
+ parent: null,
32962
+ level: 0
32963
+ };
32964
+ fullDataRowIdData[rowid] = {
32965
+ row: row,
32966
+ rowid: rowid,
32967
+ seq: seq,
32968
+ index: -1,
32969
+ $index: -1,
32970
+ _index: index,
32971
+ items: [],
32972
+ parent: null,
32973
+ level: 0
32974
+ };
32975
+ }
32976
+ }, treeOpts);
32977
+ } else {
32978
+ afterFullData.forEach(function (row, index) {
32979
+ var rowid = util_getRowid($xetable, row);
32980
+
32981
+ var allrest = fullAllDataRowIdData[rowid];
32982
+ var fullrest = fullDataRowIdData[rowid];
32983
+ var seq = index + 1;
32984
+
32985
+ if (allrest) {
32986
+ allrest.seq = seq;
32987
+ }
32988
+
32989
+ if (fullrest) {
32990
+ fullrest.seq = seq;
32991
+ fullrest._index = index;
32992
+ } else {
32993
+ fullAllDataRowIdData[rowid] = {
32994
+ row: row,
32995
+ rowid: rowid,
32996
+ seq: seq,
32997
+ index: -1,
32998
+ $index: -1,
32999
+ _index: index,
33000
+ items: [],
33001
+ parent: null,
33002
+ level: 0
33003
+ };
33004
+ fullDataRowIdData[rowid] = {
33005
+ row: row,
33006
+ rowid: rowid,
33007
+ seq: seq,
33008
+ index: -1,
33009
+ $index: -1,
33010
+ _index: index,
33011
+ items: [],
33012
+ parent: null,
33013
+ level: 0
33014
+ };
33015
+ }
33016
+ });
33017
+ }
32890
33018
  };
32891
33019
  /**
32892
33020
  * 获取处理后全量的表格数据
@@ -33312,8 +33440,8 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
33312
33440
  if (colspan > 1) {
33313
33441
  var columnIndex = tableMethods.getColumnIndex(column);
33314
33442
 
33315
- for (var _index2 = 1; _index2 < colspan; _index2++) {
33316
- var nextColumn = tableMethods.getColumns(columnIndex + _index2);
33443
+ for (var _index = 1; _index < colspan; _index++) {
33444
+ var nextColumn = tableMethods.getColumns(columnIndex + _index);
33317
33445
 
33318
33446
  if (nextColumn) {
33319
33447
  colWidth += nextColumn.renderWidth;
@@ -34108,12 +34236,12 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
34108
34236
  }
34109
34237
 
34110
34238
  reactData.scrollXLoad = scrollXLoad;
34111
- visibleColumn.forEach(function (column, _index) {
34239
+ visibleColumn.forEach(function (column, index) {
34112
34240
  var colid = column.id;
34113
34241
  var rest = fullColumnIdData[colid];
34114
34242
 
34115
34243
  if (rest) {
34116
- rest._index = _index;
34244
+ rest._index = index;
34117
34245
  }
34118
34246
  });
34119
34247
  internalData.visibleColumn = visibleColumn;
@@ -34322,6 +34450,40 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
34322
34450
  }
34323
34451
  };
34324
34452
 
34453
+ var createGetRowCacheProp = function createGetRowCacheProp(prop) {
34454
+ return function (row) {
34455
+ var fullDataRowIdData = internalData.fullDataRowIdData;
34456
+
34457
+ if (row) {
34458
+ var rowid = util_getRowid($xetable, row);
34459
+
34460
+ var rest = fullDataRowIdData[rowid];
34461
+
34462
+ if (rest) {
34463
+ return rest[prop];
34464
+ }
34465
+ }
34466
+
34467
+ return -1;
34468
+ };
34469
+ };
34470
+
34471
+ var createGetColumnCacheProp = function createGetColumnCacheProp(prop) {
34472
+ return function (column) {
34473
+ var fullColumnIdData = internalData.fullColumnIdData;
34474
+
34475
+ if (column) {
34476
+ var rest = fullColumnIdData[column.id];
34477
+
34478
+ if (rest) {
34479
+ return rest[prop];
34480
+ }
34481
+ }
34482
+
34483
+ return -1;
34484
+ };
34485
+ };
34486
+
34325
34487
  var debounceScrollY = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.debounce(function (evnt) {
34326
34488
  loadScrollYData(evnt);
34327
34489
  }, 20, {
@@ -34481,6 +34643,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
34481
34643
  var rest = {
34482
34644
  row: childRow,
34483
34645
  rowid: rowid,
34646
+ seq: -1,
34484
34647
  index: -1,
34485
34648
  _index: -1,
34486
34649
  $index: -1,
@@ -34574,118 +34737,46 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
34574
34737
  },
34575
34738
 
34576
34739
  /**
34577
- * 根据 row 获取相对于 data 中的索引
34740
+ * 根据 row 获取序号
34578
34741
  * @param {Row} row 行对象
34579
34742
  */
34580
- getRowIndex: function getRowIndex(row) {
34581
- var fullDataRowIdData = internalData.fullDataRowIdData;
34582
-
34583
- if (row) {
34584
- var rowid = util_getRowid($xetable, row);
34743
+ getRowSeq: createGetRowCacheProp('seq'),
34585
34744
 
34586
- var rest = fullDataRowIdData[rowid];
34587
-
34588
- if (rest) {
34589
- return rest.index;
34590
- }
34591
- }
34592
-
34593
- return -1;
34594
- },
34745
+ /**
34746
+ * 根据 row 获取相对于 data 中的索引
34747
+ * @param {Row} row 行对象
34748
+ */
34749
+ getRowIndex: createGetRowCacheProp('index'),
34595
34750
 
34596
34751
  /**
34597
34752
  * 根据 row 获取相对于当前数据中的索引
34598
34753
  * @param {Row} row 行对象
34599
34754
  */
34600
- getVTRowIndex: function getVTRowIndex(row) {
34601
- var fullDataRowIdData = internalData.fullDataRowIdData;
34602
-
34603
- if (row) {
34604
- var rowid = util_getRowid($xetable, row);
34605
-
34606
- var rest = fullDataRowIdData[rowid];
34607
-
34608
- if (rest) {
34609
- return rest._index;
34610
- }
34611
- }
34612
-
34613
- return -1;
34614
- },
34755
+ getVTRowIndex: createGetRowCacheProp('_index'),
34615
34756
 
34616
34757
  /**
34617
34758
  * 根据 row 获取渲染中的虚拟索引
34618
34759
  * @param {Row} row 行对象
34619
34760
  */
34620
- getVMRowIndex: function getVMRowIndex(row) {
34621
- var fullDataRowIdData = internalData.fullDataRowIdData;
34622
-
34623
- if (row) {
34624
- var rowid = util_getRowid($xetable, row);
34625
-
34626
- var rest = fullDataRowIdData[rowid];
34627
-
34628
- if (rest) {
34629
- return rest.$index;
34630
- }
34631
- }
34632
-
34633
- return -1;
34634
- },
34761
+ getVMRowIndex: createGetRowCacheProp('$index'),
34635
34762
 
34636
34763
  /**
34637
34764
  * 根据 column 获取相对于 columns 中的索引
34638
34765
  * @param {ColumnInfo} column 列配置
34639
34766
  */
34640
- getColumnIndex: function getColumnIndex(column) {
34641
- var fullColumnIdData = internalData.fullColumnIdData;
34642
-
34643
- if (column) {
34644
- var rest = fullColumnIdData[column.id];
34645
-
34646
- if (rest) {
34647
- return rest.index;
34648
- }
34649
- }
34650
-
34651
- return -1;
34652
- },
34767
+ getColumnIndex: createGetColumnCacheProp('index'),
34653
34768
 
34654
34769
  /**
34655
34770
  * 根据 column 获取相对于当前表格列中的索引
34656
34771
  * @param {ColumnInfo} column 列配置
34657
34772
  */
34658
- getVTColumnIndex: function getVTColumnIndex(column) {
34659
- var fullColumnIdData = internalData.fullColumnIdData;
34660
-
34661
- if (column) {
34662
- var rest = fullColumnIdData[column.id];
34663
-
34664
- if (rest) {
34665
- return rest._index;
34666
- }
34667
- }
34668
-
34669
- return -1;
34670
- },
34773
+ getVTColumnIndex: createGetColumnCacheProp('_index'),
34671
34774
 
34672
34775
  /**
34673
34776
  * 根据 column 获取渲染中的虚拟索引
34674
34777
  * @param {ColumnInfo} column 列配置
34675
34778
  */
34676
- getVMColumnIndex: function getVMColumnIndex(column) {
34677
- var fullColumnIdData = internalData.fullColumnIdData;
34678
-
34679
- if (column) {
34680
- var rest = fullColumnIdData[column.id];
34681
-
34682
- if (rest) {
34683
- return rest.$index;
34684
- }
34685
- }
34686
-
34687
- return -1;
34688
- },
34779
+ getVMColumnIndex: createGetColumnCacheProp('$index'),
34689
34780
 
34690
34781
  /**
34691
34782
  * 创建 data 对象
@@ -35622,7 +35713,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
35622
35713
  return selectRow;
35623
35714
  }
35624
35715
  } else {
35625
- if (afterFullData.indexOf(selectRow) > -1) {
35716
+ if ($xetable.findRowIndexOf(afterFullData, selectRow) > -1) {
35626
35717
  return selectRow;
35627
35718
  }
35628
35719
  }
@@ -36592,6 +36683,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
36592
36683
  ctxMenuStore = reactData.ctxMenuStore,
36593
36684
  editStore = reactData.editStore;
36594
36685
  var mouseOpts = computeMouseOpts.value;
36686
+ var keyboardOpts = computeKeyboardOpts.value;
36595
36687
  var actived = editStore.actived;
36596
36688
  var isEsc = hasEventKey(evnt, EVENT_KEYS.ESCAPE);
36597
36689
 
@@ -36606,16 +36698,19 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
36606
36698
  $xetable.closeMenu();
36607
36699
  }
36608
36700
 
36609
- tableMethods.closeFilter(); // 如果是激活编辑状态,则取消编辑
36701
+ tableMethods.closeFilter();
36610
36702
 
36611
- if (actived.row) {
36612
- var params = actived.args;
36613
- $xetable.clearActived(evnt); // 如果配置了选中功能,则为选中状态
36703
+ if (keyboardConfig && keyboardOpts.isEsc) {
36704
+ // 如果是激活编辑状态,则取消编辑
36705
+ if (actived.row) {
36706
+ var params = actived.args;
36707
+ $xetable.clearActived(evnt); // 如果配置了选中功能,则为选中状态
36614
36708
 
36615
- if (mouseOpts.selected) {
36616
- Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () {
36617
- return $xetable.handleSelected(params, evnt);
36618
- });
36709
+ if (mouseOpts.selected) {
36710
+ Object(external_commonjs_vue_commonjs2_vue_root_Vue_["nextTick"])(function () {
36711
+ return $xetable.handleSelected(params, evnt);
36712
+ });
36713
+ }
36619
36714
  }
36620
36715
  }
36621
36716
  }
@@ -36692,7 +36787,7 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
36692
36787
 
36693
36788
  tableMethods.closeFilter();
36694
36789
 
36695
- if (actived.row) {
36790
+ if (keyboardConfig && keyboardOpts.isEsc) {
36696
36791
  // 如果是激活编辑状态,则取消编辑
36697
36792
  if (actived.row) {
36698
36793
  var _params = actived.args;
@@ -37146,6 +37241,9 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
37146
37241
  var handleCache = function handleCache(row, index, items, path, parent, nodes) {
37147
37242
  var rowid = util_getRowid($xetable, row);
37148
37243
 
37244
+ var seq = treeConfig && path ? toTreePathSeq(path) : index + 1;
37245
+ var level = nodes ? nodes.length - 1 : 0;
37246
+
37149
37247
  if (eqEmptyValue(rowid)) {
37150
37248
  rowid = getRowUniqueId();
37151
37249
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.set(row, rowkey, rowid);
@@ -37158,12 +37256,13 @@ var visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
37158
37256
  var rest = {
37159
37257
  row: row,
37160
37258
  rowid: rowid,
37259
+ seq: seq,
37161
37260
  index: treeConfig && parent ? -1 : index,
37162
37261
  _index: -1,
37163
37262
  $index: -1,
37164
37263
  items: items,
37165
37264
  parent: parent,
37166
- level: nodes ? nodes.length - 1 : 0
37265
+ level: level
37167
37266
  };
37168
37267
 
37169
37268
  if (isSource) {