vxe-table 3.6.13 → 3.6.14-beta.1

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 (47) hide show
  1. package/lib/edit/src/mixin.js +23 -31
  2. package/lib/edit/src/mixin.min.js +1 -1
  3. package/lib/footer/src/footer.js +4 -2
  4. package/lib/footer/src/footer.min.js +1 -1
  5. package/lib/form/src/form-config-item.js +3 -1
  6. package/lib/form/src/form-config-item.min.js +1 -1
  7. package/lib/form/src/form-item.js +3 -1
  8. package/lib/form/src/form-item.min.js +1 -1
  9. package/lib/icon/style/style.css +1 -1
  10. package/lib/icon/style/style.min.css +1 -1
  11. package/lib/index.css +1 -1
  12. package/lib/index.umd.js +375 -354
  13. package/lib/index.umd.min.js +1 -1
  14. package/lib/select/src/select.js +8 -2
  15. package/lib/select/src/select.min.js +1 -1
  16. package/lib/style.css +1 -1
  17. package/lib/style.min.css +1 -1
  18. package/lib/table/src/body.js +8 -6
  19. package/lib/table/src/body.min.js +1 -1
  20. package/lib/table/src/methods.js +320 -307
  21. package/lib/table/src/methods.min.js +1 -1
  22. package/lib/table/src/table.js +3 -1
  23. package/lib/table/src/table.min.js +1 -1
  24. package/lib/tools/dom.js +1 -1
  25. package/lib/tools/dom.min.js +1 -1
  26. package/lib/tools/log.js +1 -1
  27. package/lib/tools/log.min.js +1 -1
  28. package/lib/v-x-e-table/index.js +1 -1
  29. package/lib/v-x-e-table/index.min.js +1 -1
  30. package/package.json +1 -1
  31. package/packages/edit/src/mixin.js +18 -22
  32. package/packages/footer/src/footer.js +4 -2
  33. package/packages/form/src/form-config-item.js +3 -1
  34. package/packages/form/src/form-item.js +3 -1
  35. package/packages/select/src/select.js +4 -2
  36. package/packages/table/src/body.js +8 -7
  37. package/packages/table/src/methods.js +42 -30
  38. package/packages/table/src/table.js +3 -1
  39. package/packages/tools/dom.js +1 -1
  40. package/types/table.d.ts +1 -0
  41. package/types/v-x-e-table/renderer.d.ts +9 -7
  42. /package/lib/icon/style/{iconfont.1681255874086.ttf → iconfont.1683440144042.ttf} +0 -0
  43. /package/lib/icon/style/{iconfont.1681255874086.woff → iconfont.1683440144042.woff} +0 -0
  44. /package/lib/icon/style/{iconfont.1681255874086.woff2 → iconfont.1683440144042.woff2} +0 -0
  45. /package/lib/{iconfont.1681255874086.ttf → iconfont.1683440144042.ttf} +0 -0
  46. /package/lib/{iconfont.1681255874086.woff → iconfont.1683440144042.woff} +0 -0
  47. /package/lib/{iconfont.1681255874086.woff2 → iconfont.1683440144042.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -11033,7 +11033,7 @@ var es_array_concat = __webpack_require__(2222);
11033
11033
 
11034
11034
 
11035
11035
  function getLog(message, params) {
11036
- return "[vxe-table v".concat("3.6.13", "] ").concat(conf.i18n(message, params));
11036
+ return "[vxe-table v".concat("3.6.14-beta.0", "] ").concat(conf.i18n(message, params));
11037
11037
  }
11038
11038
  function outLog(type) {
11039
11039
  return function (message, params) {
@@ -12220,7 +12220,7 @@ function _t(key, args) {
12220
12220
  var v = 'v3';
12221
12221
  var VXETable = {
12222
12222
  v: v,
12223
- version: "3.6.13",
12223
+ version: "3.6.14-beta.0",
12224
12224
  reg: reg,
12225
12225
  use: use,
12226
12226
  setup: setup,
@@ -12587,7 +12587,7 @@ var DomTools = {
12587
12587
  */
12588
12588
  getEventTargetNode: function getEventTargetNode(evnt, container, queryCls, queryMethod) {
12589
12589
  var targetElem;
12590
- var target = evnt.target;
12590
+ var target = evnt.target.shadowRoot && evnt.composed ? evnt.composedPath()[0] || evnt.target : evnt.target;
12591
12591
  while (target && target.nodeType && target !== document) {
12592
12592
  if (queryCls && hasClass(target, queryCls) && (!queryMethod || queryMethod(target))) {
12593
12593
  targetElem = target;
@@ -13086,7 +13086,8 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
13086
13086
  var rowHeight = rowOpts.height;
13087
13087
  var renderOpts = editRender || cellRender;
13088
13088
  var compConf = renderOpts ? v_x_e_table.renderer.get(renderOpts.name) : null;
13089
- var cellClassName = compConf ? compConf.cellClassName : '';
13089
+ var compCellClassName = compConf ? compConf.cellClassName : '';
13090
+ var compCellStyle = compConf ? compConf.cellStyle : '';
13090
13091
  var showAllTip = tooltipOpts.showAll || tooltipOpts.enabled;
13091
13092
  var columnIndex = $xetable.getColumnIndex(column);
13092
13093
  var _columnIndex = $xetable.getVTColumnIndex(column);
@@ -13268,12 +13269,12 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
13268
13269
  }
13269
13270
  }
13270
13271
  return h('td', {
13271
- "class": ['vxe-body--column', column.id, (_ref2 = {}, _defineProperty(_ref2, "col--".concat(cellAlign), cellAlign), _defineProperty(_ref2, "col--".concat(type), type), _defineProperty(_ref2, 'col--last', $columnIndex === columns.length - 1), _defineProperty(_ref2, 'col--tree-node', treeNode), _defineProperty(_ref2, 'col--edit', isEdit), _defineProperty(_ref2, 'col--ellipsis', hasEllipsis), _defineProperty(_ref2, 'fixed--hidden', fixedHiddenColumn), _defineProperty(_ref2, 'col--dirty', isDirty), _defineProperty(_ref2, 'col--actived', editConfig && isEdit && actived.row === row && (actived.column === column || editOpts.mode === 'row')), _defineProperty(_ref2, 'col--valid-error', hasValidError), _defineProperty(_ref2, 'col--current', currentColumn === column), _ref2), utils.getClass(cellClassName, params), utils.getClass(className, params), utils.getClass(allCellClassName, params)],
13272
+ "class": ['vxe-body--column', column.id, (_ref2 = {}, _defineProperty(_ref2, "col--".concat(cellAlign), cellAlign), _defineProperty(_ref2, "col--".concat(type), type), _defineProperty(_ref2, 'col--last', $columnIndex === columns.length - 1), _defineProperty(_ref2, 'col--tree-node', treeNode), _defineProperty(_ref2, 'col--edit', isEdit), _defineProperty(_ref2, 'col--ellipsis', hasEllipsis), _defineProperty(_ref2, 'fixed--hidden', fixedHiddenColumn), _defineProperty(_ref2, 'col--dirty', isDirty), _defineProperty(_ref2, 'col--actived', editConfig && isEdit && actived.row === row && (actived.column === column || editOpts.mode === 'row')), _defineProperty(_ref2, 'col--valid-error', hasValidError), _defineProperty(_ref2, 'col--current', currentColumn === column), _ref2), utils.getClass(compCellClassName, params), utils.getClass(className, params), utils.getClass(allCellClassName, params)],
13272
13273
  key: columnKey || columnOpts.useKey ? column.id : $columnIndex,
13273
13274
  attrs: attrs,
13274
13275
  style: Object.assign({
13275
13276
  height: hasEllipsis && (scrollYRHeight || rowHeight) ? "".concat(scrollYRHeight || rowHeight, "px") : ''
13276
- }, cellStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(cellStyle) ? cellStyle(params) : cellStyle : null),
13277
+ }, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(compCellStyle) ? compCellStyle(params) : compCellStyle, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(cellStyle) ? cellStyle(params) : cellStyle),
13277
13278
  on: tdOns
13278
13279
  }, tdVNs);
13279
13280
  }
@@ -13291,7 +13292,6 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
13291
13292
  editOpts = $xetable.editOpts,
13292
13293
  treeExpandeds = $xetable.treeExpandeds,
13293
13294
  scrollYLoad = $xetable.scrollYLoad,
13294
- editStore = $xetable.editStore,
13295
13295
  rowExpandeds = $xetable.rowExpandeds,
13296
13296
  radioOpts = $xetable.radioOpts,
13297
13297
  checkboxOpts = $xetable.checkboxOpts,
@@ -13347,7 +13347,7 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
13347
13347
  // 是否新增行
13348
13348
  var isNewRow = false;
13349
13349
  if (editConfig) {
13350
- isNewRow = editStore.insertList.indexOf(row) > -1;
13350
+ isNewRow = $xetable.isInsertByRow(row);
13351
13351
  }
13352
13352
  if (treeConfig && !scrollYLoad && !treeOpts.transform && treeExpandeds.length) {
13353
13353
  rowChildren = row[treeOpts.children];
@@ -13526,6 +13526,7 @@ function syncBodyScroll(_vm, fixedType, scrollTop, elem1, elem2) {
13526
13526
  tableData = $xetable.tableData,
13527
13527
  tableColumn = $xetable.tableColumn,
13528
13528
  visibleColumn = $xetable.visibleColumn,
13529
+ expandColumn = $xetable.expandColumn,
13529
13530
  allColumnOverflow = $xetable.showOverflow,
13530
13531
  keyboardConfig = $xetable.keyboardConfig,
13531
13532
  keyboardOpts = $xetable.keyboardOpts,
@@ -13540,7 +13541,8 @@ function syncBodyScroll(_vm, fixedType, scrollTop, elem1, elem2) {
13540
13541
  sYOpts = $xetable.sYOpts;
13541
13542
  // 如果是使用优化模式
13542
13543
  if (fixedType) {
13543
- if (scrollXLoad || scrollYLoad || (allColumnOverflow ? isAllOverflow : allColumnOverflow)) {
13544
+ // 如果存在展开行使用全量渲染
13545
+ if (!expandColumn && (scrollXLoad || scrollYLoad || (allColumnOverflow ? isAllOverflow : allColumnOverflow))) {
13544
13546
  if (!mergeList.length && !spanMethod && !(keyboardConfig && keyboardOpts.isMerge)) {
13545
13547
  tableColumn = fixedColumn;
13546
13548
  } else {
@@ -15741,8 +15743,9 @@ var Methods = {
15741
15743
  treeOpts = this.treeOpts,
15742
15744
  sYOpts = this.sYOpts;
15743
15745
  var transform = treeOpts.transform;
15746
+ var allList = fullData || this.tableFullData;
15744
15747
  // 如果gt为0,则总是启用
15745
- var scrollYLoad = (transform || !treeConfig) && !!sYOpts.enabled && sYOpts.gt > -1 && (sYOpts.gt === 0 || sYOpts.gt <= fullData.length);
15748
+ var scrollYLoad = (transform || !treeConfig) && !!sYOpts.enabled && sYOpts.gt > -1 && (sYOpts.gt === 0 || sYOpts.gt <= allList.length);
15746
15749
  this.scrollYLoad = scrollYLoad;
15747
15750
  return scrollYLoad;
15748
15751
  },
@@ -15785,7 +15788,9 @@ var Methods = {
15785
15788
  scrollXStore.startIndex = 0;
15786
15789
  scrollXStore.endIndex = 1;
15787
15790
  editStore.insertList = [];
15791
+ editStore.insertMaps = {};
15788
15792
  editStore.removeList = [];
15793
+ editStore.removeMaps = {};
15789
15794
  var sYLoad = this.updateScrollYStatus(fullData);
15790
15795
  this.scrollYLoad = sYLoad;
15791
15796
  // 全量数据
@@ -16276,47 +16281,53 @@ var Methods = {
16276
16281
  },
16277
16282
  /**
16278
16283
  * 定义行数据中的列属性,如果不存在则定义
16279
- * @param {Row} record 行数据
16284
+ * @param {Row} records 行数据
16280
16285
  */
16281
- defineField: function defineField(record) {
16286
+ defineField: function defineField(records) {
16287
+ var _this13 = this;
16282
16288
  var radioOpts = this.radioOpts,
16283
16289
  checkboxOpts = this.checkboxOpts,
16284
16290
  treeConfig = this.treeConfig,
16285
16291
  treeOpts = this.treeOpts,
16286
16292
  expandOpts = this.expandOpts;
16287
16293
  var rowkey = getRowkey(this);
16288
- this.tableFullColumn.forEach(function (column) {
16289
- var field = column.field,
16290
- editRender = column.editRender;
16291
- if (field && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().has(record, field)) {
16292
- var cellValue = null;
16293
- if (editRender) {
16294
- var defaultValue = editRender.defaultValue;
16295
- if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(defaultValue)) {
16296
- cellValue = defaultValue({
16297
- column: column
16298
- });
16299
- } else if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(defaultValue)) {
16300
- cellValue = defaultValue;
16294
+ if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(records)) {
16295
+ records = [records];
16296
+ }
16297
+ return records.map(function (record) {
16298
+ _this13.tableFullColumn.forEach(function (column) {
16299
+ var field = column.field,
16300
+ editRender = column.editRender;
16301
+ if (field && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().has(record, field)) {
16302
+ var cellValue = null;
16303
+ if (editRender) {
16304
+ var defaultValue = editRender.defaultValue;
16305
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(defaultValue)) {
16306
+ cellValue = defaultValue({
16307
+ column: column
16308
+ });
16309
+ } else if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(defaultValue)) {
16310
+ cellValue = defaultValue;
16311
+ }
16301
16312
  }
16313
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(record, field, cellValue);
16314
+ }
16315
+ });
16316
+ var otherFields = [radioOpts.labelField, checkboxOpts.checkField, checkboxOpts.labelField, expandOpts.labelField];
16317
+ otherFields.forEach(function (key) {
16318
+ if (key && eqEmptyValue(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(record, key))) {
16319
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(record, key, null);
16302
16320
  }
16303
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(record, field, cellValue);
16321
+ });
16322
+ if (treeConfig && treeOpts.lazy && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(record[treeOpts.children])) {
16323
+ record[treeOpts.children] = null;
16304
16324
  }
16305
- });
16306
- var otherFields = [radioOpts.labelField, checkboxOpts.checkField, checkboxOpts.labelField, expandOpts.labelField];
16307
- otherFields.forEach(function (key) {
16308
- if (key && eqEmptyValue(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(record, key))) {
16309
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(record, key, null);
16325
+ // 必须有行数据的唯一主键,可以自行设置;也可以默认生成一个随机数
16326
+ if (eqEmptyValue(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(record, rowkey))) {
16327
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(record, rowkey, getRowUniqueId());
16310
16328
  }
16329
+ return record;
16311
16330
  });
16312
- if (treeConfig && treeOpts.lazy && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(record[treeOpts.children])) {
16313
- record[treeOpts.children] = null;
16314
- }
16315
- // 必须有行数据的唯一主键,可以自行设置;也可以默认生成一个随机数
16316
- if (eqEmptyValue(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(record, rowkey))) {
16317
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(record, rowkey, getRowUniqueId());
16318
- }
16319
- return record;
16320
16331
  },
16321
16332
  /**
16322
16333
  * 创建 data 对象
@@ -16324,11 +16335,11 @@ var Methods = {
16324
16335
  * @param {Array} records 新数据
16325
16336
  */
16326
16337
  createData: function createData(records) {
16327
- var _this13 = this;
16338
+ var _this14 = this;
16328
16339
  var treeConfig = this.treeConfig,
16329
16340
  treeOpts = this.treeOpts;
16330
16341
  var handleRrecord = function handleRrecord(record) {
16331
- return _this13.defineField(Object.assign({}, record));
16342
+ return _this14.defineField(Object.assign({}, record));
16332
16343
  };
16333
16344
  var rows = treeConfig ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().mapTree(records, handleRrecord, treeOpts) : records.map(handleRrecord);
16334
16345
  return this.$nextTick().then(function () {
@@ -16341,13 +16352,13 @@ var Methods = {
16341
16352
  * @param {Array/Object} records 新数据
16342
16353
  */
16343
16354
  createRow: function createRow(records) {
16344
- var _this14 = this;
16355
+ var _this15 = this;
16345
16356
  var isArr = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(records);
16346
16357
  if (!isArr) {
16347
16358
  records = [records];
16348
16359
  }
16349
16360
  return this.$nextTick().then(function () {
16350
- return _this14.createData(records).then(function (rows) {
16361
+ return _this15.createData(records).then(function (rows) {
16351
16362
  return isArr ? rows : rows[0];
16352
16363
  });
16353
16364
  });
@@ -16360,7 +16371,7 @@ var Methods = {
16360
16371
  * 如果还额外传了 field 则还原指定的单元格数据
16361
16372
  */
16362
16373
  revertData: function revertData(rows, field) {
16363
- var _this15 = this;
16374
+ var _this16 = this;
16364
16375
  var keepSource = this.keepSource,
16365
16376
  tableSourceData = this.tableSourceData,
16366
16377
  treeConfig = this.treeConfig;
@@ -16378,8 +16389,8 @@ var Methods = {
16378
16389
  }
16379
16390
  if (targetRows.length) {
16380
16391
  targetRows.forEach(function (row) {
16381
- if (!_this15.isInsertByRow(row)) {
16382
- var rowIndex = _this15.getRowIndex(row);
16392
+ if (!_this16.isInsertByRow(row)) {
16393
+ var rowIndex = _this16.getRowIndex(row);
16383
16394
  if (treeConfig && rowIndex === -1) {
16384
16395
  errLog('vxe.error.noTree', ['revertData']);
16385
16396
  }
@@ -16436,7 +16447,9 @@ var Methods = {
16436
16447
  * @param {Row} row 行对象
16437
16448
  */
16438
16449
  isInsertByRow: function isInsertByRow(row) {
16439
- return this.editStore.insertList.indexOf(row) > -1;
16450
+ var editStore = this.editStore;
16451
+ var rowid = getRowid(this, row);
16452
+ return editStore.insertList.length && editStore.insertMaps[rowid];
16440
16453
  },
16441
16454
  /**
16442
16455
  * 删除所有新增的临时数据
@@ -16451,7 +16464,7 @@ var Methods = {
16451
16464
  * @param {String} field 字段名
16452
16465
  */
16453
16466
  isUpdateByRow: function isUpdateByRow(row, field) {
16454
- var _this16 = this;
16467
+ var _this17 = this;
16455
16468
  var visibleColumn = this.visibleColumn,
16456
16469
  keepSource = this.keepSource,
16457
16470
  treeConfig = this.treeConfig,
@@ -16468,7 +16481,7 @@ var Methods = {
16468
16481
  if (treeConfig) {
16469
16482
  var children = treeOpts.children;
16470
16483
  var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(tableSourceData, function (item) {
16471
- return rowid === getRowid(_this16, item);
16484
+ return rowid === getRowid(_this17, item);
16472
16485
  }, treeOpts);
16473
16486
  row = Object.assign({}, row, _defineProperty({}, children, null));
16474
16487
  if (matchObj) {
@@ -16539,7 +16552,7 @@ var Methods = {
16539
16552
  * 用于多选行,获取已选中的数据
16540
16553
  */
16541
16554
  getCheckboxRecords: function getCheckboxRecords(isFull) {
16542
- var _this17 = this;
16555
+ var _this18 = this;
16543
16556
  var tableFullData = this.tableFullData,
16544
16557
  afterFullData = this.afterFullData,
16545
16558
  treeConfig = this.treeConfig,
@@ -16569,13 +16582,13 @@ var Methods = {
16569
16582
  var selection = this.selection;
16570
16583
  if (treeConfig) {
16571
16584
  rowList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().filterTree(currTableData, function (row) {
16572
- return _this17.findRowIndexOf(selection, row) > -1;
16585
+ return _this18.findRowIndexOf(selection, row) > -1;
16573
16586
  }, {
16574
16587
  children: transform ? mapChildren : children
16575
16588
  });
16576
16589
  } else {
16577
16590
  rowList = currTableData.filter(function (row) {
16578
- return _this17.findRowIndexOf(selection, row) > -1;
16591
+ return _this18.findRowIndexOf(selection, row) > -1;
16579
16592
  });
16580
16593
  }
16581
16594
  }
@@ -16613,7 +16626,7 @@ var Methods = {
16613
16626
  * 如果存在筛选条件,继续处理
16614
16627
  */
16615
16628
  updateAfterFullData: function updateAfterFullData() {
16616
- var _this18 = this;
16629
+ var _this19 = this;
16617
16630
  var tableFullColumn = this.tableFullColumn,
16618
16631
  tableFullData = this.tableFullData,
16619
16632
  filterOpts = this.filterOpts,
@@ -16689,7 +16702,7 @@ var Methods = {
16689
16702
  cellValue: cellValue,
16690
16703
  row: row,
16691
16704
  column: column,
16692
- $table: _this18
16705
+ $table: _this19
16693
16706
  });
16694
16707
  });
16695
16708
  } else if (compFilterMethod) {
@@ -16700,7 +16713,7 @@ var Methods = {
16700
16713
  cellValue: cellValue,
16701
16714
  row: row,
16702
16715
  column: column,
16703
- $table: _this18
16716
+ $table: _this19
16704
16717
  });
16705
16718
  });
16706
16719
  } else if (allFilterMethod) {
@@ -16719,7 +16732,7 @@ var Methods = {
16719
16732
  cellValue: cellValue,
16720
16733
  row: row,
16721
16734
  column: column,
16722
- $table: _this18
16735
+ $table: _this19
16723
16736
  });
16724
16737
  });
16725
16738
  }
@@ -16767,7 +16780,7 @@ var Methods = {
16767
16780
  tableTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(tableTree, orderColumns.map(function (_ref2) {
16768
16781
  var column = _ref2.column,
16769
16782
  order = _ref2.order;
16770
- return [getOrderField(_this18, column), order];
16783
+ return [getOrderField(_this19, column), order];
16771
16784
  }));
16772
16785
  }
16773
16786
  tableData = tableTree;
@@ -16789,7 +16802,7 @@ var Methods = {
16789
16802
  tableData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(tableData, orderColumns.map(function (_ref3) {
16790
16803
  var column = _ref3.column,
16791
16804
  order = _ref3.order;
16792
- return [getOrderField(_this18, column), order];
16805
+ return [getOrderField(_this19, column), order];
16793
16806
  }));
16794
16807
  } else {
16795
16808
  // 兼容 v2,在 v4 中废弃, sortBy 不能为数组
@@ -16802,7 +16815,7 @@ var Methods = {
16802
16815
  tableData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(tableData, sortByConfs || [firstOrderColumn].map(function (_ref4) {
16803
16816
  var column = _ref4.column,
16804
16817
  order = _ref4.order;
16805
- return [getOrderField(_this18, column), order];
16818
+ return [getOrderField(_this19, column), order];
16806
16819
  }));
16807
16820
  }
16808
16821
  }
@@ -16818,7 +16831,7 @@ var Methods = {
16818
16831
  * 对渲染中的数据提前解析序号及索引。牺牲提前编译耗时换取渲染中额外损耗,使运行时更加流畅
16819
16832
  */
16820
16833
  updateAfterDataIndex: function updateAfterDataIndex() {
16821
- var _this19 = this;
16834
+ var _this20 = this;
16822
16835
  var treeConfig = this.treeConfig,
16823
16836
  afterFullData = this.afterFullData,
16824
16837
  fullDataRowIdData = this.fullDataRowIdData,
@@ -16827,7 +16840,7 @@ var Methods = {
16827
16840
  treeOpts = this.treeOpts;
16828
16841
  if (treeConfig) {
16829
16842
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(afterTreeFullData, function (row, index, items, path) {
16830
- var rowid = getRowid(_this19, row);
16843
+ var rowid = getRowid(_this20, row);
16831
16844
  var allrest = fullAllDataRowIdData[rowid];
16832
16845
  var seq = path.map(function (num, i) {
16833
16846
  return i % 2 === 0 ? Number(num) + 1 : '.';
@@ -16855,7 +16868,7 @@ var Methods = {
16855
16868
  });
16856
16869
  } else {
16857
16870
  afterFullData.forEach(function (row, index) {
16858
- var rowid = getRowid(_this19, row);
16871
+ var rowid = getRowid(_this20, row);
16859
16872
  var allrest = fullAllDataRowIdData[rowid];
16860
16873
  var seq = index + 1;
16861
16874
  if (allrest) {
@@ -16937,7 +16950,7 @@ var Methods = {
16937
16950
  * 默认执行一次,除非被重置
16938
16951
  */
16939
16952
  handleLoadDefaults: function handleLoadDefaults() {
16940
- var _this20 = this;
16953
+ var _this21 = this;
16941
16954
  if (this.checkboxConfig) {
16942
16955
  this.handleDefaultSelectionChecked();
16943
16956
  }
@@ -16957,7 +16970,7 @@ var Methods = {
16957
16970
  this.handleDefaultMergeFooterItems();
16958
16971
  }
16959
16972
  this.$nextTick(function () {
16960
- return setTimeout(_this20.recalculate);
16973
+ return setTimeout(_this21.recalculate);
16961
16974
  });
16962
16975
  },
16963
16976
  /**
@@ -17195,11 +17208,11 @@ var Methods = {
17195
17208
  * 刷新列配置
17196
17209
  */
17197
17210
  refreshColumn: function refreshColumn() {
17198
- var _this21 = this;
17211
+ var _this22 = this;
17199
17212
  return this.parseColumns().then(function () {
17200
- return _this21.refreshScroll();
17213
+ return _this22.refreshScroll();
17201
17214
  }).then(function () {
17202
- return _this21.recalculate();
17215
+ return _this22.recalculate();
17203
17216
  });
17204
17217
  },
17205
17218
  /**
@@ -17207,7 +17220,7 @@ var Methods = {
17207
17220
  * 将固定的列左边、右边分别靠边
17208
17221
  */
17209
17222
  parseColumns: function parseColumns() {
17210
- var _this22 = this;
17223
+ var _this23 = this;
17211
17224
  var leftList = [];
17212
17225
  var centerList = [];
17213
17226
  var rightList = [];
@@ -17300,10 +17313,10 @@ var Methods = {
17300
17313
  this.visibleColumn = visibleColumn;
17301
17314
  this.handleTableColumn();
17302
17315
  return this.updateFooter().then(function () {
17303
- return _this22.recalculate();
17316
+ return _this23.recalculate();
17304
17317
  }).then(function () {
17305
- _this22.updateCellAreas();
17306
- return _this22.recalculate();
17318
+ _this23.updateCellAreas();
17319
+ return _this23.recalculate();
17307
17320
  });
17308
17321
  },
17309
17322
  /**
@@ -17355,7 +17368,7 @@ var Methods = {
17355
17368
  * 刷新滚动操作,手动同步滚动相关位置(对于某些特殊的操作,比如滚动条错位、固定列不同步)
17356
17369
  */
17357
17370
  refreshScroll: function refreshScroll() {
17358
- var _this23 = this;
17371
+ var _this24 = this;
17359
17372
  var lastScrollLeft = this.lastScrollLeft,
17360
17373
  lastScrollTop = this.lastScrollTop;
17361
17374
  var $refs = this.$refs;
@@ -17370,7 +17383,7 @@ var Methods = {
17370
17383
  return new Promise(function (resolve) {
17371
17384
  // 还原滚动条位置
17372
17385
  if (lastScrollLeft || lastScrollTop) {
17373
- return restoreScrollLocation(_this23, lastScrollLeft, lastScrollTop).then(function () {
17386
+ return restoreScrollLocation(_this24, lastScrollLeft, lastScrollTop).then(function () {
17374
17387
  // 存在滚动行为未结束情况
17375
17388
  setTimeout(resolve, 30);
17376
17389
  });
@@ -17389,7 +17402,7 @@ var Methods = {
17389
17402
  * 支持 width=? width=?px width=?% min-width=? min-width=?px min-width=?%
17390
17403
  */
17391
17404
  recalculate: function recalculate(refull) {
17392
- var _this24 = this;
17405
+ var _this25 = this;
17393
17406
  var $refs = this.$refs;
17394
17407
  var tableBody = $refs.tableBody,
17395
17408
  tableHeader = $refs.tableHeader,
@@ -17402,8 +17415,8 @@ var Methods = {
17402
17415
  if (refull === true) {
17403
17416
  // 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
17404
17417
  return this.computeScrollLoad().then(function () {
17405
- _this24.autoCellWidth(headerElem, bodyElem, footerElem);
17406
- return _this24.computeScrollLoad();
17418
+ _this25.autoCellWidth(headerElem, bodyElem, footerElem);
17419
+ return _this25.computeScrollLoad();
17407
17420
  });
17408
17421
  }
17409
17422
  }
@@ -17537,7 +17550,7 @@ var Methods = {
17537
17550
  this.customMaxHeight = calcHeight(this, 'maxHeight');
17538
17551
  },
17539
17552
  updateStyle: function updateStyle() {
17540
- var _this25 = this;
17553
+ var _this26 = this;
17541
17554
  var $refs = this.$refs,
17542
17555
  isGroup = this.isGroup,
17543
17556
  fullColumnIdData = this.fullColumnIdData,
@@ -17625,7 +17638,7 @@ var Methods = {
17625
17638
  var listElem = elemStore["".concat(name, "-").concat(layout, "-list")];
17626
17639
  if (isGroup && listElem) {
17627
17640
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(listElem.querySelectorAll('.col--group'), function (thElem) {
17628
- var colNode = _this25.getColumnNode(thElem);
17641
+ var colNode = _this26.getColumnNode(thElem);
17629
17642
  if (colNode) {
17630
17643
  var column = colNode.item;
17631
17644
  var showHeaderOverflow = column.showHeaderOverflow;
@@ -17679,7 +17692,8 @@ var Methods = {
17679
17692
 
17680
17693
  // 如果是使用优化模式
17681
17694
  if (fixedType) {
17682
- if (scrollXLoad || scrollYLoad || (allColumnOverflow ? isAllOverflow : allColumnOverflow)) {
17695
+ // 如果存在展开行使用全量渲染
17696
+ if (!_this26.expandColumn && (scrollXLoad || scrollYLoad || (allColumnOverflow ? isAllOverflow : allColumnOverflow))) {
17683
17697
  if (!mergeList.length && !spanMethod && !(keyboardConfig && keyboardOpts.isMerge)) {
17684
17698
  _renderColumnList = fixedColumn;
17685
17699
  } else {
@@ -17706,7 +17720,8 @@ var Methods = {
17706
17720
 
17707
17721
  // 如果是使用优化模式
17708
17722
  if (fixedType) {
17709
- if (scrollXLoad || allColumnFooterOverflow) {
17723
+ // 如果存在展开行使用全量渲染
17724
+ if (!_this26.expandColumn && (scrollXLoad || allColumnFooterOverflow)) {
17710
17725
  if (!mergeFooterList.length || !footerSpanMethod) {
17711
17726
  _renderColumnList2 = fixedColumn;
17712
17727
  } else {
@@ -17773,9 +17788,9 @@ var Methods = {
17773
17788
  var colWidth = column.renderWidth;
17774
17789
  if (cellElem) {
17775
17790
  if (colspan > 1) {
17776
- var columnIndex = _this25.getColumnIndex(column);
17791
+ var columnIndex = _this26.getColumnIndex(column);
17777
17792
  for (var _index = 1; _index < colspan; _index++) {
17778
- var nextColumn = _this25.getColumns(columnIndex + _index);
17793
+ var nextColumn = _this26.getColumns(columnIndex + _index);
17779
17794
  if (nextColumn) {
17780
17795
  colWidth += nextColumn.renderWidth;
17781
17796
  }
@@ -17817,13 +17832,13 @@ var Methods = {
17817
17832
  }
17818
17833
  },
17819
17834
  preventEvent: function preventEvent(evnt, type, args, next, end) {
17820
- var _this26 = this;
17835
+ var _this27 = this;
17821
17836
  var evntList = v_x_e_table.interceptor.get(type);
17822
17837
  var rest;
17823
17838
  if (!evntList.some(function (func) {
17824
17839
  return func(Object.assign({
17825
- $grid: _this26.$xegrid,
17826
- $table: _this26,
17840
+ $grid: _this27.$xegrid,
17841
+ $table: _this27,
17827
17842
  $event: evnt
17828
17843
  }, args)) === false;
17829
17844
  })) {
@@ -17840,7 +17855,7 @@ var Methods = {
17840
17855
  * 全局按下事件处理
17841
17856
  */
17842
17857
  handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
17843
- var _this27 = this;
17858
+ var _this28 = this;
17844
17859
  var $el = this.$el,
17845
17860
  $refs = this.$refs,
17846
17861
  $xegrid = this.$xegrid,
@@ -17896,7 +17911,7 @@ var Methods = {
17896
17911
  isClearActived = getEventTargetNode(evnt, $el, 'vxe-footer--row').flag;
17897
17912
  }
17898
17913
  // 如果固定了高度且点击了行之外的空白处,则清除激活状态
17899
- if (!isClearActived && _this27.height && !_this27.overflowY) {
17914
+ if (!isClearActived && _this28.height && !_this28.overflowY) {
17900
17915
  var bodyWrapperElem = evnt.target;
17901
17916
  if (methods_hasClass(bodyWrapperElem, 'vxe-table--body-wrapper')) {
17902
17917
  isClearActived = evnt.offsetY < bodyWrapperElem.clientHeight;
@@ -17906,7 +17921,7 @@ var Methods = {
17906
17921
  // 如果点击了当前表格之外
17907
17922
  !getEventTargetNode(evnt, $el).flag) {
17908
17923
  setTimeout(function () {
17909
- return _this27.clearEdit(evnt);
17924
+ return _this28.clearEdit(evnt);
17910
17925
  });
17911
17926
  }
17912
17927
  });
@@ -17919,8 +17934,8 @@ var Methods = {
17919
17934
  this.clearSelected();
17920
17935
  if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-areas-clear').flag) {
17921
17936
  this.preventEvent(evnt, 'event.clearAreas', {}, function () {
17922
- _this27.clearCellAreas();
17923
- _this27.clearCopyCellArea();
17937
+ _this28.clearCellAreas();
17938
+ _this28.clearCopyCellArea();
17924
17939
  });
17925
17940
  }
17926
17941
  }
@@ -17950,7 +17965,7 @@ var Methods = {
17950
17965
  * 表格键盘事件
17951
17966
  */
17952
17967
  keydownEvent: function keydownEvent(evnt) {
17953
- var _this28 = this;
17968
+ var _this29 = this;
17954
17969
  var filterStore = this.filterStore,
17955
17970
  ctxMenuStore = this.ctxMenuStore,
17956
17971
  editStore = this.editStore,
@@ -17963,30 +17978,30 @@ var Methods = {
17963
17978
  var isEsc = keyCode === 27;
17964
17979
  if (isEsc) {
17965
17980
  this.preventEvent(evnt, 'event.keydown', null, function () {
17966
- _this28.emitEvent('keydown-start', {}, evnt);
17967
- if (keyboardConfig && mouseConfig && mouseOpts.area && _this28.handleKeyboardEvent) {
17968
- _this28.handleKeyboardEvent(evnt);
17981
+ _this29.emitEvent('keydown-start', {}, evnt);
17982
+ if (keyboardConfig && mouseConfig && mouseOpts.area && _this29.handleKeyboardEvent) {
17983
+ _this29.handleKeyboardEvent(evnt);
17969
17984
  } else if (actived.row || filterStore.visible || ctxMenuStore.visible) {
17970
17985
  evnt.stopPropagation();
17971
17986
  // 如果按下了 Esc 键,关闭快捷菜单、筛选
17972
- _this28.closeFilter();
17973
- _this28.closeMenu();
17987
+ _this29.closeFilter();
17988
+ _this29.closeMenu();
17974
17989
  if (keyboardConfig && keyboardOpts.isEsc) {
17975
17990
  // 如果是激活编辑状态,则取消编辑
17976
17991
  if (actived.row) {
17977
17992
  var params = actived.args;
17978
- _this28.clearEdit(evnt);
17993
+ _this29.clearEdit(evnt);
17979
17994
  // 如果配置了选中功能,则为选中状态
17980
17995
  if (mouseConfig && mouseOpts.selected) {
17981
- _this28.$nextTick(function () {
17982
- return _this28.handleSelected(params, evnt);
17996
+ _this29.$nextTick(function () {
17997
+ return _this29.handleSelected(params, evnt);
17983
17998
  });
17984
17999
  }
17985
18000
  }
17986
18001
  }
17987
18002
  }
17988
- _this28.emitEvent('keydown', {}, evnt);
17989
- _this28.emitEvent('keydown-end', {}, evnt);
18003
+ _this29.emitEvent('keydown', {}, evnt);
18004
+ _this29.emitEvent('keydown-end', {}, evnt);
17990
18005
  });
17991
18006
  }
17992
18007
  },
@@ -17994,26 +18009,26 @@ var Methods = {
17994
18009
  * 全局键盘事件
17995
18010
  */
17996
18011
  handleGlobalKeydownEvent: function handleGlobalKeydownEvent(evnt) {
17997
- var _this29 = this;
18012
+ var _this30 = this;
17998
18013
  // 该行为只对当前激活的表格有效
17999
18014
  if (this.isActivated) {
18000
18015
  this.preventEvent(evnt, 'event.keydown', null, function () {
18001
- var filterStore = _this29.filterStore,
18002
- isCtxMenu = _this29.isCtxMenu,
18003
- ctxMenuStore = _this29.ctxMenuStore,
18004
- editStore = _this29.editStore,
18005
- editOpts = _this29.editOpts,
18006
- editConfig = _this29.editConfig,
18007
- mouseConfig = _this29.mouseConfig,
18008
- mouseOpts = _this29.mouseOpts,
18009
- keyboardConfig = _this29.keyboardConfig,
18010
- keyboardOpts = _this29.keyboardOpts,
18011
- treeConfig = _this29.treeConfig,
18012
- treeOpts = _this29.treeOpts,
18013
- highlightCurrentRow = _this29.highlightCurrentRow,
18014
- currentRow = _this29.currentRow,
18015
- bodyCtxMenu = _this29.bodyCtxMenu,
18016
- rowOpts = _this29.rowOpts;
18016
+ var filterStore = _this30.filterStore,
18017
+ isCtxMenu = _this30.isCtxMenu,
18018
+ ctxMenuStore = _this30.ctxMenuStore,
18019
+ editStore = _this30.editStore,
18020
+ editOpts = _this30.editOpts,
18021
+ editConfig = _this30.editConfig,
18022
+ mouseConfig = _this30.mouseConfig,
18023
+ mouseOpts = _this30.mouseOpts,
18024
+ keyboardConfig = _this30.keyboardConfig,
18025
+ keyboardOpts = _this30.keyboardOpts,
18026
+ treeConfig = _this30.treeConfig,
18027
+ treeOpts = _this30.treeOpts,
18028
+ highlightCurrentRow = _this30.highlightCurrentRow,
18029
+ currentRow = _this30.currentRow,
18030
+ bodyCtxMenu = _this30.bodyCtxMenu,
18031
+ rowOpts = _this30.rowOpts;
18017
18032
  var selected = editStore.selected,
18018
18033
  actived = editStore.actived;
18019
18034
  var keyCode = evnt.keyCode;
@@ -18039,7 +18054,7 @@ var Methods = {
18039
18054
  var params;
18040
18055
  if (filterStore.visible) {
18041
18056
  if (isEsc) {
18042
- _this29.closeFilter();
18057
+ _this30.closeFilter();
18043
18058
  }
18044
18059
  return;
18045
18060
  }
@@ -18047,19 +18062,19 @@ var Methods = {
18047
18062
  // 如果配置了右键菜单; 支持方向键操作、回车
18048
18063
  evnt.preventDefault();
18049
18064
  if (ctxMenuStore.showChild && hasChildrenList(ctxMenuStore.selected)) {
18050
- _this29.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selectChild', 37, false, ctxMenuStore.selected.children);
18065
+ _this30.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selectChild', 37, false, ctxMenuStore.selected.children);
18051
18066
  } else {
18052
- _this29.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selected', 39, true, _this29.ctxMenuList);
18067
+ _this30.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selected', 39, true, _this30.ctxMenuList);
18053
18068
  }
18054
- } else if (keyboardConfig && mouseConfig && mouseOpts.area && _this29.handleKeyboardEvent) {
18055
- _this29.handleKeyboardEvent(evnt);
18069
+ } else if (keyboardConfig && mouseConfig && mouseOpts.area && _this30.handleKeyboardEvent) {
18070
+ _this30.handleKeyboardEvent(evnt);
18056
18071
  } else if (keyboardConfig && isSpacebar && keyboardOpts.isChecked && selected.row && selected.column && (selected.column.type === 'checkbox' || selected.column.type === 'radio')) {
18057
18072
  // 空格键支持选中复选框
18058
18073
  evnt.preventDefault();
18059
18074
  if (selected.column.type === 'checkbox') {
18060
- _this29.handleToggleCheckRowEvent(evnt, selected.args);
18075
+ _this30.handleToggleCheckRowEvent(evnt, selected.args);
18061
18076
  } else {
18062
- _this29.triggerRadioRowEvent(evnt, selected.args);
18077
+ _this30.triggerRadioRowEvent(evnt, selected.args);
18063
18078
  }
18064
18079
  } else if (isF2 && isEnableConf(editConfig)) {
18065
18080
  if (!isEditStatus) {
@@ -18067,15 +18082,15 @@ var Methods = {
18067
18082
  if (selected.row && selected.column) {
18068
18083
  evnt.stopPropagation();
18069
18084
  evnt.preventDefault();
18070
- _this29.handleActived(selected.args, evnt);
18085
+ _this30.handleActived(selected.args, evnt);
18071
18086
  }
18072
18087
  }
18073
18088
  } else if (isContextMenu) {
18074
18089
  // 如果按下上下文键
18075
- _this29._keyCtx = selected.row && selected.column && bodyCtxMenu.length;
18076
- clearTimeout(_this29.keyCtxTimeout);
18077
- _this29.keyCtxTimeout = setTimeout(function () {
18078
- _this29._keyCtx = false;
18090
+ _this30._keyCtx = selected.row && selected.column && bodyCtxMenu.length;
18091
+ clearTimeout(_this30.keyCtxTimeout);
18092
+ _this30.keyCtxTimeout = setTimeout(function () {
18093
+ _this30._keyCtx = false;
18079
18094
  }, 1000);
18080
18095
  } else if (isEnter && !hasAltKey && keyboardConfig && keyboardOpts.isEnter && (selected.row || actived.row || treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow)) {
18081
18096
  // 退出选中
@@ -18083,11 +18098,11 @@ var Methods = {
18083
18098
  // 如果是激活编辑状态,则取消编辑
18084
18099
  if (actived.row) {
18085
18100
  params = actived.args;
18086
- _this29.clearEdit(evnt);
18101
+ _this30.clearEdit(evnt);
18087
18102
  // 如果配置了选中功能,则为选中状态
18088
18103
  if (mouseConfig && mouseOpts.selected) {
18089
- _this29.$nextTick(function () {
18090
- return _this29.handleSelected(params, evnt);
18104
+ _this30.$nextTick(function () {
18105
+ return _this30.handleSelected(params, evnt);
18091
18106
  });
18092
18107
  }
18093
18108
  }
@@ -18097,15 +18112,15 @@ var Methods = {
18097
18112
  var targetArgs = selected.row ? selected.args : actived.args;
18098
18113
  if (hasShiftKey) {
18099
18114
  if (keyboardOpts.enterToTab) {
18100
- _this29.moveTabSelected(targetArgs, hasShiftKey, evnt);
18115
+ _this30.moveTabSelected(targetArgs, hasShiftKey, evnt);
18101
18116
  } else {
18102
- _this29.moveSelected(targetArgs, isLeftArrow, true, isRightArrow, false, evnt);
18117
+ _this30.moveSelected(targetArgs, isLeftArrow, true, isRightArrow, false, evnt);
18103
18118
  }
18104
18119
  } else {
18105
18120
  if (keyboardOpts.enterToTab) {
18106
- _this29.moveTabSelected(targetArgs, hasShiftKey, evnt);
18121
+ _this30.moveTabSelected(targetArgs, hasShiftKey, evnt);
18107
18122
  } else {
18108
- _this29.moveSelected(targetArgs, isLeftArrow, false, isRightArrow, true, evnt);
18123
+ _this30.moveSelected(targetArgs, isLeftArrow, false, isRightArrow, true, evnt);
18109
18124
  }
18110
18125
  }
18111
18126
  } else if (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
@@ -18115,13 +18130,13 @@ var Methods = {
18115
18130
  evnt.preventDefault();
18116
18131
  var targetRow = childrens[0];
18117
18132
  params = {
18118
- $table: _this29,
18133
+ $table: _this30,
18119
18134
  row: targetRow
18120
18135
  };
18121
- _this29.setTreeExpand(currentRow, true).then(function () {
18122
- return _this29.scrollToRow(targetRow);
18136
+ _this30.setTreeExpand(currentRow, true).then(function () {
18137
+ return _this30.scrollToRow(targetRow);
18123
18138
  }).then(function () {
18124
- return _this29.triggerCurrentRowEvent(evnt, params);
18139
+ return _this30.triggerCurrentRowEvent(evnt, params);
18125
18140
  });
18126
18141
  }
18127
18142
  }
@@ -18130,18 +18145,18 @@ var Methods = {
18130
18145
  if (!isEditStatus) {
18131
18146
  // 如果按下了方向键
18132
18147
  if (selected.row && selected.column) {
18133
- _this29.moveSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt);
18148
+ _this30.moveSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt);
18134
18149
  } else if ((isUpArrow || isDwArrow) && (rowOpts.isCurrent || highlightCurrentRow)) {
18135
18150
  // 当前行按键上下移动
18136
- _this29.moveCurrentRow(isUpArrow, isDwArrow, evnt);
18151
+ _this30.moveCurrentRow(isUpArrow, isDwArrow, evnt);
18137
18152
  }
18138
18153
  }
18139
18154
  } else if (isTab && keyboardConfig && keyboardOpts.isTab) {
18140
18155
  // 如果按下了 Tab 键切换
18141
18156
  if (selected.row || selected.column) {
18142
- _this29.moveTabSelected(selected.args, hasShiftKey, evnt);
18157
+ _this30.moveTabSelected(selected.args, hasShiftKey, evnt);
18143
18158
  } else if (actived.row || actived.column) {
18144
- _this29.moveTabSelected(actived.args, hasShiftKey, evnt);
18159
+ _this30.moveTabSelected(actived.args, hasShiftKey, evnt);
18145
18160
  }
18146
18161
  } else if (keyboardConfig && (isDel || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow ? isBack && keyboardOpts.isArrow : isBack))) {
18147
18162
  if (!isEditStatus) {
@@ -18152,10 +18167,10 @@ var Methods = {
18152
18167
  if (delMethod) {
18153
18168
  delMethod({
18154
18169
  row: selected.row,
18155
- rowIndex: _this29.getRowIndex(selected.row),
18170
+ rowIndex: _this30.getRowIndex(selected.row),
18156
18171
  column: selected.column,
18157
- columnIndex: _this29.getColumnIndex(selected.column),
18158
- $table: _this29
18172
+ columnIndex: _this30.getColumnIndex(selected.column),
18173
+ $table: _this30
18159
18174
  });
18160
18175
  } else {
18161
18176
  setCellValue(selected.row, selected.column, null);
@@ -18164,34 +18179,34 @@ var Methods = {
18164
18179
  if (backMethod) {
18165
18180
  backMethod({
18166
18181
  row: selected.row,
18167
- rowIndex: _this29.getRowIndex(selected.row),
18182
+ rowIndex: _this30.getRowIndex(selected.row),
18168
18183
  column: selected.column,
18169
- columnIndex: _this29.getColumnIndex(selected.column),
18170
- $table: _this29
18184
+ columnIndex: _this30.getColumnIndex(selected.column),
18185
+ $table: _this30
18171
18186
  });
18172
18187
  } else {
18173
- _this29.handleActived(selected.args, evnt);
18188
+ _this30.handleActived(selected.args, evnt);
18174
18189
  }
18175
18190
  } else if (isDel) {
18176
18191
  // 如果按下 del 键,更新表尾数据
18177
- _this29.updateFooter();
18192
+ _this30.updateFooter();
18178
18193
  }
18179
18194
  } else if (isBack && keyboardOpts.isArrow && treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
18180
18195
  // 如果树形表格回退键关闭当前行返回父节点
18181
- var _XEUtils$findTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(_this29.afterFullData, function (item) {
18196
+ var _XEUtils$findTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(_this30.afterFullData, function (item) {
18182
18197
  return item === currentRow;
18183
18198
  }, treeOpts),
18184
18199
  parentRow = _XEUtils$findTree.parent;
18185
18200
  if (parentRow) {
18186
18201
  evnt.preventDefault();
18187
18202
  params = {
18188
- $table: _this29,
18203
+ $table: _this30,
18189
18204
  row: parentRow
18190
18205
  };
18191
- _this29.setTreeExpand(parentRow, false).then(function () {
18192
- return _this29.scrollToRow(parentRow);
18206
+ _this30.setTreeExpand(parentRow, false).then(function () {
18207
+ return _this30.scrollToRow(parentRow);
18193
18208
  }).then(function () {
18194
- return _this29.triggerCurrentRowEvent(evnt, params);
18209
+ return _this30.triggerCurrentRowEvent(evnt, params);
18195
18210
  });
18196
18211
  }
18197
18212
  }
@@ -18206,24 +18221,24 @@ var Methods = {
18206
18221
  if (selected.column && selected.row && isEnableConf(selected.column.editRender)) {
18207
18222
  var beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod;
18208
18223
  if (!beforeEditMethod || beforeEditMethod(_objectSpread2(_objectSpread2({}, selected.args), {}, {
18209
- $table: _this29
18224
+ $table: _this30
18210
18225
  }))) {
18211
18226
  if (editMethod) {
18212
18227
  editMethod({
18213
18228
  row: selected.row,
18214
- rowIndex: _this29.getRowIndex(selected.row),
18229
+ rowIndex: _this30.getRowIndex(selected.row),
18215
18230
  column: selected.column,
18216
- columnIndex: _this29.getColumnIndex(selected.column),
18217
- $table: _this29
18231
+ columnIndex: _this30.getColumnIndex(selected.column),
18232
+ $table: _this30
18218
18233
  });
18219
18234
  } else {
18220
18235
  setCellValue(selected.row, selected.column, null);
18221
- _this29.handleActived(selected.args, evnt);
18236
+ _this30.handleActived(selected.args, evnt);
18222
18237
  }
18223
18238
  }
18224
18239
  }
18225
18240
  }
18226
- _this29.emitEvent('keydown', {}, evnt);
18241
+ _this30.emitEvent('keydown', {}, evnt);
18227
18242
  });
18228
18243
  }
18229
18244
  },
@@ -18298,7 +18313,7 @@ var Methods = {
18298
18313
  }
18299
18314
  },
18300
18315
  handleTargetLeaveEvent: function handleTargetLeaveEvent() {
18301
- var _this30 = this;
18316
+ var _this31 = this;
18302
18317
  var tooltipOpts = this.tooltipOpts;
18303
18318
  var $tooltip = this.$refs.tooltip;
18304
18319
  if ($tooltip) {
@@ -18306,9 +18321,9 @@ var Methods = {
18306
18321
  }
18307
18322
  if (tooltipOpts.enterable) {
18308
18323
  this.tooltipTimeout = setTimeout(function () {
18309
- $tooltip = _this30.$refs.tooltip;
18324
+ $tooltip = _this31.$refs.tooltip;
18310
18325
  if ($tooltip && !$tooltip.isActived()) {
18311
- _this30.closeTooltip();
18326
+ _this31.closeTooltip();
18312
18327
  }
18313
18328
  }, tooltipOpts.leaveDelay);
18314
18329
  } else {
@@ -18486,13 +18501,13 @@ var Methods = {
18486
18501
  * 获取复选框半选状态的行数据
18487
18502
  */
18488
18503
  getCheckboxIndeterminateRecords: function getCheckboxIndeterminateRecords(isFull) {
18489
- var _this31 = this;
18504
+ var _this32 = this;
18490
18505
  var treeConfig = this.treeConfig,
18491
18506
  treeIndeterminates = this.treeIndeterminates,
18492
18507
  fullDataRowIdData = this.fullDataRowIdData;
18493
18508
  if (treeConfig) {
18494
18509
  return isFull ? treeIndeterminates.slice(0) : treeIndeterminates.filter(function (row) {
18495
- var rowid = getRowid(_this31, row);
18510
+ var rowid = getRowid(_this32, row);
18496
18511
  return fullDataRowIdData[rowid];
18497
18512
  });
18498
18513
  }
@@ -18519,12 +18534,12 @@ var Methods = {
18519
18534
  }
18520
18535
  },
18521
18536
  handleCheckedCheckboxRow: function handleCheckedCheckboxRow(rows, value, isForce) {
18522
- var _this32 = this;
18537
+ var _this33 = this;
18523
18538
  if (rows && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows)) {
18524
18539
  rows = [rows];
18525
18540
  }
18526
18541
  rows.forEach(function (row) {
18527
- return _this32.handleSelectRow({
18542
+ return _this33.handleSelectRow({
18528
18543
  row: row
18529
18544
  }, !!value, isForce);
18530
18545
  });
@@ -18555,7 +18570,7 @@ var Methods = {
18555
18570
  * value 选中true 不选false 半选-1
18556
18571
  */
18557
18572
  handleSelectRow: function handleSelectRow(_ref6, value, isForce) {
18558
- var _this33 = this;
18573
+ var _this34 = this;
18559
18574
  var row = _ref6.row;
18560
18575
  var selection = this.selection,
18561
18576
  afterFullData = this.afterFullData,
@@ -18576,20 +18591,20 @@ var Methods = {
18576
18591
  } else {
18577
18592
  // 更新子节点状态
18578
18593
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([row], function (item) {
18579
- if (_this33.eqRow(item, row) || isForce || !checkMethod || checkMethod({
18594
+ if (_this34.eqRow(item, row) || isForce || !checkMethod || checkMethod({
18580
18595
  row: item
18581
18596
  })) {
18582
18597
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(item, checkField, value);
18583
18598
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(treeIndeterminates, function (half) {
18584
- return _this33.eqRow(half, item);
18599
+ return _this34.eqRow(half, item);
18585
18600
  });
18586
- _this33.handleCheckboxReserveRow(row, value);
18601
+ _this34.handleCheckboxReserveRow(row, value);
18587
18602
  }
18588
18603
  }, treeOpts);
18589
18604
  }
18590
18605
  // 如果存在父节点,更新父节点状态
18591
18606
  var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(afterFullData, function (item) {
18592
- return _this33.eqRow(item, row);
18607
+ return _this34.eqRow(item, row);
18593
18608
  }, treeOpts);
18594
18609
  if (matchObj && matchObj.parent) {
18595
18610
  var parentStatus;
@@ -18599,7 +18614,7 @@ var Methods = {
18599
18614
  });
18600
18615
  }) : matchObj.items;
18601
18616
  var indeterminatesItem = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().find(matchObj.items, function (item) {
18602
- return _this33.findRowIndexOf(treeIndeterminates, item) > -1;
18617
+ return _this34.findRowIndexOf(treeIndeterminates, item) > -1;
18603
18618
  });
18604
18619
  if (indeterminatesItem) {
18605
18620
  parentStatus = -1;
@@ -18608,7 +18623,7 @@ var Methods = {
18608
18623
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(item, checkField);
18609
18624
  });
18610
18625
  parentStatus = selectItems.filter(function (item) {
18611
- return _this33.findRowIndexOf(vItems, item) > -1;
18626
+ return _this34.findRowIndexOf(vItems, item) > -1;
18612
18627
  }).length === vItems.length ? true : selectItems.length || value === -1 ? -1 : false;
18613
18628
  }
18614
18629
  return this.handleSelectRow({
@@ -18630,31 +18645,31 @@ var Methods = {
18630
18645
  treeIndeterminates.push(row);
18631
18646
  }
18632
18647
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(selection, function (item) {
18633
- return _this33.eqRow(item, row);
18648
+ return _this34.eqRow(item, row);
18634
18649
  });
18635
18650
  } else {
18636
18651
  // 更新子节点状态
18637
18652
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([row], function (item) {
18638
- if (_this33.eqRow(item, row) || isForce || !checkMethod || checkMethod({
18653
+ if (_this34.eqRow(item, row) || isForce || !checkMethod || checkMethod({
18639
18654
  row: item
18640
18655
  })) {
18641
18656
  if (value) {
18642
18657
  selection.push(item);
18643
18658
  } else {
18644
18659
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(selection, function (select) {
18645
- return _this33.eqRow(select, item);
18660
+ return _this34.eqRow(select, item);
18646
18661
  });
18647
18662
  }
18648
18663
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(treeIndeterminates, function (half) {
18649
- return _this33.eqRow(half, item);
18664
+ return _this34.eqRow(half, item);
18650
18665
  });
18651
- _this33.handleCheckboxReserveRow(row, value);
18666
+ _this34.handleCheckboxReserveRow(row, value);
18652
18667
  }
18653
18668
  }, treeOpts);
18654
18669
  }
18655
18670
  // 如果存在父节点,更新父节点状态
18656
18671
  var _matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(afterFullData, function (item) {
18657
- return _this33.eqRow(item, row);
18672
+ return _this34.eqRow(item, row);
18658
18673
  }, treeOpts);
18659
18674
  if (_matchObj && _matchObj.parent) {
18660
18675
  var _parentStatus;
@@ -18664,16 +18679,16 @@ var Methods = {
18664
18679
  });
18665
18680
  }) : _matchObj.items;
18666
18681
  var _indeterminatesItem = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().find(_matchObj.items, function (item) {
18667
- return _this33.findRowIndexOf(treeIndeterminates, item) > -1;
18682
+ return _this34.findRowIndexOf(treeIndeterminates, item) > -1;
18668
18683
  });
18669
18684
  if (_indeterminatesItem) {
18670
18685
  _parentStatus = -1;
18671
18686
  } else {
18672
18687
  var _selectItems = _matchObj.items.filter(function (item) {
18673
- return _this33.findRowIndexOf(selection, item) > -1;
18688
+ return _this34.findRowIndexOf(selection, item) > -1;
18674
18689
  });
18675
18690
  _parentStatus = _selectItems.filter(function (item) {
18676
- return _this33.findRowIndexOf(_vItems, item) > -1;
18691
+ return _this34.findRowIndexOf(_vItems, item) > -1;
18677
18692
  }).length === _vItems.length ? true : _selectItems.length || value === -1 ? -1 : false;
18678
18693
  }
18679
18694
  return this.handleSelectRow({
@@ -18690,7 +18705,7 @@ var Methods = {
18690
18705
  }
18691
18706
  } else {
18692
18707
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(selection, function (item) {
18693
- return _this33.eqRow(item, row);
18708
+ return _this34.eqRow(item, row);
18694
18709
  });
18695
18710
  }
18696
18711
  this.handleCheckboxReserveRow(row, value);
@@ -18739,7 +18754,7 @@ var Methods = {
18739
18754
  return this.$nextTick();
18740
18755
  },
18741
18756
  handleCheckedAllCheckboxRow: function handleCheckedAllCheckboxRow(value, isForce) {
18742
- var _this34 = this;
18757
+ var _this35 = this;
18743
18758
  var afterFullData = this.afterFullData,
18744
18759
  treeConfig = this.treeConfig,
18745
18760
  treeOpts = this.treeOpts,
@@ -18752,7 +18767,7 @@ var Methods = {
18752
18767
  checkMethod = checkboxOpts.checkMethod;
18753
18768
  var selectRows = [];
18754
18769
  var beforeSelection = treeConfig ? [] : selection.filter(function (row) {
18755
- return _this34.findRowIndexOf(afterFullData, row) === -1;
18770
+ return _this35.findRowIndexOf(afterFullData, row) === -1;
18756
18771
  });
18757
18772
  if (checkStrictly) {
18758
18773
  this.isAllSelected = value;
@@ -18806,7 +18821,7 @@ var Methods = {
18806
18821
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(afterFullData, function (row) {
18807
18822
  if (checkMethod({
18808
18823
  row: row
18809
- }) ? 0 : _this34.findRowIndexOf(selection, row) > -1) {
18824
+ }) ? 0 : _this35.findRowIndexOf(selection, row) > -1) {
18810
18825
  selectRows.push(row);
18811
18826
  }
18812
18827
  }, treeOpts);
@@ -18821,7 +18836,7 @@ var Methods = {
18821
18836
  */
18822
18837
  if (!isForce && checkMethod) {
18823
18838
  selectRows = afterFullData.filter(function (row) {
18824
- return _this34.findRowIndexOf(selection, row) > -1 || checkMethod({
18839
+ return _this35.findRowIndexOf(selection, row) > -1 || checkMethod({
18825
18840
  row: row
18826
18841
  });
18827
18842
  });
@@ -18838,7 +18853,7 @@ var Methods = {
18838
18853
  selectRows = afterFullData.filter(function (row) {
18839
18854
  return checkMethod({
18840
18855
  row: row
18841
- }) ? 0 : _this34.findRowIndexOf(selection, row) > -1;
18856
+ }) ? 0 : _this35.findRowIndexOf(selection, row) > -1;
18842
18857
  });
18843
18858
  }
18844
18859
  }
@@ -18847,11 +18862,11 @@ var Methods = {
18847
18862
  if (reserve) {
18848
18863
  if (value) {
18849
18864
  selectRows.forEach(function (row) {
18850
- checkboxReserveRowMap[getRowid(_this34, row)] = row;
18865
+ checkboxReserveRowMap[getRowid(_this35, row)] = row;
18851
18866
  });
18852
18867
  } else {
18853
18868
  afterFullData.forEach(function (row) {
18854
- return _this34.handleCheckboxReserveRow(row, false);
18869
+ return _this35.handleCheckboxReserveRow(row, false);
18855
18870
  });
18856
18871
  }
18857
18872
  }
@@ -18869,7 +18884,7 @@ var Methods = {
18869
18884
  return this.handleCheckedAllCheckboxRow(value, true);
18870
18885
  },
18871
18886
  checkSelectionStatus: function checkSelectionStatus() {
18872
- var _this35 = this;
18887
+ var _this36 = this;
18873
18888
  var afterFullData = this.afterFullData,
18874
18889
  selection = this.selection,
18875
18890
  treeIndeterminates = this.treeIndeterminates,
@@ -18905,11 +18920,11 @@ var Methods = {
18905
18920
  if (treeConfig) {
18906
18921
  if (halfField) {
18907
18922
  isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
18908
- return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, halfField) || _this35.findRowIndexOf(treeIndeterminates, row) > -1;
18923
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, halfField) || _this36.findRowIndexOf(treeIndeterminates, row) > -1;
18909
18924
  });
18910
18925
  } else {
18911
18926
  isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
18912
- return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField) || _this35.findRowIndexOf(treeIndeterminates, row) > -1;
18927
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField) || _this36.findRowIndexOf(treeIndeterminates, row) > -1;
18913
18928
  });
18914
18929
  }
18915
18930
  } else {
@@ -18931,22 +18946,22 @@ var Methods = {
18931
18946
  disableRows.push(row);
18932
18947
  return true;
18933
18948
  }
18934
- if (_this35.findRowIndexOf(selection, row) > -1) {
18949
+ if (_this36.findRowIndexOf(selection, row) > -1) {
18935
18950
  checkRows.push(row);
18936
18951
  return true;
18937
18952
  }
18938
18953
  return false;
18939
18954
  } : function (row) {
18940
- return _this35.findRowIndexOf(selection, row) > -1;
18955
+ return _this36.findRowIndexOf(selection, row) > -1;
18941
18956
  });
18942
18957
  isAllSelected = isAllResolve && afterFullData.length !== disableRows.length;
18943
18958
  if (treeConfig) {
18944
18959
  isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
18945
- return _this35.findRowIndexOf(treeIndeterminates, row) > -1 || _this35.findRowIndexOf(selection, row) > -1;
18960
+ return _this36.findRowIndexOf(treeIndeterminates, row) > -1 || _this36.findRowIndexOf(selection, row) > -1;
18946
18961
  });
18947
18962
  } else {
18948
18963
  isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
18949
- return _this35.findRowIndexOf(selection, row) > -1;
18964
+ return _this36.findRowIndexOf(selection, row) > -1;
18950
18965
  });
18951
18966
  }
18952
18967
  }
@@ -19052,7 +19067,7 @@ var Methods = {
19052
19067
  * 获取复选框保留选中的行
19053
19068
  */
19054
19069
  getCheckboxReserveRecords: function getCheckboxReserveRecords(isFull) {
19055
- var _this36 = this;
19070
+ var _this37 = this;
19056
19071
  var fullDataRowIdData = this.fullDataRowIdData,
19057
19072
  afterFullData = this.afterFullData,
19058
19073
  checkboxReserveRowMap = this.checkboxReserveRowMap,
@@ -19064,11 +19079,11 @@ var Methods = {
19064
19079
  var afterFullIdMaps = {};
19065
19080
  if (treeConfig) {
19066
19081
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(afterFullData, function (row) {
19067
- afterFullIdMaps[getRowid(_this36, row)] = 1;
19082
+ afterFullIdMaps[getRowid(_this37, row)] = 1;
19068
19083
  }, treeOpts);
19069
19084
  } else {
19070
19085
  afterFullData.forEach(function (row) {
19071
- afterFullIdMaps[getRowid(_this36, row)] = 1;
19086
+ afterFullIdMaps[getRowid(_this37, row)] = 1;
19072
19087
  });
19073
19088
  }
19074
19089
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(checkboxReserveRowMap, function (oldRow, oldRowid) {
@@ -19127,7 +19142,7 @@ var Methods = {
19127
19142
  * 清空行为不管是否被禁用还是保留记录,都将彻底清空选中状态
19128
19143
  */
19129
19144
  clearCheckboxRow: function clearCheckboxRow() {
19130
- var _this37 = this;
19145
+ var _this38 = this;
19131
19146
  var tableFullData = this.tableFullData,
19132
19147
  treeConfig = this.treeConfig,
19133
19148
  treeOpts = this.treeOpts,
@@ -19147,7 +19162,7 @@ var Methods = {
19147
19162
  }
19148
19163
  if (reserve) {
19149
19164
  tableFullData.forEach(function (row) {
19150
- return _this37.handleCheckboxReserveRow(row, false);
19165
+ return _this38.handleCheckboxReserveRow(row, false);
19151
19166
  });
19152
19167
  }
19153
19168
  this.isAllSelected = false;
@@ -19399,12 +19414,12 @@ var Methods = {
19399
19414
  * 如果存在规则,则校验
19400
19415
  */
19401
19416
  handleChangeCell: function handleChangeCell(evnt, params) {
19402
- var _this38 = this;
19417
+ var _this39 = this;
19403
19418
  this.checkValidate('blur')["catch"](function (e) {
19404
19419
  return e;
19405
19420
  }).then(function () {
19406
- _this38.handleActived(params, evnt).then(function () {
19407
- return _this38.checkValidate('change');
19421
+ _this39.handleActived(params, evnt).then(function () {
19422
+ return _this39.checkValidate('change');
19408
19423
  })["catch"](function (e) {
19409
19424
  return e;
19410
19425
  });
@@ -19498,7 +19513,7 @@ var Methods = {
19498
19513
  * 如果是双击模式,则激活为编辑状态
19499
19514
  */
19500
19515
  triggerCellDblclickEvent: function triggerCellDblclickEvent(evnt, params) {
19501
- var _this39 = this;
19516
+ var _this40 = this;
19502
19517
  var editStore = this.editStore,
19503
19518
  editConfig = this.editConfig,
19504
19519
  editOpts = this.editOpts;
@@ -19511,15 +19526,15 @@ var Methods = {
19511
19526
  this.checkValidate('blur')["catch"](function (e) {
19512
19527
  return e;
19513
19528
  }).then(function () {
19514
- _this39.handleActived(params, evnt).then(function () {
19515
- return _this39.checkValidate('change');
19529
+ _this40.handleActived(params, evnt).then(function () {
19530
+ return _this40.checkValidate('change');
19516
19531
  })["catch"](function (e) {
19517
19532
  return e;
19518
19533
  });
19519
19534
  });
19520
19535
  } else if (editOpts.mode === 'cell') {
19521
19536
  this.handleActived(params, evnt).then(function () {
19522
- return _this39.checkValidate('change');
19537
+ return _this40.checkValidate('change');
19523
19538
  })["catch"](function (e) {
19524
19539
  return e;
19525
19540
  });
@@ -19529,7 +19544,7 @@ var Methods = {
19529
19544
  this.emitEvent('cell-dblclick', params, evnt);
19530
19545
  },
19531
19546
  handleDefaultSort: function handleDefaultSort() {
19532
- var _this40 = this;
19547
+ var _this41 = this;
19533
19548
  var sortConfig = this.sortConfig,
19534
19549
  sortOpts = this.sortOpts;
19535
19550
  var defaultSort = sortOpts.defaultSort;
@@ -19542,7 +19557,7 @@ var Methods = {
19542
19557
  var field = item.field,
19543
19558
  order = item.order;
19544
19559
  if (field && order) {
19545
- var column = _this40.getColumnByField(field);
19560
+ var column = _this41.getColumnByField(field);
19546
19561
  if (column && column.sortable) {
19547
19562
  column.order = order;
19548
19563
  column.sortTime = Date.now() + index;
@@ -19583,7 +19598,7 @@ var Methods = {
19583
19598
  }
19584
19599
  },
19585
19600
  sort: function sort(sortConfs, sortOrder) {
19586
- var _this41 = this;
19601
+ var _this42 = this;
19587
19602
  var sortOpts = this.sortOpts;
19588
19603
  var multiple = sortOpts.multiple,
19589
19604
  remote = sortOpts.remote,
@@ -19609,14 +19624,14 @@ var Methods = {
19609
19624
  order = confs.order;
19610
19625
  var column = field;
19611
19626
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(field)) {
19612
- column = _this41.getColumnByField(field);
19627
+ column = _this42.getColumnByField(field);
19613
19628
  }
19614
19629
  if (column && (column.sortable || column.remoteSort)) {
19615
19630
  if (!firstSortColumn) {
19616
19631
  firstSortColumn = column;
19617
19632
  }
19618
19633
  if (orders.indexOf(order) === -1) {
19619
- order = getNextSortOrder(_this41, column);
19634
+ order = getNextSortOrder(_this42, column);
19620
19635
  }
19621
19636
  if (column.order !== order) {
19622
19637
  column.order = order;
@@ -19736,7 +19751,7 @@ var Methods = {
19736
19751
  return rest && rest.expandLoaded;
19737
19752
  },
19738
19753
  clearRowExpandLoaded: function clearRowExpandLoaded(row) {
19739
- var _this42 = this;
19754
+ var _this43 = this;
19740
19755
  var expandOpts = this.expandOpts,
19741
19756
  expandLazyLoadeds = this.expandLazyLoadeds,
19742
19757
  fullAllDataRowMap = this.fullAllDataRowMap;
@@ -19745,7 +19760,7 @@ var Methods = {
19745
19760
  if (lazy && rest) {
19746
19761
  rest.expandLoaded = false;
19747
19762
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(expandLazyLoadeds, function (item) {
19748
- return _this42.eqRow(item, row);
19763
+ return _this43.eqRow(item, row);
19749
19764
  });
19750
19765
  }
19751
19766
  return this.$nextTick();
@@ -19755,13 +19770,13 @@ var Methods = {
19755
19770
  * @param {Row} row 行对象
19756
19771
  */
19757
19772
  reloadRowExpand: function reloadRowExpand(row) {
19758
- var _this43 = this;
19773
+ var _this44 = this;
19759
19774
  var expandOpts = this.expandOpts,
19760
19775
  expandLazyLoadeds = this.expandLazyLoadeds;
19761
19776
  var lazy = expandOpts.lazy;
19762
19777
  if (lazy && this.findRowIndexOf(expandLazyLoadeds, row) === -1) {
19763
19778
  this.clearRowExpandLoaded(row).then(function () {
19764
- return _this43.handleAsyncRowExpand(row);
19779
+ return _this44.handleAsyncRowExpand(row);
19765
19780
  });
19766
19781
  }
19767
19782
  return this.$nextTick();
@@ -19830,25 +19845,25 @@ var Methods = {
19830
19845
  return this.setRowExpand(this.expandOpts.lazy ? this.tableData : this.tableFullData, expanded);
19831
19846
  },
19832
19847
  handleAsyncRowExpand: function handleAsyncRowExpand(row) {
19833
- var _this44 = this;
19848
+ var _this45 = this;
19834
19849
  var rest = this.fullAllDataRowMap.get(row);
19835
19850
  return new Promise(function (resolve) {
19836
- _this44.expandLazyLoadeds.push(row);
19837
- _this44.expandOpts.loadMethod({
19838
- $table: _this44,
19851
+ _this45.expandLazyLoadeds.push(row);
19852
+ _this45.expandOpts.loadMethod({
19853
+ $table: _this45,
19839
19854
  row: row,
19840
- rowIndex: _this44.getRowIndex(row),
19841
- $rowIndex: _this44.getVMRowIndex(row)
19855
+ rowIndex: _this45.getRowIndex(row),
19856
+ $rowIndex: _this45.getVMRowIndex(row)
19842
19857
  }).then(function () {
19843
19858
  rest.expandLoaded = true;
19844
- _this44.rowExpandeds.push(row);
19859
+ _this45.rowExpandeds.push(row);
19845
19860
  })["catch"](function () {
19846
19861
  rest.expandLoaded = false;
19847
19862
  })["finally"](function () {
19848
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(_this44.expandLazyLoadeds, function (item) {
19849
- return _this44.eqRow(item, row);
19863
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(_this45.expandLazyLoadeds, function (item) {
19864
+ return _this45.eqRow(item, row);
19850
19865
  });
19851
- resolve(_this44.$nextTick().then(_this44.recalculate));
19866
+ resolve(_this45.$nextTick().then(_this45.recalculate));
19852
19867
  });
19853
19868
  });
19854
19869
  },
@@ -19860,7 +19875,7 @@ var Methods = {
19860
19875
  * @param {Boolean} expanded 是否展开
19861
19876
  */
19862
19877
  setRowExpand: function setRowExpand(rows, expanded) {
19863
- var _this45 = this;
19878
+ var _this46 = this;
19864
19879
  var fullAllDataRowMap = this.fullAllDataRowMap,
19865
19880
  expandLazyLoadeds = this.expandLazyLoadeds,
19866
19881
  expandOpts = this.expandOpts,
@@ -19889,17 +19904,17 @@ var Methods = {
19889
19904
  columnIndex: columnIndex,
19890
19905
  $columnIndex: $columnIndex,
19891
19906
  row: row,
19892
- rowIndex: _this45.getRowIndex(row),
19893
- $rowIndex: _this45.getVMRowIndex(row)
19907
+ rowIndex: _this46.getRowIndex(row),
19908
+ $rowIndex: _this46.getVMRowIndex(row)
19894
19909
  });
19895
19910
  }) : rows;
19896
19911
  if (expanded) {
19897
19912
  validRows.forEach(function (row) {
19898
- if (_this45.findRowIndexOf(rowExpandeds, row) === -1) {
19913
+ if (_this46.findRowIndexOf(rowExpandeds, row) === -1) {
19899
19914
  var rest = fullAllDataRowMap.get(row);
19900
- var isLoad = lazy && !rest.expandLoaded && _this45.findRowIndexOf(expandLazyLoadeds, row) === -1;
19915
+ var isLoad = lazy && !rest.expandLoaded && _this46.findRowIndexOf(expandLazyLoadeds, row) === -1;
19901
19916
  if (isLoad) {
19902
- lazyRests.push(_this45.handleAsyncRowExpand(row));
19917
+ lazyRests.push(_this46.handleAsyncRowExpand(row));
19903
19918
  } else {
19904
19919
  rowExpandeds.push(row);
19905
19920
  }
@@ -19907,12 +19922,12 @@ var Methods = {
19907
19922
  });
19908
19923
  } else {
19909
19924
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(rowExpandeds, function (row) {
19910
- return _this45.findRowIndexOf(validRows, row) > -1;
19925
+ return _this46.findRowIndexOf(validRows, row) > -1;
19911
19926
  });
19912
19927
  }
19913
19928
  if (reserve) {
19914
19929
  validRows.forEach(function (row) {
19915
- return _this45.handleRowExpandReserve(row, expanded);
19930
+ return _this46.handleRowExpandReserve(row, expanded);
19916
19931
  });
19917
19932
  }
19918
19933
  }
@@ -19931,7 +19946,7 @@ var Methods = {
19931
19946
  * 手动清空展开行状态,数据会恢复成未展开的状态
19932
19947
  */
19933
19948
  clearRowExpand: function clearRowExpand() {
19934
- var _this46 = this;
19949
+ var _this47 = this;
19935
19950
  var expandOpts = this.expandOpts,
19936
19951
  rowExpandeds = this.rowExpandeds,
19937
19952
  tableFullData = this.tableFullData;
@@ -19940,12 +19955,12 @@ var Methods = {
19940
19955
  this.rowExpandeds = [];
19941
19956
  if (reserve) {
19942
19957
  tableFullData.forEach(function (row) {
19943
- return _this46.handleRowExpandReserve(row, false);
19958
+ return _this47.handleRowExpandReserve(row, false);
19944
19959
  });
19945
19960
  }
19946
19961
  return this.$nextTick().then(function () {
19947
19962
  if (isExists) {
19948
- _this46.recalculate();
19963
+ _this47.recalculate();
19949
19964
  }
19950
19965
  });
19951
19966
  },
@@ -20015,7 +20030,7 @@ var Methods = {
20015
20030
  * @param {Row} row 行对象
20016
20031
  */
20017
20032
  reloadTreeExpand: function reloadTreeExpand(row) {
20018
- var _this47 = this;
20033
+ var _this48 = this;
20019
20034
  var treeOpts = this.treeOpts,
20020
20035
  treeLazyLoadeds = this.treeLazyLoadeds;
20021
20036
  var transform = treeOpts.transform,
@@ -20023,14 +20038,14 @@ var Methods = {
20023
20038
  hasChild = treeOpts.hasChild;
20024
20039
  if (lazy && row[hasChild] && treeLazyLoadeds.indexOf(row) === -1) {
20025
20040
  this.clearTreeExpandLoaded(row).then(function () {
20026
- return _this47.handleAsyncTreeExpandChilds(row);
20041
+ return _this48.handleAsyncTreeExpandChilds(row);
20027
20042
  }).then(function () {
20028
20043
  if (transform) {
20029
- _this47.handleVirtualTreeToList();
20030
- return _this47.handleTableData();
20044
+ _this48.handleVirtualTreeToList();
20045
+ return _this48.handleTableData();
20031
20046
  }
20032
20047
  }).then(function () {
20033
- return _this47.recalculate();
20048
+ return _this48.recalculate();
20034
20049
  });
20035
20050
  }
20036
20051
  return this.$nextTick();
@@ -20097,7 +20112,7 @@ var Methods = {
20097
20112
  }
20098
20113
  },
20099
20114
  handleAsyncTreeExpandChilds: function handleAsyncTreeExpandChilds(row) {
20100
- var _this48 = this;
20115
+ var _this49 = this;
20101
20116
  var fullAllDataRowMap = this.fullAllDataRowMap,
20102
20117
  treeExpandeds = this.treeExpandeds,
20103
20118
  treeOpts = this.treeOpts,
@@ -20110,7 +20125,7 @@ var Methods = {
20110
20125
  return new Promise(function (resolve) {
20111
20126
  treeLazyLoadeds.push(row);
20112
20127
  loadMethod({
20113
- $table: _this48,
20128
+ $table: _this49,
20114
20129
  row: row
20115
20130
  }).then(function (childRecords) {
20116
20131
  // 响应成功后则展开行,并将子节点挂载到该节点下
@@ -20122,17 +20137,17 @@ var Methods = {
20122
20137
  childRecords = [];
20123
20138
  }
20124
20139
  if (childRecords) {
20125
- return _this48.loadTreeChildren(row, childRecords).then(function (childRows) {
20140
+ return _this49.loadTreeChildren(row, childRecords).then(function (childRows) {
20126
20141
  if (childRows.length && treeExpandeds.indexOf(row) === -1) {
20127
20142
  treeExpandeds.push(row);
20128
20143
  }
20129
20144
  // 如果当前节点已选中,则展开后子节点也被选中
20130
- if (!checkStrictly && _this48.isCheckedByCheckboxRow(row)) {
20131
- _this48.handleCheckedCheckboxRow(childRows, true, true);
20145
+ if (!checkStrictly && _this49.isCheckedByCheckboxRow(row)) {
20146
+ _this49.handleCheckedCheckboxRow(childRows, true, true);
20132
20147
  }
20133
- return _this48.$nextTick().then(function () {
20148
+ return _this49.$nextTick().then(function () {
20134
20149
  if (transform) {
20135
- return _this48.handleTableData();
20150
+ return _this49.handleTableData();
20136
20151
  }
20137
20152
  });
20138
20153
  });
@@ -20144,8 +20159,8 @@ var Methods = {
20144
20159
  return item === row;
20145
20160
  });
20146
20161
  })["finally"](function () {
20147
- _this48.$nextTick().then(function () {
20148
- return _this48.recalculate();
20162
+ _this49.$nextTick().then(function () {
20163
+ return _this49.recalculate();
20149
20164
  }).then(function () {
20150
20165
  return resolve();
20151
20166
  });
@@ -20177,7 +20192,7 @@ var Methods = {
20177
20192
  * @returns
20178
20193
  */
20179
20194
  handleBaseTreeExpand: function handleBaseTreeExpand(rows, expanded) {
20180
- var _this49 = this;
20195
+ var _this50 = this;
20181
20196
  var fullAllDataRowMap = this.fullAllDataRowMap,
20182
20197
  tableFullData = this.tableFullData,
20183
20198
  treeExpandeds = this.treeExpandeds,
@@ -20221,7 +20236,7 @@ var Methods = {
20221
20236
  var isLoad = lazy && row[hasChild] && !rest.treeLoaded && treeLazyLoadeds.indexOf(row) === -1;
20222
20237
  // 是否使用懒加载
20223
20238
  if (isLoad) {
20224
- result.push(_this49.handleAsyncTreeExpandChilds(row));
20239
+ result.push(_this50.handleAsyncTreeExpandChilds(row));
20225
20240
  } else {
20226
20241
  if (row[children] && row[children].length) {
20227
20242
  treeExpandeds.push(row);
@@ -20236,7 +20251,7 @@ var Methods = {
20236
20251
  }
20237
20252
  if (reserve) {
20238
20253
  validRows.forEach(function (row) {
20239
- return _this49.handleTreeExpandReserve(row, expanded);
20254
+ return _this50.handleTreeExpandReserve(row, expanded);
20240
20255
  });
20241
20256
  }
20242
20257
  return Promise.all(result).then(this.recalculate);
@@ -20248,12 +20263,12 @@ var Methods = {
20248
20263
  * @returns
20249
20264
  */
20250
20265
  handleVirtualTreeExpand: function handleVirtualTreeExpand(rows, expanded) {
20251
- var _this50 = this;
20266
+ var _this51 = this;
20252
20267
  return this.handleBaseTreeExpand(rows, expanded).then(function () {
20253
- _this50.handleVirtualTreeToList();
20254
- return _this50.handleTableData();
20268
+ _this51.handleVirtualTreeToList();
20269
+ return _this51.handleTableData();
20255
20270
  }).then(function () {
20256
- return _this50.recalculate();
20271
+ return _this51.recalculate();
20257
20272
  });
20258
20273
  },
20259
20274
  /**
@@ -20292,7 +20307,7 @@ var Methods = {
20292
20307
  * 手动清空树形节点的展开状态,数据会恢复成未展开的状态
20293
20308
  */
20294
20309
  clearTreeExpand: function clearTreeExpand() {
20295
- var _this51 = this;
20310
+ var _this52 = this;
20296
20311
  var treeOpts = this.treeOpts,
20297
20312
  treeExpandeds = this.treeExpandeds,
20298
20313
  tableFullData = this.tableFullData;
@@ -20302,17 +20317,17 @@ var Methods = {
20302
20317
  this.treeExpandeds = [];
20303
20318
  if (reserve) {
20304
20319
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullData, function (row) {
20305
- return _this51.handleTreeExpandReserve(row, false);
20320
+ return _this52.handleTreeExpandReserve(row, false);
20306
20321
  }, treeOpts);
20307
20322
  }
20308
20323
  return this.handleTableData().then(function () {
20309
20324
  if (transform) {
20310
- _this51.handleVirtualTreeToList();
20311
- return _this51.handleTableData();
20325
+ _this52.handleVirtualTreeToList();
20326
+ return _this52.handleTableData();
20312
20327
  }
20313
20328
  }).then(function () {
20314
20329
  if (isExists) {
20315
- _this51.recalculate();
20330
+ _this52.recalculate();
20316
20331
  }
20317
20332
  });
20318
20333
  },
@@ -20431,28 +20446,28 @@ var Methods = {
20431
20446
  },
20432
20447
  // 计算可视渲染相关数据
20433
20448
  computeScrollLoad: function computeScrollLoad() {
20434
- var _this52 = this;
20449
+ var _this53 = this;
20435
20450
  return this.$nextTick().then(function () {
20436
- var sYOpts = _this52.sYOpts,
20437
- sXOpts = _this52.sXOpts,
20438
- scrollXLoad = _this52.scrollXLoad,
20439
- scrollYLoad = _this52.scrollYLoad,
20440
- scrollXStore = _this52.scrollXStore,
20441
- scrollYStore = _this52.scrollYStore;
20451
+ var sYOpts = _this53.sYOpts,
20452
+ sXOpts = _this53.sXOpts,
20453
+ scrollXLoad = _this53.scrollXLoad,
20454
+ scrollYLoad = _this53.scrollYLoad,
20455
+ scrollXStore = _this53.scrollXStore,
20456
+ scrollYStore = _this53.scrollYStore;
20442
20457
  // 计算 X 逻辑
20443
20458
  if (scrollXLoad) {
20444
- var _computeVirtualX3 = computeVirtualX(_this52),
20459
+ var _computeVirtualX3 = computeVirtualX(_this53),
20445
20460
  visibleXSize = _computeVirtualX3.visibleSize;
20446
20461
  var offsetXSize = sXOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(sXOpts.oSize) : browse.msie ? 10 : browse.edge ? 5 : 0;
20447
20462
  scrollXStore.offsetSize = offsetXSize;
20448
20463
  scrollXStore.visibleSize = visibleXSize;
20449
20464
  scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex);
20450
- _this52.updateScrollXData();
20465
+ _this53.updateScrollXData();
20451
20466
  } else {
20452
- _this52.updateScrollXSpace();
20467
+ _this53.updateScrollXSpace();
20453
20468
  }
20454
20469
  // 计算 Y 逻辑
20455
- var _computeVirtualY = computeVirtualY(_this52),
20470
+ var _computeVirtualY = computeVirtualY(_this53),
20456
20471
  rowHeight = _computeVirtualY.rowHeight,
20457
20472
  visibleYSize = _computeVirtualY.visibleSize;
20458
20473
  scrollYStore.rowHeight = rowHeight;
@@ -20461,12 +20476,12 @@ var Methods = {
20461
20476
  scrollYStore.offsetSize = offsetYSize;
20462
20477
  scrollYStore.visibleSize = visibleYSize;
20463
20478
  scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
20464
- _this52.updateScrollYData();
20479
+ _this53.updateScrollYData();
20465
20480
  } else {
20466
- _this52.updateScrollYSpace();
20481
+ _this53.updateScrollYSpace();
20467
20482
  }
20468
- _this52.rowHeight = rowHeight;
20469
- _this52.$nextTick(_this52.updateStyle);
20483
+ _this53.rowHeight = rowHeight;
20484
+ _this53.$nextTick(_this53.updateStyle);
20470
20485
  });
20471
20486
  },
20472
20487
  handleTableColumn: function handleTableColumn() {
@@ -20476,11 +20491,11 @@ var Methods = {
20476
20491
  this.tableColumn = scrollXLoad ? visibleColumn.slice(scrollXStore.startIndex, scrollXStore.endIndex) : visibleColumn.slice(0);
20477
20492
  },
20478
20493
  updateScrollXData: function updateScrollXData() {
20479
- var _this53 = this;
20494
+ var _this54 = this;
20480
20495
  // this.tableColumn = []
20481
20496
  this.$nextTick(function () {
20482
- _this53.handleTableColumn();
20483
- _this53.updateScrollXSpace();
20497
+ _this54.handleTableColumn();
20498
+ _this54.updateScrollXSpace();
20484
20499
  });
20485
20500
  },
20486
20501
  // 更新横向 X 可视渲染上下剩余空间大小
@@ -20531,11 +20546,11 @@ var Methods = {
20531
20546
  }
20532
20547
  },
20533
20548
  updateScrollYData: function updateScrollYData() {
20534
- var _this54 = this;
20549
+ var _this55 = this;
20535
20550
  // this.tableData = []
20536
20551
  this.$nextTick(function () {
20537
- _this54.handleTableData();
20538
- _this54.updateScrollYSpace();
20552
+ _this55.handleTableData();
20553
+ _this55.updateScrollYSpace();
20539
20554
  });
20540
20555
  },
20541
20556
  // 更新纵向 Y 可视渲染上下剩余空间大小
@@ -20576,7 +20591,7 @@ var Methods = {
20576
20591
  * @param {Number} scrollTop 上距离
20577
20592
  */
20578
20593
  scrollTo: function scrollTo(scrollLeft, scrollTop) {
20579
- var _this55 = this;
20594
+ var _this56 = this;
20580
20595
  var $refs = this.$refs;
20581
20596
  var tableBody = $refs.tableBody,
20582
20597
  rightBody = $refs.rightBody,
@@ -20593,7 +20608,7 @@ var Methods = {
20593
20608
  if (this.scrollXLoad || this.scrollYLoad) {
20594
20609
  return new Promise(function (resolve) {
20595
20610
  return setTimeout(function () {
20596
- return resolve(_this55.$nextTick());
20611
+ return resolve(_this56.$nextTick());
20597
20612
  }, 50);
20598
20613
  });
20599
20614
  }
@@ -20635,7 +20650,7 @@ var Methods = {
20635
20650
  * @param {Row} row 行对象
20636
20651
  */
20637
20652
  scrollToTreeRow: function scrollToTreeRow(row) {
20638
- var _this56 = this;
20653
+ var _this57 = this;
20639
20654
  var tableFullData = this.tableFullData,
20640
20655
  treeConfig = this.treeConfig,
20641
20656
  treeOpts = this.treeOpts;
@@ -20647,14 +20662,14 @@ var Methods = {
20647
20662
  if (matchObj) {
20648
20663
  var nodes = matchObj.nodes;
20649
20664
  nodes.forEach(function (row, index) {
20650
- if (index < nodes.length - 1 && !_this56.isTreeExpandByRow(row)) {
20651
- rests.push(_this56.setTreeExpand(row, true));
20665
+ if (index < nodes.length - 1 && !_this57.isTreeExpandByRow(row)) {
20666
+ rests.push(_this57.setTreeExpand(row, true));
20652
20667
  }
20653
20668
  });
20654
20669
  }
20655
20670
  }
20656
20671
  return Promise.all(rests).then(function () {
20657
- return rowToVisible(_this56, row);
20672
+ return rowToVisible(_this57, row);
20658
20673
  });
20659
20674
  },
20660
20675
  /**
@@ -20709,30 +20724,30 @@ var Methods = {
20709
20724
  * 如果单元格配置了校验规则,则会进行校验
20710
20725
  */
20711
20726
  updateStatus: function updateStatus(scope, cellValue) {
20712
- var _this57 = this;
20727
+ var _this58 = this;
20713
20728
  var customVal = !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(cellValue);
20714
20729
  return this.$nextTick().then(function () {
20715
- var $refs = _this57.$refs,
20716
- editRules = _this57.editRules,
20717
- validStore = _this57.validStore;
20730
+ var $refs = _this58.$refs,
20731
+ editRules = _this58.editRules,
20732
+ validStore = _this58.validStore;
20718
20733
  if (scope && $refs.tableBody && editRules) {
20719
20734
  var row = scope.row,
20720
20735
  column = scope.column;
20721
20736
  var type = 'change';
20722
- if (_this57.hasCellRules(type, row, column)) {
20723
- var cell = _this57.getCell(row, column);
20737
+ if (_this58.hasCellRules(type, row, column)) {
20738
+ var cell = _this58.getCell(row, column);
20724
20739
  if (cell) {
20725
- return _this57.validCellRules(type, row, column, cellValue).then(function () {
20740
+ return _this58.validCellRules(type, row, column, cellValue).then(function () {
20726
20741
  if (customVal && validStore.visible) {
20727
20742
  setCellValue(row, column, cellValue);
20728
20743
  }
20729
- _this57.clearValidate();
20744
+ _this58.clearValidate();
20730
20745
  })["catch"](function (_ref8) {
20731
20746
  var rule = _ref8.rule;
20732
20747
  if (customVal) {
20733
20748
  setCellValue(row, column, cellValue);
20734
20749
  }
20735
- _this57.showValidTooltip({
20750
+ _this58.showValidTooltip({
20736
20751
  rule: rule,
20737
20752
  row: row,
20738
20753
  column: column,
@@ -20752,13 +20767,13 @@ var Methods = {
20752
20767
  * @param {TableMergeConfig[]} merges { row: Row|number, column: ColumnInfo|number, rowspan: number, colspan: number }
20753
20768
  */
20754
20769
  setMergeCells: function setMergeCells(merges) {
20755
- var _this58 = this;
20770
+ var _this59 = this;
20756
20771
  if (this.spanMethod) {
20757
20772
  errLog('vxe.error.errConflicts', ['merge-cells', 'span-method']);
20758
20773
  }
20759
20774
  setMerges(this, merges, this.mergeList, this.afterFullData);
20760
20775
  return this.$nextTick().then(function () {
20761
- return _this58.updateCellAreas();
20776
+ return _this59.updateCellAreas();
20762
20777
  });
20763
20778
  },
20764
20779
  /**
@@ -20766,13 +20781,13 @@ var Methods = {
20766
20781
  * @param {TableMergeConfig[]} merges 多个或数组 [{row:Row|number, col:ColumnInfo|number}]
20767
20782
  */
20768
20783
  removeMergeCells: function removeMergeCells(merges) {
20769
- var _this59 = this;
20784
+ var _this60 = this;
20770
20785
  if (this.spanMethod) {
20771
20786
  errLog('vxe.error.errConflicts', ['merge-cells', 'span-method']);
20772
20787
  }
20773
20788
  var rest = removeMerges(this, merges, this.mergeList, this.afterFullData);
20774
20789
  return this.$nextTick().then(function () {
20775
- _this59.updateCellAreas();
20790
+ _this60.updateCellAreas();
20776
20791
  return rest;
20777
20792
  });
20778
20793
  },
@@ -20793,23 +20808,23 @@ var Methods = {
20793
20808
  this.setMergeFooterItems(this.mergeFooterItems);
20794
20809
  },
20795
20810
  setMergeFooterItems: function setMergeFooterItems(merges) {
20796
- var _this60 = this;
20811
+ var _this61 = this;
20797
20812
  if (this.footerSpanMethod) {
20798
20813
  errLog('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
20799
20814
  }
20800
20815
  setMerges(this, merges, this.mergeFooterList, null);
20801
20816
  return this.$nextTick().then(function () {
20802
- return _this60.updateCellAreas();
20817
+ return _this61.updateCellAreas();
20803
20818
  });
20804
20819
  },
20805
20820
  removeMergeFooterItems: function removeMergeFooterItems(merges) {
20806
- var _this61 = this;
20821
+ var _this62 = this;
20807
20822
  if (this.footerSpanMethod) {
20808
20823
  errLog('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
20809
20824
  }
20810
20825
  var rest = removeMerges(this, merges, this.mergeFooterList, null);
20811
20826
  return this.$nextTick().then(function () {
20812
- _this61.updateCellAreas();
20827
+ _this62.updateCellAreas();
20813
20828
  return rest;
20814
20829
  });
20815
20830
  },
@@ -20926,9 +20941,9 @@ var Methods = {
20926
20941
  return cellLabel;
20927
20942
  },
20928
20943
  findRowIndexOf: function findRowIndexOf(list, row) {
20929
- var _this62 = this;
20944
+ var _this63 = this;
20930
20945
  return row ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(list, function (item) {
20931
- return _this62.eqRow(item, row);
20946
+ return _this63.eqRow(item, row);
20932
20947
  }) : -1;
20933
20948
  },
20934
20949
  eqRow: function eqRow(row1, row2) {
@@ -21541,7 +21556,9 @@ function handleUupdateResize(_vm) {
21541
21556
  column: null
21542
21557
  },
21543
21558
  insertList: [],
21544
- removeList: []
21559
+ insertMaps: {},
21560
+ removeList: [],
21561
+ removeMaps: {}
21545
21562
  },
21546
21563
  // 存放 tooltip 相关信息
21547
21564
  tooltipStore: {
@@ -23359,8 +23376,7 @@ function insertTreeRow(_vm, newRecords, isAppend) {
23359
23376
  * @param {Row} row 指定行
23360
23377
  */
23361
23378
  _insertAt: function _insertAt(records, row) {
23362
- var _this = this,
23363
- _editStore$insertList;
23379
+ var _this = this;
23364
23380
  var tableFullTreeData = this.tableFullTreeData,
23365
23381
  mergeList = this.mergeList,
23366
23382
  afterFullData = this.afterFullData,
@@ -23376,9 +23392,9 @@ function insertTreeRow(_vm, newRecords, isAppend) {
23376
23392
  if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(records)) {
23377
23393
  records = [records];
23378
23394
  }
23379
- var newRecords = records.map(function (record) {
23380
- return _this.defineField(Object.assign({}, record));
23381
- });
23395
+ var newRecords = this.defineField(records.map(function (record) {
23396
+ return Object.assign({}, record);
23397
+ }));
23382
23398
  if (!row) {
23383
23399
  // 如果为虚拟树
23384
23400
  if (treeConfig && transform) {
@@ -23480,13 +23496,20 @@ function insertTreeRow(_vm, newRecords, isAppend) {
23480
23496
  }
23481
23497
  }
23482
23498
  }
23483
- (_editStore$insertList = editStore.insertList).unshift.apply(_editStore$insertList, _toConsumableArray(newRecords));
23499
+ var insertList = editStore.insertList,
23500
+ insertMaps = editStore.insertMaps;
23501
+ newRecords.forEach(function (newRow) {
23502
+ var rowid = getRowid(_this, newRow);
23503
+ insertMaps[rowid] = newRow;
23504
+ });
23505
+ insertList.unshift.apply(insertList, _toConsumableArray(newRecords));
23506
+ this.cacheRowMap();
23507
+ this.updateScrollYStatus();
23484
23508
  this.handleTableData(treeConfig && transform);
23485
23509
  if (!(treeConfig && transform)) {
23486
23510
  this.updateAfterDataIndex();
23487
23511
  }
23488
23512
  this.updateFooter();
23489
- this.cacheRowMap();
23490
23513
  this.checkSelectionStatus();
23491
23514
  if (this.scrollYLoad) {
23492
23515
  this.updateScrollYSpace();
@@ -23522,7 +23545,8 @@ function insertTreeRow(_vm, newRecords, isAppend) {
23522
23545
  var transform = treeOpts.transform;
23523
23546
  var actived = editStore.actived,
23524
23547
  removeList = editStore.removeList,
23525
- insertList = editStore.insertList;
23548
+ insertList = editStore.insertList,
23549
+ insertMaps = editStore.insertMaps;
23526
23550
  var checkField = checkboxOpts.checkField;
23527
23551
  var rest = [];
23528
23552
  if (!rows) {
@@ -23598,10 +23622,12 @@ function insertTreeRow(_vm, newRecords, isAppend) {
23598
23622
  }
23599
23623
  // 从新增中移除已删除的数据
23600
23624
  rows.forEach(function (row) {
23625
+ var rowid = getRowid(_this2, row);
23601
23626
  var iIndex = _this2.findRowIndexOf(insertList, row);
23602
23627
  if (iIndex > -1) {
23603
23628
  insertList.splice(iIndex, 1);
23604
23629
  }
23630
+ delete insertMaps[rowid];
23605
23631
  });
23606
23632
  this.handleTableData(treeConfig && transform);
23607
23633
  if (!(treeConfig && transform)) {
@@ -23670,32 +23696,15 @@ function insertTreeRow(_vm, newRecords, isAppend) {
23670
23696
  */
23671
23697
  _getInsertRecords: function _getInsertRecords() {
23672
23698
  var _this6 = this;
23673
- var treeConfig = this.treeConfig,
23674
- tableFullTreeData = this.tableFullTreeData,
23675
- tableFullData = this.tableFullData,
23676
- treeOpts = this.treeOpts;
23699
+ var fullAllDataRowIdData = this.fullAllDataRowIdData;
23677
23700
  var insertList = this.editStore.insertList;
23678
23701
  var insertRecords = [];
23679
- if (insertList.length) {
23680
- // 如果为虚拟树
23681
- if (treeConfig && treeOpts.transform) {
23682
- insertList.forEach(function (row) {
23683
- var rowid = getRowid(_this6, row);
23684
- var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(tableFullTreeData, function (item) {
23685
- return rowid === getRowid(_this6, item);
23686
- }, treeOpts);
23687
- if (matchObj) {
23688
- insertRecords.push(row);
23689
- }
23690
- });
23691
- } else {
23692
- insertList.forEach(function (row) {
23693
- if (tableFullData.indexOf(row) > -1) {
23694
- insertRecords.push(row);
23695
- }
23696
- });
23702
+ insertList.forEach(function (row) {
23703
+ var rowid = getRowid(_this6, row);
23704
+ if (fullAllDataRowIdData[rowid]) {
23705
+ insertRecords.push(row);
23697
23706
  }
23698
- }
23707
+ });
23699
23708
  return insertRecords;
23700
23709
  },
23701
23710
  /**
@@ -28742,13 +28751,19 @@ function renderOpts(h, _vm) {
28742
28751
  });
28743
28752
  }
28744
28753
  },
28745
- focusEvent: function focusEvent() {
28754
+ focusEvent: function focusEvent(evnt) {
28746
28755
  if (!this.disabled) {
28747
28756
  this.isActivated = true;
28748
28757
  }
28758
+ this.$emit('focus', {
28759
+ $event: evnt
28760
+ });
28749
28761
  },
28750
- blurEvent: function blurEvent() {
28762
+ blurEvent: function blurEvent(evnt) {
28751
28763
  this.isActivated = false;
28764
+ this.$emit('blur', {
28765
+ $event: evnt
28766
+ });
28752
28767
  },
28753
28768
  modelSearchEvent: function modelSearchEvent(value) {
28754
28769
  this.searchValue = value;
@@ -32445,10 +32460,12 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
32445
32460
  overflowX = $xetable.overflowX,
32446
32461
  scrollbarWidth = $xetable.scrollbarWidth,
32447
32462
  tooltipOpts = $xetable.tooltipOpts,
32448
- visibleColumn = $xetable.visibleColumn;
32463
+ visibleColumn = $xetable.visibleColumn,
32464
+ expandColumn = $xetable.expandColumn;
32449
32465
  // 如果是使用优化模式
32450
32466
  if (fixedType) {
32451
- if (scrollXLoad || allColumnFooterOverflow) {
32467
+ // 如果存在展开行使用全量渲染
32468
+ if (!expandColumn && (scrollXLoad || allColumnFooterOverflow)) {
32452
32469
  if (!mergeFooterList.length || !footerSpanMethod) {
32453
32470
  tableColumn = fixedColumn;
32454
32471
  } else {
@@ -37045,6 +37062,7 @@ var VxeFormConfigItem = {
37045
37062
  children = item.children;
37046
37063
  var compConf = isEnableConf(itemRender) ? v_x_e_table.renderer.get(itemRender.name) : null;
37047
37064
  var itemClassName = compConf ? compConf.itemClassName : '';
37065
+ var itemStyle = compConf ? compConf.itemStyle : null;
37048
37066
  var span = item.span || $xeform.span;
37049
37067
  var align = item.align || $xeform.align;
37050
37068
  var titleAlign = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(item.titleAlign) ? allTitleAlign : item.titleAlign;
@@ -37116,7 +37134,8 @@ var VxeFormConfigItem = {
37116
37134
  'is--hidden': folding && collapseAll,
37117
37135
  'is--active': isActivetem($xeform, item),
37118
37136
  'is--error': showError
37119
- }]
37137
+ }],
37138
+ style: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemStyle) ? itemStyle(params) : itemStyle
37120
37139
  }, [h('div', {
37121
37140
  "class": 'vxe-form--item-inner'
37122
37141
  }, [title || slots && slots.title ? h('div', {
@@ -37930,6 +37949,7 @@ var renderItem = function renderItem(h, _vm, item, slots) {
37930
37949
  titleOverflow = item.titleOverflow;
37931
37950
  var compConf = isEnableConf(itemRender) ? v_x_e_table.renderer.get(itemRender.name) : null;
37932
37951
  var itemClassName = compConf ? compConf.itemClassName : '';
37952
+ var itemStyle = compConf ? compConf.itemStyle : null;
37933
37953
  var span = item.span || _vm.span;
37934
37954
  var align = item.align || _vm.align;
37935
37955
  var titleAlign = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(item.titleAlign) ? allTitleAlign : item.titleAlign;
@@ -37986,7 +38006,8 @@ var renderItem = function renderItem(h, _vm, item, slots) {
37986
38006
  'is--hidden': folding && collapseAll,
37987
38007
  'is--active': isActivetem(_vm, item),
37988
38008
  'is--error': showError
37989
- }]
38009
+ }],
38010
+ style: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemStyle) ? itemStyle(params) : itemStyle
37990
38011
  }, [h('div', {
37991
38012
  "class": 'vxe-form--item-inner'
37992
38013
  }, [title || slots && slots.title ? h('div', {