vxe-table 3.4.12 → 3.4.14-beta.2

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 (80) hide show
  1. package/README.en.md +3 -1
  2. package/README.md +5 -3
  3. package/README.zh-TW.md +5 -3
  4. package/lib/edit/src/mixin.js +9 -1
  5. package/lib/edit/src/mixin.min.js +1 -1
  6. package/lib/export/src/mixin.js +15 -10
  7. package/lib/export/src/mixin.min.js +1 -1
  8. package/lib/export/style/style.css +2 -0
  9. package/lib/export/style/style.min.css +1 -1
  10. package/lib/filter/src/mixin.js +5 -1
  11. package/lib/filter/src/mixin.min.js +1 -1
  12. package/lib/filter/style/style.css +2 -0
  13. package/lib/filter/style/style.min.css +1 -1
  14. package/lib/footer/src/footer.js +11 -0
  15. package/lib/footer/src/footer.min.js +1 -1
  16. package/lib/form/src/form.js +6 -1
  17. package/lib/form/src/form.min.js +1 -1
  18. package/lib/grid/src/grid.js +4 -1
  19. package/lib/grid/src/grid.min.js +1 -1
  20. package/lib/header/src/header.js +12 -0
  21. package/lib/header/src/header.min.js +1 -1
  22. package/lib/index.css +1 -1
  23. package/lib/index.umd.js +489 -337
  24. package/lib/index.umd.min.js +1 -1
  25. package/lib/input/src/date.js +54 -0
  26. package/lib/input/src/date.min.js +1 -0
  27. package/lib/input/src/input.js +12 -59
  28. package/lib/input/src/input.min.js +1 -1
  29. package/lib/input/src/number.js +23 -0
  30. package/lib/input/src/number.min.js +1 -0
  31. package/lib/modal/src/modal.js +1 -1
  32. package/lib/modal/src/modal.min.js +1 -1
  33. package/lib/pager/src/pager.js +15 -1
  34. package/lib/pager/src/pager.min.js +1 -1
  35. package/lib/pulldown/src/pulldown.js +13 -0
  36. package/lib/pulldown/src/pulldown.min.js +1 -1
  37. package/lib/style.css +1 -1
  38. package/lib/style.min.css +1 -1
  39. package/lib/table/src/body.js +24 -5
  40. package/lib/table/src/body.min.js +1 -1
  41. package/lib/table/src/cell.js +5 -6
  42. package/lib/table/src/cell.min.js +1 -1
  43. package/lib/table/src/methods.js +344 -293
  44. package/lib/table/src/methods.min.js +1 -1
  45. package/lib/table/style/style.css +2 -0
  46. package/lib/table/style/style.min.css +1 -1
  47. package/lib/toolbar/style/style.css +2 -0
  48. package/lib/toolbar/style/style.min.css +1 -1
  49. package/lib/tools/src/utils.js +1 -0
  50. package/lib/tools/src/utils.min.js +1 -1
  51. package/lib/validator/src/mixin.js +2 -0
  52. package/lib/validator/src/mixin.min.js +1 -1
  53. package/package.json +4 -4
  54. package/packages/edit/src/mixin.js +1 -1
  55. package/packages/export/src/mixin.js +16 -9
  56. package/packages/filter/src/mixin.js +4 -1
  57. package/packages/footer/src/footer.js +10 -0
  58. package/packages/form/src/form.js +6 -4
  59. package/packages/grid/src/grid.js +2 -1
  60. package/packages/header/src/header.js +11 -0
  61. package/packages/input/src/date.js +38 -0
  62. package/packages/input/src/input.js +4 -46
  63. package/packages/input/src/number.js +12 -0
  64. package/packages/modal/src/modal.js +1 -1
  65. package/packages/pager/src/pager.js +15 -1
  66. package/packages/pulldown/src/pulldown.js +12 -0
  67. package/packages/table/src/body.js +41 -7
  68. package/packages/table/src/cell.js +4 -6
  69. package/packages/table/src/methods.js +49 -12
  70. package/packages/tools/src/utils.js +1 -0
  71. package/packages/validator/src/mixin.js +11 -1
  72. package/styles/base/checked.scss +5 -0
  73. package/styles/button.scss +4 -4
  74. package/styles/modal.scss +14 -13
  75. package/styles/table.scss +4 -4
  76. package/styles/variable.scss +8 -0
  77. package/types/all.d.ts +1 -0
  78. package/types/column.d.ts +7 -1
  79. package/types/form.d.ts +2 -1
  80. package/types/table.d.ts +6 -2
package/lib/index.umd.js CHANGED
@@ -8931,6 +8931,7 @@ var utils_ColumnInfo = /*#__PURE__*/function () {
8931
8931
  // 基本属性
8932
8932
  type: _vm.type,
8933
8933
  property: _vm.field,
8934
+ field: _vm.field,
8934
8935
  title: _vm.title,
8935
8936
  width: _vm.width,
8936
8937
  minWidth: _vm.minWidth,
@@ -11496,6 +11497,19 @@ function syncBodyScroll(scrollTop, elem1, elem2) {
11496
11497
  this.$el._onscroll = null;
11497
11498
  this.$el.onscroll = null;
11498
11499
  },
11500
+ destroyed: function destroyed() {
11501
+ var $xetable = this.$parent,
11502
+ fixedType = this.fixedType;
11503
+ var elemStore = $xetable.elemStore;
11504
+ var prefix = "".concat(fixedType || 'main', "-body-");
11505
+ elemStore["".concat(prefix, "wrapper")] = null;
11506
+ elemStore["".concat(prefix, "table")] = null;
11507
+ elemStore["".concat(prefix, "colgroup")] = null;
11508
+ elemStore["".concat(prefix, "list")] = null;
11509
+ elemStore["".concat(prefix, "xSpace")] = null;
11510
+ elemStore["".concat(prefix, "ySpace")] = null;
11511
+ elemStore["".concat(prefix, "emptyBlock")] = null;
11512
+ },
11499
11513
  render: function render(h) {
11500
11514
  var _e = this._e,
11501
11515
  $xetable = this.$parent,
@@ -11662,8 +11676,8 @@ function syncBodyScroll(scrollTop, elem1, elem2) {
11662
11676
  var rightElem = rightBody ? rightBody.$el : null;
11663
11677
  var bodyYElem = elemStore['main-body-ySpace'];
11664
11678
  var bodyXElem = elemStore['main-body-xSpace'];
11665
- var bodyHeight = bodyYElem ? bodyYElem.clientHeight : 0;
11666
- var bodyWidth = bodyXElem ? bodyXElem.clientWidth : 0;
11679
+ var bodyHeight = scrollYLoad && bodyYElem ? bodyYElem.clientHeight : bodyElem.clientHeight;
11680
+ var bodyWidth = scrollXLoad && bodyXElem ? bodyXElem.clientWidth : bodyElem.clientWidth;
11667
11681
  var scrollTop = scrollBodyElem.scrollTop;
11668
11682
  var scrollLeft = bodyElem.scrollLeft;
11669
11683
  var isRollX = scrollLeft !== lastScrollLeft;
@@ -11719,6 +11733,8 @@ function syncBodyScroll(scrollTop, elem1, elem2) {
11719
11733
  fixed: fixedType,
11720
11734
  scrollTop: scrollTop,
11721
11735
  scrollLeft: scrollLeft,
11736
+ scrollHeight: bodyElem.scrollHeight,
11737
+ scrollWidth: bodyElem.scrollWidth,
11722
11738
  bodyHeight: bodyHeight,
11723
11739
  bodyWidth: bodyWidth,
11724
11740
  isX: isRollX,
@@ -11730,7 +11746,9 @@ function syncBodyScroll(scrollTop, elem1, elem2) {
11730
11746
 
11731
11747
  var $xetable = this.$parent;
11732
11748
  var $refs = $xetable.$refs,
11733
- elemStore = $xetable.elemStore;
11749
+ elemStore = $xetable.elemStore,
11750
+ scrollYLoad = $xetable.scrollYLoad,
11751
+ scrollXLoad = $xetable.scrollXLoad;
11734
11752
  var tableBody = $refs.tableBody,
11735
11753
  leftBody = $refs.leftBody,
11736
11754
  rightBody = $refs.rightBody;
@@ -11740,8 +11758,8 @@ function syncBodyScroll(scrollTop, elem1, elem2) {
11740
11758
  var remainSize = this.isPrevWheelTop === isTopWheel ? Math.max(0, this.wheelYSize - this.wheelYTotal) : 0;
11741
11759
  var bodyYElem = elemStore['main-body-ySpace'];
11742
11760
  var bodyXElem = elemStore['main-body-xSpace'];
11743
- var bodyHeight = bodyYElem ? bodyYElem.clientHeight : 0;
11744
- var bodyWidth = bodyXElem ? bodyXElem.clientWidth : 0;
11761
+ var bodyHeight = scrollYLoad && bodyYElem ? bodyYElem.clientHeight : bodyElem.clientHeight;
11762
+ var bodyWidth = scrollXLoad && bodyXElem ? bodyXElem.clientWidth : bodyElem.clientWidth;
11745
11763
  this.isPrevWheelTop = isTopWheel;
11746
11764
  this.wheelYSize = Math.abs(isTopWheel ? deltaTop - remainSize : deltaTop + remainSize);
11747
11765
  this.wheelYInterval = 0;
@@ -11787,6 +11805,8 @@ function syncBodyScroll(scrollTop, elem1, elem2) {
11787
11805
  fixed: fixedType,
11788
11806
  scrollTop: bodyElem.scrollTop,
11789
11807
  scrollLeft: bodyElem.scrollLeft,
11808
+ scrollHeight: bodyElem.scrollHeight,
11809
+ scrollWidth: bodyElem.scrollWidth,
11790
11810
  bodyHeight: bodyHeight,
11791
11811
  bodyWidth: bodyWidth,
11792
11812
  isX: isRollX,
@@ -12352,29 +12372,28 @@ var Cell = {
12352
12372
  var $table = params.$table,
12353
12373
  column = params.column,
12354
12374
  isHidden = params.isHidden;
12355
- var isAllCheckboxIndeterminate = $table.isIndeterminate,
12375
+ var isAllCheckboxSelected = $table.isAllSelected,
12376
+ isAllCheckboxIndeterminate = $table.isIndeterminate,
12356
12377
  isAllCheckboxDisabled = $table.isAllCheckboxDisabled;
12357
12378
  var slots = column.slots;
12358
12379
  var headerSlot = slots ? slots.header : null;
12359
12380
  var titleSlot = slots ? slots.title : null;
12360
12381
  var checkboxOpts = $table.checkboxOpts;
12361
12382
  var headerTitle = column.getTitle();
12362
- var isChecked = false;
12363
12383
  var on;
12364
12384
 
12365
12385
  if (!isHidden) {
12366
- isChecked = isAllCheckboxDisabled ? false : $table.isAllSelected;
12367
12386
  on = {
12368
12387
  click: function click(evnt) {
12369
12388
  if (!isAllCheckboxDisabled) {
12370
- $table.triggerCheckAllEvent(evnt, !isChecked);
12389
+ $table.triggerCheckAllEvent(evnt, !isAllCheckboxSelected);
12371
12390
  }
12372
12391
  }
12373
12392
  };
12374
12393
  }
12375
12394
 
12376
12395
  var checkboxParams = _objectSpread2(_objectSpread2({}, params), {}, {
12377
- checked: isChecked,
12396
+ checked: isAllCheckboxSelected,
12378
12397
  disabled: isAllCheckboxDisabled,
12379
12398
  indeterminate: isAllCheckboxIndeterminate
12380
12399
  });
@@ -12391,7 +12410,7 @@ var Cell = {
12391
12410
 
12392
12411
  return renderTitleContent(h, checkboxParams, [h('span', {
12393
12412
  class: ['vxe-cell--checkbox', {
12394
- 'is--checked': isChecked,
12413
+ 'is--checked': isAllCheckboxSelected,
12395
12414
  'is--disabled': isAllCheckboxDisabled,
12396
12415
  'is--indeterminate': isAllCheckboxIndeterminate
12397
12416
  }],
@@ -13259,14 +13278,34 @@ var Methods = {
13259
13278
  },
13260
13279
 
13261
13280
  /**
13262
- * 手动处理数据
13281
+ * 手动处理数据,用于手动排序与筛选
13263
13282
  * 对于手动更改了排序、筛选...等条件后需要重新处理数据时可能会用到
13264
13283
  */
13265
13284
  updateData: function updateData() {
13266
- return this.handleTableData(true).then(this.updateFooter).then(this.recalculate);
13285
+ var _this2 = this;
13286
+
13287
+ var scrollXLoad = this.scrollXLoad,
13288
+ scrollYLoad = this.scrollYLoad;
13289
+ return this.handleTableData(true).then(function () {
13290
+ _this2.updateFooter();
13291
+
13292
+ if (scrollXLoad || scrollYLoad) {
13293
+ if (scrollXLoad) {
13294
+ _this2.updateScrollXSpace();
13295
+ }
13296
+
13297
+ if (scrollYLoad) {
13298
+ _this2.updateScrollYSpace();
13299
+ }
13300
+
13301
+ return _this2.refreshScroll();
13302
+ }
13303
+ }).then(function () {
13304
+ return _this2.recalculate();
13305
+ });
13267
13306
  },
13268
13307
  handleTableData: function handleTableData(force) {
13269
- var _this2 = this;
13308
+ var _this3 = this;
13270
13309
 
13271
13310
  var scrollYLoad = this.scrollYLoad,
13272
13311
  scrollYStore = this.scrollYStore,
@@ -13283,7 +13322,7 @@ var Methods = {
13283
13322
 
13284
13323
  var tableData = scrollYLoad ? fullList.slice(scrollYStore.startIndex, scrollYStore.endIndex) : fullList.slice(0);
13285
13324
  tableData.forEach(function (row, $index) {
13286
- var rowid = methods_getRowid(_this2, row);
13325
+ var rowid = methods_getRowid(_this3, row);
13287
13326
  var rest = fullDataRowIdData[rowid];
13288
13327
 
13289
13328
  if (rest) {
@@ -13308,7 +13347,7 @@ var Methods = {
13308
13347
  * @param {Array} datas 数据
13309
13348
  */
13310
13349
  loadTableData: function loadTableData(datas) {
13311
- var _this3 = this;
13350
+ var _this4 = this;
13312
13351
 
13313
13352
  var keepSource = this.keepSource,
13314
13353
  treeConfig = this.treeConfig,
@@ -13371,31 +13410,31 @@ var Methods = {
13371
13410
  this.handleTableData(true);
13372
13411
  this.updateFooter();
13373
13412
  return this.$nextTick().then(function () {
13374
- _this3.updateHeight();
13413
+ _this4.updateHeight();
13375
13414
 
13376
- _this3.updateStyle();
13415
+ _this4.updateStyle();
13377
13416
  }).then(function () {
13378
- _this3.computeScrollLoad();
13417
+ _this4.computeScrollLoad();
13379
13418
  }).then(function () {
13380
13419
  // 是否启用了虚拟滚动
13381
13420
  if (sYLoad) {
13382
13421
  scrollYStore.endIndex = scrollYStore.visibleSize;
13383
13422
  }
13384
13423
 
13385
- _this3.handleReserveStatus();
13424
+ _this4.handleReserveStatus();
13386
13425
 
13387
- _this3.checkSelectionStatus();
13426
+ _this4.checkSelectionStatus();
13388
13427
 
13389
13428
  return new Promise(function (resolve) {
13390
- _this3.$nextTick().then(function () {
13391
- return _this3.recalculate();
13429
+ _this4.$nextTick().then(function () {
13430
+ return _this4.recalculate();
13392
13431
  }).then(function () {
13393
13432
  // 是否变更虚拟滚动
13394
13433
  if (oldScrollYLoad === sYLoad) {
13395
- restoreScrollLocation(_this3, lastScrollLeft, lastScrollTop).then(resolve);
13434
+ restoreScrollLocation(_this4, lastScrollLeft, lastScrollTop).then(resolve);
13396
13435
  } else {
13397
13436
  setTimeout(function () {
13398
- return restoreScrollLocation(_this3, lastScrollLeft, lastScrollTop).then(resolve);
13437
+ return restoreScrollLocation(_this4, lastScrollLeft, lastScrollTop).then(resolve);
13399
13438
  });
13400
13439
  }
13401
13440
  });
@@ -13408,23 +13447,23 @@ var Methods = {
13408
13447
  * @param {Array} datas 数据
13409
13448
  */
13410
13449
  loadData: function loadData(datas) {
13411
- var _this4 = this;
13450
+ var _this5 = this;
13412
13451
 
13413
13452
  var inited = this.inited,
13414
13453
  initStatus = this.initStatus;
13415
13454
  return this.loadTableData(datas).then(function () {
13416
- _this4.inited = true;
13417
- _this4.initStatus = true;
13455
+ _this5.inited = true;
13456
+ _this5.initStatus = true;
13418
13457
 
13419
13458
  if (!initStatus) {
13420
- _this4.handleLoadDefaults();
13459
+ _this5.handleLoadDefaults();
13421
13460
  }
13422
13461
 
13423
13462
  if (!inited) {
13424
- _this4.handleInitDefaults();
13463
+ _this5.handleInitDefaults();
13425
13464
  }
13426
13465
 
13427
- return _this4.recalculate();
13466
+ return _this5.recalculate();
13428
13467
  });
13429
13468
  },
13430
13469
 
@@ -13433,21 +13472,21 @@ var Methods = {
13433
13472
  * @param {Array} datas 数据
13434
13473
  */
13435
13474
  reloadData: function reloadData(datas) {
13436
- var _this5 = this;
13475
+ var _this6 = this;
13437
13476
 
13438
13477
  var inited = this.inited;
13439
13478
  return this.clearAll().then(function () {
13440
- _this5.inited = true;
13441
- _this5.initStatus = true;
13442
- return _this5.loadTableData(datas);
13479
+ _this6.inited = true;
13480
+ _this6.initStatus = true;
13481
+ return _this6.loadTableData(datas);
13443
13482
  }).then(function () {
13444
- _this5.handleLoadDefaults();
13483
+ _this6.handleLoadDefaults();
13445
13484
 
13446
13485
  if (!inited) {
13447
- _this5.handleInitDefaults();
13486
+ _this6.handleInitDefaults();
13448
13487
  }
13449
13488
 
13450
- return _this5.recalculate();
13489
+ return _this6.recalculate();
13451
13490
  });
13452
13491
  },
13453
13492
 
@@ -13492,10 +13531,10 @@ var Methods = {
13492
13531
  * @param {ColumnInfo} columns 列配置
13493
13532
  */
13494
13533
  loadColumn: function loadColumn(columns) {
13495
- var _this6 = this;
13534
+ var _this7 = this;
13496
13535
 
13497
13536
  var collectColumn = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.mapTree(columns, function (column) {
13498
- return src_cell.createColumn(_this6, column);
13537
+ return src_cell.createColumn(_this7, column);
13499
13538
  }, {
13500
13539
  children: 'children'
13501
13540
  });
@@ -13508,14 +13547,14 @@ var Methods = {
13508
13547
  * @param {ColumnInfo} columns 列配置
13509
13548
  */
13510
13549
  reloadColumn: function reloadColumn(columns) {
13511
- var _this7 = this;
13550
+ var _this8 = this;
13512
13551
 
13513
13552
  return this.clearAll().then(function () {
13514
- return _this7.loadColumn(columns);
13553
+ return _this8.loadColumn(columns);
13515
13554
  });
13516
13555
  },
13517
13556
  handleColumn: function handleColumn(collectColumn) {
13518
- var _this8 = this;
13557
+ var _this9 = this;
13519
13558
 
13520
13559
  this.collectColumn = collectColumn;
13521
13560
  var tableFullColumn = methods_getColumnList(collectColumn);
@@ -13523,8 +13562,8 @@ var Methods = {
13523
13562
  this.cacheColumnMap();
13524
13563
  this.restoreCustomStorage();
13525
13564
  this.parseColumns().then(function () {
13526
- if (_this8.scrollXLoad) {
13527
- _this8.loadScrollXData(true);
13565
+ if (_this9.scrollXLoad) {
13566
+ _this9.loadScrollXData(true);
13528
13567
  }
13529
13568
  });
13530
13569
  this.clearMergeCells();
@@ -13534,14 +13573,14 @@ var Methods = {
13534
13573
  if (false) {}
13535
13574
 
13536
13575
  return this.$nextTick().then(function () {
13537
- if (_this8.$toolbar) {
13538
- _this8.$toolbar.syncUpdate({
13576
+ if (_this9.$toolbar) {
13577
+ _this9.$toolbar.syncUpdate({
13539
13578
  collectColumn: collectColumn,
13540
- $table: _this8
13579
+ $table: _this9
13541
13580
  });
13542
13581
  }
13543
13582
 
13544
- return _this8.recalculate();
13583
+ return _this9.recalculate();
13545
13584
  });
13546
13585
  },
13547
13586
 
@@ -13550,7 +13589,7 @@ var Methods = {
13550
13589
  * 牺牲数据组装的耗时,用来换取使用过程中的流畅
13551
13590
  */
13552
13591
  cacheRowMap: function cacheRowMap(source) {
13553
- var _this9 = this;
13592
+ var _this10 = this;
13554
13593
 
13555
13594
  var treeConfig = this.treeConfig,
13556
13595
  treeOpts = this.treeOpts,
@@ -13564,7 +13603,7 @@ var Methods = {
13564
13603
  var isLazy = treeConfig && treeOpts.lazy;
13565
13604
 
13566
13605
  var handleCache = function handleCache(row, index, items, path, parent, nodes) {
13567
- var rowid = methods_getRowid(_this9, row);
13606
+ var rowid = methods_getRowid(_this10, row);
13568
13607
  var seq = treeConfig && path ? toTreePathSeq(path) : index + 1;
13569
13608
  var level = nodes ? nodes.length - 1 : 0;
13570
13609
 
@@ -13613,7 +13652,7 @@ var Methods = {
13613
13652
  }
13614
13653
  },
13615
13654
  loadTreeChildren: function loadTreeChildren(row, childRecords) {
13616
- var _this10 = this;
13655
+ var _this11 = this;
13617
13656
 
13618
13657
  var keepSource = this.keepSource,
13619
13658
  tableSourceData = this.tableSourceData,
@@ -13629,9 +13668,9 @@ var Methods = {
13629
13668
  var parentLevel = rest ? rest.level : 0;
13630
13669
  return this.createData(childRecords).then(function (rows) {
13631
13670
  if (keepSource) {
13632
- var rowid = methods_getRowid(_this10, row);
13671
+ var rowid = methods_getRowid(_this11, row);
13633
13672
  var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableSourceData, function (item) {
13634
- return rowid === methods_getRowid(_this10, item);
13673
+ return rowid === methods_getRowid(_this11, item);
13635
13674
  }, treeOpts);
13636
13675
 
13637
13676
  if (matchObj) {
@@ -13640,7 +13679,7 @@ var Methods = {
13640
13679
  }
13641
13680
 
13642
13681
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(rows, function (childRow, index, items, path, parent, nodes) {
13643
- var rowid = methods_getRowid(_this10, childRow);
13682
+ var rowid = methods_getRowid(_this11, childRow);
13644
13683
  var rest = {
13645
13684
  row: childRow,
13646
13685
  rowid: rowid,
@@ -13663,7 +13702,7 @@ var Methods = {
13663
13702
  row[mapChildren] = rows;
13664
13703
  }
13665
13704
 
13666
- _this10.updateAfterDataIndex();
13705
+ _this11.updateAfterDataIndex();
13667
13706
 
13668
13707
  return rows;
13669
13708
  });
@@ -13674,7 +13713,7 @@ var Methods = {
13674
13713
  * 牺牲数据组装的耗时,用来换取使用过程中的流畅
13675
13714
  */
13676
13715
  cacheColumnMap: function cacheColumnMap() {
13677
- var _this11 = this;
13716
+ var _this12 = this;
13678
13717
 
13679
13718
  var tableFullColumn = this.tableFullColumn,
13680
13719
  collectColumn = this.collectColumn,
@@ -13968,13 +14007,13 @@ var Methods = {
13968
14007
  * @param {Array} records 新数据
13969
14008
  */
13970
14009
  createData: function createData(records) {
13971
- var _this12 = this;
14010
+ var _this13 = this;
13972
14011
 
13973
14012
  var treeConfig = this.treeConfig,
13974
14013
  treeOpts = this.treeOpts;
13975
14014
 
13976
14015
  var handleRrecord = function handleRrecord(record) {
13977
- return _this12.defineField(Object.assign({}, record));
14016
+ return _this13.defineField(Object.assign({}, record));
13978
14017
  };
13979
14018
 
13980
14019
  var rows = treeConfig ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.mapTree(records, handleRrecord, treeOpts) : records.map(handleRrecord);
@@ -13989,7 +14028,7 @@ var Methods = {
13989
14028
  * @param {Array/Object} records 新数据
13990
14029
  */
13991
14030
  createRow: function createRow(records) {
13992
- var _this13 = this;
14031
+ var _this14 = this;
13993
14032
 
13994
14033
  var isArr = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(records);
13995
14034
 
@@ -13998,7 +14037,7 @@ var Methods = {
13998
14037
  }
13999
14038
 
14000
14039
  return this.$nextTick().then(function () {
14001
- return _this13.createData(records).then(function (rows) {
14040
+ return _this14.createData(records).then(function (rows) {
14002
14041
  return isArr ? rows : rows[0];
14003
14042
  });
14004
14043
  });
@@ -14012,7 +14051,7 @@ var Methods = {
14012
14051
  * 如果还额外传了 field 则还原指定的单元格数据
14013
14052
  */
14014
14053
  revertData: function revertData(rows, field) {
14015
- var _this14 = this;
14054
+ var _this15 = this;
14016
14055
 
14017
14056
  var keepSource = this.keepSource,
14018
14057
  tableSourceData = this.tableSourceData,
@@ -14036,8 +14075,8 @@ var Methods = {
14036
14075
 
14037
14076
  if (targetRows.length) {
14038
14077
  targetRows.forEach(function (row) {
14039
- if (!_this14.isInsertByRow(row)) {
14040
- var rowIndex = _this14.getRowIndex(row);
14078
+ if (!_this15.isInsertByRow(row)) {
14079
+ var rowIndex = _this15.getRowIndex(row);
14041
14080
 
14042
14081
  if (treeConfig && rowIndex === -1) {
14043
14082
  throw new Error(UtilTools.getLog('vxe.error.noTree', ['revertData']));
@@ -14121,7 +14160,7 @@ var Methods = {
14121
14160
  * @param {String} field 字段名
14122
14161
  */
14123
14162
  isUpdateByRow: function isUpdateByRow(row, field) {
14124
- var _this15 = this;
14163
+ var _this16 = this;
14125
14164
 
14126
14165
  var visibleColumn = this.visibleColumn,
14127
14166
  keepSource = this.keepSource,
@@ -14141,7 +14180,7 @@ var Methods = {
14141
14180
  if (treeConfig) {
14142
14181
  var children = treeOpts.children;
14143
14182
  var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableSourceData, function (item) {
14144
- return rowid === methods_getRowid(_this15, item);
14183
+ return rowid === methods_getRowid(_this16, item);
14145
14184
  }, treeOpts);
14146
14185
  row = Object.assign({}, row, _defineProperty({}, children, null));
14147
14186
 
@@ -14303,7 +14342,7 @@ var Methods = {
14303
14342
  * 如果存在筛选条件,继续处理
14304
14343
  */
14305
14344
  updateAfterFullData: function updateAfterFullData() {
14306
- var _this16 = this;
14345
+ var _this17 = this;
14307
14346
 
14308
14347
  var tableFullColumn = this.tableFullColumn,
14309
14348
  tableFullData = this.tableFullData,
@@ -14323,7 +14362,8 @@ var Methods = {
14323
14362
  var filterColumns = [];
14324
14363
  var orderColumns = [];
14325
14364
  tableFullColumn.forEach(function (column) {
14326
- var sortable = column.sortable,
14365
+ var property = column.property,
14366
+ sortable = column.sortable,
14327
14367
  order = column.order,
14328
14368
  filters = column.filters;
14329
14369
 
@@ -14349,7 +14389,8 @@ var Methods = {
14349
14389
  if (!allRemoteSort && sortable && order) {
14350
14390
  orderColumns.push({
14351
14391
  column: column,
14352
- property: column.property,
14392
+ field: column.property,
14393
+ property: property,
14353
14394
  order: order
14354
14395
  });
14355
14396
  }
@@ -14378,7 +14419,7 @@ var Methods = {
14378
14419
  cellValue: cellValue,
14379
14420
  row: row,
14380
14421
  column: column,
14381
- $table: _this16
14422
+ $table: _this17
14382
14423
  });
14383
14424
  });
14384
14425
  } else if (compFilterMethod) {
@@ -14389,7 +14430,7 @@ var Methods = {
14389
14430
  cellValue: cellValue,
14390
14431
  row: row,
14391
14432
  column: column,
14392
- $table: _this16
14433
+ $table: _this17
14393
14434
  });
14394
14435
  });
14395
14436
  } else if (allFilterMethod) {
@@ -14408,7 +14449,7 @@ var Methods = {
14408
14449
  cellValue: cellValue,
14409
14450
  row: row,
14410
14451
  column: column,
14411
- $table: _this16
14452
+ $table: _this17
14412
14453
  });
14413
14454
  });
14414
14455
  }
@@ -14461,7 +14502,7 @@ var Methods = {
14461
14502
  tableTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.orderBy(tableTree, orderColumns.map(function (_ref2) {
14462
14503
  var column = _ref2.column,
14463
14504
  order = _ref2.order;
14464
- return [getOrderField(_this16, column), order];
14505
+ return [getOrderField(_this17, column), order];
14465
14506
  }));
14466
14507
  }
14467
14508
 
@@ -14484,7 +14525,7 @@ var Methods = {
14484
14525
  tableData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.orderBy(tableData, orderColumns.map(function (_ref3) {
14485
14526
  var column = _ref3.column,
14486
14527
  order = _ref3.order;
14487
- return [getOrderField(_this16, column), order];
14528
+ return [getOrderField(_this17, column), order];
14488
14529
  }));
14489
14530
  } else {
14490
14531
  // 兼容 v2,在 v4 中废弃, sortBy 不能为数组
@@ -14499,7 +14540,7 @@ var Methods = {
14499
14540
  tableData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.orderBy(tableData, sortByConfs || [firstOrderColumn].map(function (_ref4) {
14500
14541
  var column = _ref4.column,
14501
14542
  order = _ref4.order;
14502
- return [getOrderField(_this16, column), order];
14543
+ return [getOrderField(_this17, column), order];
14503
14544
  }));
14504
14545
  }
14505
14546
  }
@@ -14518,7 +14559,7 @@ var Methods = {
14518
14559
  * 对渲染中的数据提前解析序号及索引。牺牲提前编译耗时换取渲染中额外损耗,使运行时更加流畅
14519
14560
  */
14520
14561
  updateAfterDataIndex: function updateAfterDataIndex() {
14521
- var _this17 = this;
14562
+ var _this18 = this;
14522
14563
 
14523
14564
  var treeConfig = this.treeConfig,
14524
14565
  afterFullData = this.afterFullData,
@@ -14529,7 +14570,7 @@ var Methods = {
14529
14570
 
14530
14571
  if (treeConfig) {
14531
14572
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(afterTreeFullData, function (row, index, items, path) {
14532
- var rowid = methods_getRowid(_this17, row);
14573
+ var rowid = methods_getRowid(_this18, row);
14533
14574
  var allrest = fullAllDataRowIdData[rowid];
14534
14575
  var seq = path.map(function (num, i) {
14535
14576
  return i % 2 === 0 ? Number(num) + 1 : '.';
@@ -14558,7 +14599,7 @@ var Methods = {
14558
14599
  });
14559
14600
  } else {
14560
14601
  afterFullData.forEach(function (row, index) {
14561
- var rowid = methods_getRowid(_this17, row);
14602
+ var rowid = methods_getRowid(_this18, row);
14562
14603
  var allrest = fullAllDataRowIdData[rowid];
14563
14604
  var seq = index + 1;
14564
14605
 
@@ -14649,7 +14690,7 @@ var Methods = {
14649
14690
  * 默认执行一次,除非被重置
14650
14691
  */
14651
14692
  handleLoadDefaults: function handleLoadDefaults() {
14652
- var _this18 = this;
14693
+ var _this19 = this;
14653
14694
 
14654
14695
  if (this.checkboxConfig) {
14655
14696
  this.handleDefaultSelectionChecked();
@@ -14676,7 +14717,7 @@ var Methods = {
14676
14717
  }
14677
14718
 
14678
14719
  this.$nextTick(function () {
14679
- return setTimeout(_this18.recalculate);
14720
+ return setTimeout(_this19.recalculate);
14680
14721
  });
14681
14722
  },
14682
14723
 
@@ -14926,12 +14967,12 @@ var Methods = {
14926
14967
  * 刷新列配置
14927
14968
  */
14928
14969
  refreshColumn: function refreshColumn() {
14929
- var _this19 = this;
14970
+ var _this20 = this;
14930
14971
 
14931
14972
  return this.parseColumns().then(function () {
14932
- return _this19.refreshScroll();
14973
+ return _this20.refreshScroll();
14933
14974
  }).then(function () {
14934
- return _this19.recalculate();
14975
+ return _this20.recalculate();
14935
14976
  });
14936
14977
  },
14937
14978
 
@@ -14940,7 +14981,7 @@ var Methods = {
14940
14981
  * 将固定的列左边、右边分别靠边
14941
14982
  */
14942
14983
  parseColumns: function parseColumns() {
14943
- var _this20 = this;
14984
+ var _this21 = this;
14944
14985
 
14945
14986
  var leftList = [];
14946
14987
  var centerList = [];
@@ -15047,11 +15088,11 @@ var Methods = {
15047
15088
  this.visibleColumn = visibleColumn;
15048
15089
  this.handleTableColumn();
15049
15090
  return this.updateFooter().then(function () {
15050
- return _this20.recalculate();
15091
+ return _this21.recalculate();
15051
15092
  }).then(function () {
15052
- _this20.updateCellAreas();
15093
+ _this21.updateCellAreas();
15053
15094
 
15054
- return _this20.recalculate();
15095
+ return _this21.recalculate();
15055
15096
  });
15056
15097
  },
15057
15098
 
@@ -15135,7 +15176,7 @@ var Methods = {
15135
15176
  * 支持 width=? width=?px width=?% min-width=? min-width=?px min-width=?%
15136
15177
  */
15137
15178
  recalculate: function recalculate(refull) {
15138
- var _this21 = this;
15179
+ var _this22 = this;
15139
15180
 
15140
15181
  var $refs = this.$refs;
15141
15182
  var tableBody = $refs.tableBody,
@@ -15151,9 +15192,9 @@ var Methods = {
15151
15192
  if (refull === true) {
15152
15193
  // 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
15153
15194
  return this.computeScrollLoad().then(function () {
15154
- _this21.autoCellWidth(headerElem, bodyElem, footerElem);
15195
+ _this22.autoCellWidth(headerElem, bodyElem, footerElem);
15155
15196
 
15156
- return _this21.computeScrollLoad();
15197
+ return _this22.computeScrollLoad();
15157
15198
  });
15158
15199
  }
15159
15200
  }
@@ -15301,7 +15342,7 @@ var Methods = {
15301
15342
  this.customMaxHeight = methods_calcHeight(this, 'maxHeight');
15302
15343
  },
15303
15344
  updateStyle: function updateStyle() {
15304
- var _this22 = this;
15345
+ var _this23 = this;
15305
15346
 
15306
15347
  var $refs = this.$refs,
15307
15348
  isGroup = this.isGroup,
@@ -15405,7 +15446,7 @@ var Methods = {
15405
15446
 
15406
15447
  if (isGroup && listElem) {
15407
15448
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.arrayEach(listElem.querySelectorAll('.col--group'), function (thElem) {
15408
- var colNode = _this22.getColumnNode(thElem);
15449
+ var colNode = _this23.getColumnNode(thElem);
15409
15450
 
15410
15451
  if (colNode) {
15411
15452
  var column = colNode.item;
@@ -15586,10 +15627,10 @@ var Methods = {
15586
15627
 
15587
15628
  if (cellElem) {
15588
15629
  if (colspan > 1) {
15589
- var columnIndex = _this22.getColumnIndex(column);
15630
+ var columnIndex = _this23.getColumnIndex(column);
15590
15631
 
15591
15632
  for (var _index = 1; _index < colspan; _index++) {
15592
- var nextColumn = _this22.getColumns(columnIndex + _index);
15633
+ var nextColumn = _this23.getColumns(columnIndex + _index);
15593
15634
 
15594
15635
  if (nextColumn) {
15595
15636
  colWidth += nextColumn.renderWidth;
@@ -15639,15 +15680,15 @@ var Methods = {
15639
15680
  }
15640
15681
  },
15641
15682
  preventEvent: function preventEvent(evnt, type, args, next, end) {
15642
- var _this23 = this;
15683
+ var _this24 = this;
15643
15684
 
15644
15685
  var evntList = v_x_e_table.interceptor.get(type);
15645
15686
  var rest;
15646
15687
 
15647
15688
  if (!evntList.some(function (func) {
15648
15689
  return func(Object.assign({
15649
- $grid: _this23.$xegrid,
15650
- $table: _this23,
15690
+ $grid: _this24.$xegrid,
15691
+ $table: _this24,
15651
15692
  $event: evnt
15652
15693
  }, args)) === false;
15653
15694
  })) {
@@ -15667,7 +15708,7 @@ var Methods = {
15667
15708
  * 全局按下事件处理
15668
15709
  */
15669
15710
  handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
15670
- var _this24 = this;
15711
+ var _this25 = this;
15671
15712
 
15672
15713
  var $el = this.$el,
15673
15714
  $refs = this.$refs,
@@ -15728,7 +15769,7 @@ var Methods = {
15728
15769
  } // 如果固定了高度且点击了行之外的空白处,则清除激活状态
15729
15770
 
15730
15771
 
15731
- if (!isClearActived && _this24.height && !_this24.overflowY) {
15772
+ if (!isClearActived && _this25.height && !_this25.overflowY) {
15732
15773
  var bodyWrapperElem = evnt.target;
15733
15774
 
15734
15775
  if (methods_hasClass(bodyWrapperElem, 'vxe-table--body-wrapper')) {
@@ -15739,7 +15780,7 @@ var Methods = {
15739
15780
  if (isClearActived || // 如果点击了当前表格之外
15740
15781
  !getEventTargetNode(evnt, $el).flag) {
15741
15782
  setTimeout(function () {
15742
- return _this24.clearActived(evnt);
15783
+ return _this25.clearActived(evnt);
15743
15784
  });
15744
15785
  }
15745
15786
  });
@@ -15753,9 +15794,9 @@ var Methods = {
15753
15794
 
15754
15795
  if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-areas-clear').flag) {
15755
15796
  this.preventEvent(evnt, 'event.clearAreas', {}, function () {
15756
- _this24.clearCellAreas();
15797
+ _this25.clearCellAreas();
15757
15798
 
15758
- _this24.clearCopyCellArea();
15799
+ _this25.clearCopyCellArea();
15759
15800
  });
15760
15801
  }
15761
15802
  }
@@ -15790,7 +15831,7 @@ var Methods = {
15790
15831
  * 表格键盘事件
15791
15832
  */
15792
15833
  keydownEvent: function keydownEvent(evnt) {
15793
- var _this25 = this;
15834
+ var _this26 = this;
15794
15835
 
15795
15836
  var filterStore = this.filterStore,
15796
15837
  ctxMenuStore = this.ctxMenuStore,
@@ -15805,33 +15846,33 @@ var Methods = {
15805
15846
 
15806
15847
  if (isEsc) {
15807
15848
  this.preventEvent(evnt, 'event.keydown', null, function () {
15808
- if (keyboardConfig && mouseConfig && mouseOpts.area && _this25.handleKeyboardEvent) {
15809
- _this25.handleKeyboardEvent(evnt);
15849
+ if (keyboardConfig && mouseConfig && mouseOpts.area && _this26.handleKeyboardEvent) {
15850
+ _this26.handleKeyboardEvent(evnt);
15810
15851
  } else if (actived.row || filterStore.visible || ctxMenuStore.visible) {
15811
15852
  evnt.stopPropagation(); // 如果按下了 Esc 键,关闭快捷菜单、筛选
15812
15853
 
15813
- _this25.closeFilter();
15854
+ _this26.closeFilter();
15814
15855
 
15815
- _this25.closeMenu();
15856
+ _this26.closeMenu();
15816
15857
 
15817
15858
  if (keyboardConfig && keyboardOpts.isEsc) {
15818
15859
  // 如果是激活编辑状态,则取消编辑
15819
15860
  if (actived.row) {
15820
15861
  var params = actived.args;
15821
15862
 
15822
- _this25.clearActived(evnt); // 如果配置了选中功能,则为选中状态
15863
+ _this26.clearActived(evnt); // 如果配置了选中功能,则为选中状态
15823
15864
 
15824
15865
 
15825
15866
  if (mouseConfig && mouseOpts.selected) {
15826
- _this25.$nextTick(function () {
15827
- return _this25.handleSelected(params, evnt);
15867
+ _this26.$nextTick(function () {
15868
+ return _this26.handleSelected(params, evnt);
15828
15869
  });
15829
15870
  }
15830
15871
  }
15831
15872
  }
15832
15873
  }
15833
15874
 
15834
- _this25.emitEvent('keydown', {}, evnt);
15875
+ _this26.emitEvent('keydown', {}, evnt);
15835
15876
  });
15836
15877
  }
15837
15878
  },
@@ -15840,27 +15881,27 @@ var Methods = {
15840
15881
  * 全局键盘事件
15841
15882
  */
15842
15883
  handleGlobalKeydownEvent: function handleGlobalKeydownEvent(evnt) {
15843
- var _this26 = this;
15884
+ var _this27 = this;
15844
15885
 
15845
15886
  // 该行为只对当前激活的表格有效
15846
15887
  if (this.isActivated) {
15847
15888
  this.preventEvent(evnt, 'event.keydown', null, function () {
15848
- var filterStore = _this26.filterStore,
15849
- isCtxMenu = _this26.isCtxMenu,
15850
- ctxMenuStore = _this26.ctxMenuStore,
15851
- editStore = _this26.editStore,
15852
- editOpts = _this26.editOpts,
15853
- editConfig = _this26.editConfig,
15854
- mouseConfig = _this26.mouseConfig,
15855
- mouseOpts = _this26.mouseOpts,
15856
- keyboardConfig = _this26.keyboardConfig,
15857
- keyboardOpts = _this26.keyboardOpts,
15858
- treeConfig = _this26.treeConfig,
15859
- treeOpts = _this26.treeOpts,
15860
- highlightCurrentRow = _this26.highlightCurrentRow,
15861
- currentRow = _this26.currentRow,
15862
- bodyCtxMenu = _this26.bodyCtxMenu,
15863
- rowOpts = _this26.rowOpts;
15889
+ var filterStore = _this27.filterStore,
15890
+ isCtxMenu = _this27.isCtxMenu,
15891
+ ctxMenuStore = _this27.ctxMenuStore,
15892
+ editStore = _this27.editStore,
15893
+ editOpts = _this27.editOpts,
15894
+ editConfig = _this27.editConfig,
15895
+ mouseConfig = _this27.mouseConfig,
15896
+ mouseOpts = _this27.mouseOpts,
15897
+ keyboardConfig = _this27.keyboardConfig,
15898
+ keyboardOpts = _this27.keyboardOpts,
15899
+ treeConfig = _this27.treeConfig,
15900
+ treeOpts = _this27.treeOpts,
15901
+ highlightCurrentRow = _this27.highlightCurrentRow,
15902
+ currentRow = _this27.currentRow,
15903
+ bodyCtxMenu = _this27.bodyCtxMenu,
15904
+ rowOpts = _this27.rowOpts;
15864
15905
  var selected = editStore.selected,
15865
15906
  actived = editStore.actived;
15866
15907
  var keyCode = evnt.keyCode;
@@ -15887,7 +15928,7 @@ var Methods = {
15887
15928
 
15888
15929
  if (filterStore.visible) {
15889
15930
  if (isEsc) {
15890
- _this26.closeFilter();
15931
+ _this27.closeFilter();
15891
15932
  }
15892
15933
 
15893
15934
  return;
@@ -15898,20 +15939,20 @@ var Methods = {
15898
15939
  evnt.preventDefault();
15899
15940
 
15900
15941
  if (ctxMenuStore.showChild && hasChildrenList(ctxMenuStore.selected)) {
15901
- _this26.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selectChild', 37, false, ctxMenuStore.selected.children);
15942
+ _this27.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selectChild', 37, false, ctxMenuStore.selected.children);
15902
15943
  } else {
15903
- _this26.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selected', 39, true, _this26.ctxMenuList);
15944
+ _this27.moveCtxMenu(evnt, keyCode, ctxMenuStore, 'selected', 39, true, _this27.ctxMenuList);
15904
15945
  }
15905
- } else if (keyboardConfig && mouseConfig && mouseOpts.area && _this26.handleKeyboardEvent) {
15906
- _this26.handleKeyboardEvent(evnt);
15946
+ } else if (keyboardConfig && mouseConfig && mouseOpts.area && _this27.handleKeyboardEvent) {
15947
+ _this27.handleKeyboardEvent(evnt);
15907
15948
  } else if (keyboardConfig && isSpacebar && keyboardOpts.isChecked && selected.row && selected.column && (selected.column.type === 'checkbox' || selected.column.type === 'radio')) {
15908
15949
  // 空格键支持选中复选框
15909
15950
  evnt.preventDefault();
15910
15951
 
15911
15952
  if (selected.column.type === 'checkbox') {
15912
- _this26.handleToggleCheckRowEvent(evnt, selected.args);
15953
+ _this27.handleToggleCheckRowEvent(evnt, selected.args);
15913
15954
  } else {
15914
- _this26.triggerRadioRowEvent(evnt, selected.args);
15955
+ _this27.triggerRadioRowEvent(evnt, selected.args);
15915
15956
  }
15916
15957
  } else if (isF2 && isEnableConf(editConfig)) {
15917
15958
  if (!isEditStatus) {
@@ -15920,15 +15961,15 @@ var Methods = {
15920
15961
  evnt.stopPropagation();
15921
15962
  evnt.preventDefault();
15922
15963
 
15923
- _this26.handleActived(selected.args, evnt);
15964
+ _this27.handleActived(selected.args, evnt);
15924
15965
  }
15925
15966
  }
15926
15967
  } else if (isContextMenu) {
15927
15968
  // 如果按下上下文键
15928
- _this26._keyCtx = selected.row && selected.column && bodyCtxMenu.length;
15929
- clearTimeout(_this26.keyCtxTimeout);
15930
- _this26.keyCtxTimeout = setTimeout(function () {
15931
- _this26._keyCtx = false;
15969
+ _this27._keyCtx = selected.row && selected.column && bodyCtxMenu.length;
15970
+ clearTimeout(_this27.keyCtxTimeout);
15971
+ _this27.keyCtxTimeout = setTimeout(function () {
15972
+ _this27._keyCtx = false;
15932
15973
  }, 1000);
15933
15974
  } else if (isEnter && !hasAltKey && keyboardConfig && keyboardOpts.isEnter && (selected.row || actived.row || treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow)) {
15934
15975
  // 退出选中
@@ -15937,12 +15978,12 @@ var Methods = {
15937
15978
  if (actived.row) {
15938
15979
  params = actived.args;
15939
15980
 
15940
- _this26.clearActived(evnt); // 如果配置了选中功能,则为选中状态
15981
+ _this27.clearActived(evnt); // 如果配置了选中功能,则为选中状态
15941
15982
 
15942
15983
 
15943
15984
  if (mouseConfig && mouseOpts.selected) {
15944
- _this26.$nextTick(function () {
15945
- return _this26.handleSelected(params, evnt);
15985
+ _this27.$nextTick(function () {
15986
+ return _this27.handleSelected(params, evnt);
15946
15987
  });
15947
15988
  }
15948
15989
  }
@@ -15953,15 +15994,15 @@ var Methods = {
15953
15994
 
15954
15995
  if (hasShiftKey) {
15955
15996
  if (keyboardOpts.enterToTab) {
15956
- _this26.moveTabSelected(targetArgs, hasShiftKey, evnt);
15997
+ _this27.moveTabSelected(targetArgs, hasShiftKey, evnt);
15957
15998
  } else {
15958
- _this26.moveSelected(targetArgs, isLeftArrow, true, isRightArrow, false, evnt);
15999
+ _this27.moveSelected(targetArgs, isLeftArrow, true, isRightArrow, false, evnt);
15959
16000
  }
15960
16001
  } else {
15961
16002
  if (keyboardOpts.enterToTab) {
15962
- _this26.moveTabSelected(targetArgs, hasShiftKey, evnt);
16003
+ _this27.moveTabSelected(targetArgs, hasShiftKey, evnt);
15963
16004
  } else {
15964
- _this26.moveSelected(targetArgs, isLeftArrow, false, isRightArrow, true, evnt);
16005
+ _this27.moveSelected(targetArgs, isLeftArrow, false, isRightArrow, true, evnt);
15965
16006
  }
15966
16007
  }
15967
16008
  } else if (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
@@ -15972,14 +16013,14 @@ var Methods = {
15972
16013
  evnt.preventDefault();
15973
16014
  var targetRow = childrens[0];
15974
16015
  params = {
15975
- $table: _this26,
16016
+ $table: _this27,
15976
16017
  row: targetRow
15977
16018
  };
15978
16019
 
15979
- _this26.setTreeExpand(currentRow, true).then(function () {
15980
- return _this26.scrollToRow(targetRow);
16020
+ _this27.setTreeExpand(currentRow, true).then(function () {
16021
+ return _this27.scrollToRow(targetRow);
15981
16022
  }).then(function () {
15982
- return _this26.triggerCurrentRowEvent(evnt, params);
16023
+ return _this27.triggerCurrentRowEvent(evnt, params);
15983
16024
  });
15984
16025
  }
15985
16026
  }
@@ -15988,18 +16029,18 @@ var Methods = {
15988
16029
  if (!isEditStatus) {
15989
16030
  // 如果按下了方向键
15990
16031
  if (selected.row && selected.column) {
15991
- _this26.moveSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt);
16032
+ _this27.moveSelected(selected.args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt);
15992
16033
  } else if ((isUpArrow || isDwArrow) && (rowOpts.isCurrent || highlightCurrentRow)) {
15993
16034
  // 当前行按键上下移动
15994
- _this26.moveCurrentRow(isUpArrow, isDwArrow, evnt);
16035
+ _this27.moveCurrentRow(isUpArrow, isDwArrow, evnt);
15995
16036
  }
15996
16037
  }
15997
16038
  } else if (isTab && keyboardConfig && keyboardOpts.isTab) {
15998
16039
  // 如果按下了 Tab 键切换
15999
16040
  if (selected.row || selected.column) {
16000
- _this26.moveTabSelected(selected.args, hasShiftKey, evnt);
16041
+ _this27.moveTabSelected(selected.args, hasShiftKey, evnt);
16001
16042
  } else if (actived.row || actived.column) {
16002
- _this26.moveTabSelected(actived.args, hasShiftKey, evnt);
16043
+ _this27.moveTabSelected(actived.args, hasShiftKey, evnt);
16003
16044
  }
16004
16045
  } else if (keyboardConfig && (isDel || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow ? isBack && keyboardOpts.isArrow : isBack))) {
16005
16046
  if (!isEditStatus) {
@@ -16010,10 +16051,10 @@ var Methods = {
16010
16051
  if (delMethod) {
16011
16052
  delMethod({
16012
16053
  row: selected.row,
16013
- rowIndex: _this26.getRowIndex(selected.row),
16054
+ rowIndex: _this27.getRowIndex(selected.row),
16014
16055
  column: selected.column,
16015
- columnIndex: _this26.getColumnIndex(selected.column),
16016
- $table: _this26
16056
+ columnIndex: _this27.getColumnIndex(selected.column),
16057
+ $table: _this27
16017
16058
  });
16018
16059
  } else {
16019
16060
  methods_setCellValue(selected.row, selected.column, null);
@@ -16023,21 +16064,21 @@ var Methods = {
16023
16064
  if (backMethod) {
16024
16065
  backMethod({
16025
16066
  row: selected.row,
16026
- rowIndex: _this26.getRowIndex(selected.row),
16067
+ rowIndex: _this27.getRowIndex(selected.row),
16027
16068
  column: selected.column,
16028
- columnIndex: _this26.getColumnIndex(selected.column),
16029
- $table: _this26
16069
+ columnIndex: _this27.getColumnIndex(selected.column),
16070
+ $table: _this27
16030
16071
  });
16031
16072
  } else {
16032
- _this26.handleActived(selected.args, evnt);
16073
+ _this27.handleActived(selected.args, evnt);
16033
16074
  }
16034
16075
  } else if (isDel) {
16035
16076
  // 如果按下 del 键,更新表尾数据
16036
- _this26.updateFooter();
16077
+ _this27.updateFooter();
16037
16078
  }
16038
16079
  } else if (isBack && keyboardOpts.isArrow && treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
16039
16080
  // 如果树形表格回退键关闭当前行返回父节点
16040
- var _XEUtils$findTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(_this26.afterFullData, function (item) {
16081
+ var _XEUtils$findTree = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(_this27.afterFullData, function (item) {
16041
16082
  return item === currentRow;
16042
16083
  }, treeOpts),
16043
16084
  parentRow = _XEUtils$findTree.parent;
@@ -16045,14 +16086,14 @@ var Methods = {
16045
16086
  if (parentRow) {
16046
16087
  evnt.preventDefault();
16047
16088
  params = {
16048
- $table: _this26,
16089
+ $table: _this27,
16049
16090
  row: parentRow
16050
16091
  };
16051
16092
 
16052
- _this26.setTreeExpand(parentRow, false).then(function () {
16053
- return _this26.scrollToRow(parentRow);
16093
+ _this27.setTreeExpand(parentRow, false).then(function () {
16094
+ return _this27.scrollToRow(parentRow);
16054
16095
  }).then(function () {
16055
- return _this26.triggerCurrentRowEvent(evnt, params);
16096
+ return _this27.triggerCurrentRowEvent(evnt, params);
16056
16097
  });
16057
16098
  }
16058
16099
  }
@@ -16065,25 +16106,27 @@ var Methods = {
16065
16106
  // 如果是按下非功能键之外允许直接编辑
16066
16107
 
16067
16108
  if (selected.column && selected.row && isEnableConf(selected.column.editRender)) {
16068
- if (!editOpts.activeMethod || editOpts.activeMethod(selected.args)) {
16109
+ if (!editOpts.activeMethod || editOpts.activeMethod(_objectSpread2(_objectSpread2({}, selected.args), {}, {
16110
+ $table: _this27
16111
+ }))) {
16069
16112
  if (editMethod) {
16070
16113
  editMethod({
16071
16114
  row: selected.row,
16072
- rowIndex: _this26.getRowIndex(selected.row),
16115
+ rowIndex: _this27.getRowIndex(selected.row),
16073
16116
  column: selected.column,
16074
- columnIndex: _this26.getColumnIndex(selected.column),
16075
- $table: _this26
16117
+ columnIndex: _this27.getColumnIndex(selected.column),
16118
+ $table: _this27
16076
16119
  });
16077
16120
  } else {
16078
16121
  methods_setCellValue(selected.row, selected.column, null);
16079
16122
 
16080
- _this26.handleActived(selected.args, evnt);
16123
+ _this27.handleActived(selected.args, evnt);
16081
16124
  }
16082
16125
  }
16083
16126
  }
16084
16127
  }
16085
16128
 
16086
- _this26.emitEvent('keydown', {}, evnt);
16129
+ _this27.emitEvent('keydown', {}, evnt);
16087
16130
  });
16088
16131
  }
16089
16132
  },
@@ -16153,12 +16196,12 @@ var Methods = {
16153
16196
  this.recalculate(true);
16154
16197
  },
16155
16198
  handleTooltipLeaveMethod: function handleTooltipLeaveMethod() {
16156
- var _this27 = this;
16199
+ var _this28 = this;
16157
16200
 
16158
16201
  var tooltipOpts = this.tooltipOpts;
16159
16202
  setTimeout(function () {
16160
- if (!_this27.tooltipActive) {
16161
- _this27.closeTooltip();
16203
+ if (!_this28.tooltipActive) {
16204
+ _this28.closeTooltip();
16162
16205
  }
16163
16206
  }, tooltipOpts.leaveDelay);
16164
16207
  return false;
@@ -16169,17 +16212,17 @@ var Methods = {
16169
16212
  this.closeTooltip();
16170
16213
  },
16171
16214
  handleTargetLeaveEvent: function handleTargetLeaveEvent() {
16172
- var _this28 = this;
16215
+ var _this29 = this;
16173
16216
 
16174
16217
  var tooltipOpts = this.tooltipOpts;
16175
16218
  this.tooltipActive = false;
16176
16219
 
16177
16220
  if (tooltipOpts.enterable) {
16178
16221
  this.tooltipTimeout = setTimeout(function () {
16179
- var tooltip = _this28.$refs.tooltip;
16222
+ var tooltip = _this29.$refs.tooltip;
16180
16223
 
16181
16224
  if (tooltip && !tooltip.isHover) {
16182
- _this28.closeTooltip();
16225
+ _this29.closeTooltip();
16183
16226
  }
16184
16227
  }, tooltipOpts.leaveDelay);
16185
16228
  } else {
@@ -16409,14 +16452,14 @@ var Methods = {
16409
16452
  * @param {Boolean} value 是否选中
16410
16453
  */
16411
16454
  setCheckboxRow: function setCheckboxRow(rows, value) {
16412
- var _this29 = this;
16455
+ var _this30 = this;
16413
16456
 
16414
16457
  if (rows && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(rows)) {
16415
16458
  rows = [rows];
16416
16459
  }
16417
16460
 
16418
16461
  rows.forEach(function (row) {
16419
- return _this29.handleSelectRow({
16462
+ return _this30.handleSelectRow({
16420
16463
  row: row
16421
16464
  }, !!value);
16422
16465
  });
@@ -16440,7 +16483,7 @@ var Methods = {
16440
16483
  * value 选中true 不选false 半选-1
16441
16484
  */
16442
16485
  handleSelectRow: function handleSelectRow(_ref6, value) {
16443
- var _this30 = this;
16486
+ var _this31 = this;
16444
16487
 
16445
16488
  var row = _ref6.row;
16446
16489
  var selection = this.selection,
@@ -16472,7 +16515,7 @@ var Methods = {
16472
16515
  return half === item;
16473
16516
  });
16474
16517
 
16475
- _this30.handleCheckboxReserveRow(row, value);
16518
+ _this31.handleCheckboxReserveRow(row, value);
16476
16519
  }
16477
16520
  }, treeOpts);
16478
16521
  } // 如果存在父节点,更新父节点状态
@@ -16544,7 +16587,7 @@ var Methods = {
16544
16587
  return half === item;
16545
16588
  });
16546
16589
 
16547
- _this30.handleCheckboxReserveRow(row, value);
16590
+ _this31.handleCheckboxReserveRow(row, value);
16548
16591
  }
16549
16592
  }, treeOpts);
16550
16593
  } // 如果存在父节点,更新父节点状态
@@ -16648,7 +16691,7 @@ var Methods = {
16648
16691
  * @param {Boolean} value 是否选中
16649
16692
  */
16650
16693
  setAllCheckboxRow: function setAllCheckboxRow(value) {
16651
- var _this31 = this;
16694
+ var _this32 = this;
16652
16695
 
16653
16696
  var afterFullData = this.afterFullData,
16654
16697
  treeConfig = this.treeConfig,
@@ -16761,11 +16804,11 @@ var Methods = {
16761
16804
  if (reserve) {
16762
16805
  if (value) {
16763
16806
  selectRows.forEach(function (row) {
16764
- checkboxReserveRowMap[methods_getRowid(_this31, row)] = row;
16807
+ checkboxReserveRowMap[methods_getRowid(_this32, row)] = row;
16765
16808
  });
16766
16809
  } else {
16767
16810
  afterFullData.forEach(function (row) {
16768
- return _this31.handleCheckboxReserveRow(row, false);
16811
+ return _this32.handleCheckboxReserveRow(row, false);
16769
16812
  });
16770
16813
  }
16771
16814
  }
@@ -16788,17 +16831,31 @@ var Methods = {
16788
16831
  checkMethod = checkboxOpts.checkMethod;
16789
16832
 
16790
16833
  if (!checkStrictly) {
16834
+ var disableRows = [];
16835
+ var checkRows = [];
16836
+ var isAllResolve = false;
16791
16837
  var isAllSelected = false;
16792
16838
  var isIndeterminate = false;
16793
16839
 
16794
16840
  if (checkField) {
16795
- isAllSelected = afterFullData.length && afterFullData.every(checkMethod ? function (row) {
16796
- return !checkMethod({
16841
+ isAllResolve = afterFullData.every(checkMethod ? function (row) {
16842
+ if (!checkMethod({
16797
16843
  row: row
16798
- }) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, checkField);
16844
+ })) {
16845
+ disableRows.push(row);
16846
+ return true;
16847
+ }
16848
+
16849
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, checkField)) {
16850
+ checkRows.push(row);
16851
+ return true;
16852
+ }
16853
+
16854
+ return false;
16799
16855
  } : function (row) {
16800
16856
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, checkField);
16801
16857
  });
16858
+ isAllSelected = isAllResolve && afterFullData.length !== disableRows.length;
16802
16859
 
16803
16860
  if (treeConfig) {
16804
16861
  if (halfField) {
@@ -16822,13 +16879,24 @@ var Methods = {
16822
16879
  }
16823
16880
  }
16824
16881
  } else {
16825
- isAllSelected = afterFullData.length && afterFullData.every(checkMethod ? function (row) {
16826
- return !checkMethod({
16882
+ isAllResolve = afterFullData.every(checkMethod ? function (row) {
16883
+ if (!checkMethod({
16827
16884
  row: row
16828
- }) || selection.indexOf(row) > -1;
16885
+ })) {
16886
+ disableRows.push(row);
16887
+ return true;
16888
+ }
16889
+
16890
+ if (selection.indexOf(row) > -1) {
16891
+ checkRows.push(row);
16892
+ return true;
16893
+ }
16894
+
16895
+ return false;
16829
16896
  } : function (row) {
16830
16897
  return selection.indexOf(row) > -1;
16831
16898
  });
16899
+ isAllSelected = isAllResolve && afterFullData.length !== disableRows.length;
16832
16900
 
16833
16901
  if (treeConfig) {
16834
16902
  isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
@@ -16960,7 +17028,7 @@ var Methods = {
16960
17028
  * 获取复选框保留选中的行
16961
17029
  */
16962
17030
  getCheckboxReserveRecords: function getCheckboxReserveRecords(isFull) {
16963
- var _this32 = this;
17031
+ var _this33 = this;
16964
17032
 
16965
17033
  var fullDataRowIdData = this.fullDataRowIdData,
16966
17034
  afterFullData = this.afterFullData,
@@ -16975,11 +17043,11 @@ var Methods = {
16975
17043
 
16976
17044
  if (treeConfig) {
16977
17045
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(afterFullData, function (row) {
16978
- afterFullIdMaps[methods_getRowid(_this32, row)] = 1;
17046
+ afterFullIdMaps[methods_getRowid(_this33, row)] = 1;
16979
17047
  }, treeOpts);
16980
17048
  } else {
16981
17049
  afterFullData.forEach(function (row) {
16982
- afterFullIdMaps[methods_getRowid(_this32, row)] = 1;
17050
+ afterFullIdMaps[methods_getRowid(_this33, row)] = 1;
16983
17051
  });
16984
17052
  }
16985
17053
 
@@ -17045,7 +17113,7 @@ var Methods = {
17045
17113
  * 清空行为不管是否被禁用还是保留记录,都将彻底清空选中状态
17046
17114
  */
17047
17115
  clearCheckboxRow: function clearCheckboxRow() {
17048
- var _this33 = this;
17116
+ var _this34 = this;
17049
17117
 
17050
17118
  var tableFullData = this.tableFullData,
17051
17119
  treeConfig = this.treeConfig,
@@ -17068,7 +17136,7 @@ var Methods = {
17068
17136
 
17069
17137
  if (reserve) {
17070
17138
  tableFullData.forEach(function (row) {
17071
- return _this33.handleCheckboxReserveRow(row, false);
17139
+ return _this34.handleCheckboxReserveRow(row, false);
17072
17140
  });
17073
17141
  }
17074
17142
 
@@ -17359,13 +17427,13 @@ var Methods = {
17359
17427
  * 如果存在规则,则校验
17360
17428
  */
17361
17429
  handleChangeCell: function handleChangeCell(evnt, params) {
17362
- var _this34 = this;
17430
+ var _this35 = this;
17363
17431
 
17364
17432
  this.checkValidate('blur').catch(function (e) {
17365
17433
  return e;
17366
17434
  }).then(function () {
17367
- _this34.handleActived(params, evnt).then(function () {
17368
- return _this34.checkValidate('change');
17435
+ _this35.handleActived(params, evnt).then(function () {
17436
+ return _this35.checkValidate('change');
17369
17437
  }).catch(function (e) {
17370
17438
  return e;
17371
17439
  });
@@ -17468,7 +17536,7 @@ var Methods = {
17468
17536
  * 如果是双击模式,则激活为编辑状态
17469
17537
  */
17470
17538
  triggerCellDblclickEvent: function triggerCellDblclickEvent(evnt, params) {
17471
- var _this35 = this;
17539
+ var _this36 = this;
17472
17540
 
17473
17541
  var editStore = this.editStore,
17474
17542
  editConfig = this.editConfig,
@@ -17483,15 +17551,15 @@ var Methods = {
17483
17551
  this.checkValidate('blur').catch(function (e) {
17484
17552
  return e;
17485
17553
  }).then(function () {
17486
- _this35.handleActived(params, evnt).then(function () {
17487
- return _this35.checkValidate('change');
17554
+ _this36.handleActived(params, evnt).then(function () {
17555
+ return _this36.checkValidate('change');
17488
17556
  }).catch(function (e) {
17489
17557
  return e;
17490
17558
  });
17491
17559
  });
17492
17560
  } else if (editOpts.mode === 'cell') {
17493
17561
  this.handleActived(params, evnt).then(function () {
17494
- return _this35.checkValidate('change');
17562
+ return _this36.checkValidate('change');
17495
17563
  }).catch(function (e) {
17496
17564
  return e;
17497
17565
  });
@@ -17502,7 +17570,7 @@ var Methods = {
17502
17570
  this.emitEvent('cell-dblclick', params, evnt);
17503
17571
  },
17504
17572
  handleDefaultSort: function handleDefaultSort() {
17505
- var _this36 = this;
17573
+ var _this37 = this;
17506
17574
 
17507
17575
  var sortConfig = this.sortConfig,
17508
17576
  sortOpts = this.sortOpts;
@@ -17519,7 +17587,7 @@ var Methods = {
17519
17587
  order = item.order;
17520
17588
 
17521
17589
  if (field && order) {
17522
- var column = _this36.getColumnByField(field);
17590
+ var column = _this37.getColumnByField(field);
17523
17591
 
17524
17592
  if (column && column.sortable) {
17525
17593
  column.order = order;
@@ -17562,7 +17630,7 @@ var Methods = {
17562
17630
  }
17563
17631
  },
17564
17632
  sort: function sort(sortConfs, sortOrder) {
17565
- var _this37 = this;
17633
+ var _this38 = this;
17566
17634
 
17567
17635
  var sortOpts = this.sortOpts;
17568
17636
  var multiple = sortOpts.multiple,
@@ -17595,7 +17663,7 @@ var Methods = {
17595
17663
  var column = field;
17596
17664
 
17597
17665
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(field)) {
17598
- column = _this37.getColumnByField(field);
17666
+ column = _this38.getColumnByField(field);
17599
17667
  }
17600
17668
 
17601
17669
  if (column && (column.sortable || column.remoteSort)) {
@@ -17604,7 +17672,7 @@ var Methods = {
17604
17672
  }
17605
17673
 
17606
17674
  if (orders.indexOf(order) === -1) {
17607
- order = getNextSortOrder(_this37, column);
17675
+ order = getNextSortOrder(_this38, column);
17608
17676
  }
17609
17677
 
17610
17678
  if (column.order !== order) {
@@ -17666,12 +17734,14 @@ var Methods = {
17666
17734
  getSortColumns: function getSortColumns() {
17667
17735
  var sortList = [];
17668
17736
  this.tableFullColumn.forEach(function (column) {
17669
- var order = column.order;
17737
+ var property = column.property,
17738
+ order = column.order;
17670
17739
 
17671
17740
  if ((column.sortable || column.remoteSort) && order) {
17672
17741
  sortList.push({
17673
17742
  column: column,
17674
- property: column.property,
17743
+ field: column.property,
17744
+ property: property,
17675
17745
  order: order
17676
17746
  });
17677
17747
  }
@@ -17752,7 +17822,7 @@ var Methods = {
17752
17822
  * @param {Row} row 行对象
17753
17823
  */
17754
17824
  reloadRowExpand: function reloadRowExpand(row) {
17755
- var _this38 = this;
17825
+ var _this39 = this;
17756
17826
 
17757
17827
  var expandOpts = this.expandOpts,
17758
17828
  expandLazyLoadeds = this.expandLazyLoadeds;
@@ -17760,7 +17830,7 @@ var Methods = {
17760
17830
 
17761
17831
  if (lazy && expandLazyLoadeds.indexOf(row) === -1) {
17762
17832
  this.clearRowExpandLoaded(row).then(function () {
17763
- return _this38.handleAsyncRowExpand(row);
17833
+ return _this39.handleAsyncRowExpand(row);
17764
17834
  });
17765
17835
  }
17766
17836
 
@@ -17837,28 +17907,28 @@ var Methods = {
17837
17907
  return this.setRowExpand(this.expandOpts.lazy ? this.tableData : this.tableFullData, expanded);
17838
17908
  },
17839
17909
  handleAsyncRowExpand: function handleAsyncRowExpand(row) {
17840
- var _this39 = this;
17910
+ var _this40 = this;
17841
17911
 
17842
17912
  var rest = this.fullAllDataRowMap.get(row);
17843
17913
  return new Promise(function (resolve) {
17844
- _this39.expandLazyLoadeds.push(row);
17914
+ _this40.expandLazyLoadeds.push(row);
17845
17915
 
17846
- _this39.expandOpts.loadMethod({
17847
- $table: _this39,
17916
+ _this40.expandOpts.loadMethod({
17917
+ $table: _this40,
17848
17918
  row: row,
17849
- rowIndex: _this39.getRowIndex(row),
17850
- $rowIndex: _this39.getVMRowIndex(row)
17919
+ rowIndex: _this40.getRowIndex(row),
17920
+ $rowIndex: _this40.getVMRowIndex(row)
17851
17921
  }).catch(function (e) {
17852
17922
  return e;
17853
17923
  }).then(function () {
17854
17924
  rest.expandLoaded = true;
17855
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.remove(_this39.expandLazyLoadeds, function (item) {
17925
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.remove(_this40.expandLazyLoadeds, function (item) {
17856
17926
  return item === row;
17857
17927
  });
17858
17928
 
17859
- _this39.rowExpandeds.push(row);
17929
+ _this40.rowExpandeds.push(row);
17860
17930
 
17861
- resolve(_this39.$nextTick().then(_this39.recalculate));
17931
+ resolve(_this40.$nextTick().then(_this40.recalculate));
17862
17932
  });
17863
17933
  });
17864
17934
  },
@@ -17871,7 +17941,7 @@ var Methods = {
17871
17941
  * @param {Boolean} expanded 是否展开
17872
17942
  */
17873
17943
  setRowExpand: function setRowExpand(rows, expanded) {
17874
- var _this40 = this;
17944
+ var _this41 = this;
17875
17945
 
17876
17946
  var fullAllDataRowMap = this.fullAllDataRowMap,
17877
17947
  expandLazyLoadeds = this.expandLazyLoadeds,
@@ -17904,8 +17974,8 @@ var Methods = {
17904
17974
  columnIndex: columnIndex,
17905
17975
  $columnIndex: $columnIndex,
17906
17976
  row: row,
17907
- rowIndex: _this40.getRowIndex(row),
17908
- $rowIndex: _this40.getVMRowIndex(row)
17977
+ rowIndex: _this41.getRowIndex(row),
17978
+ $rowIndex: _this41.getVMRowIndex(row)
17909
17979
  });
17910
17980
  }) : rows;
17911
17981
 
@@ -17916,7 +17986,7 @@ var Methods = {
17916
17986
  var isLoad = lazy && !rest.expandLoaded && expandLazyLoadeds.indexOf(row) === -1;
17917
17987
 
17918
17988
  if (isLoad) {
17919
- lazyRests.push(_this40.handleAsyncRowExpand(row));
17989
+ lazyRests.push(_this41.handleAsyncRowExpand(row));
17920
17990
  } else {
17921
17991
  rowExpandeds.push(row);
17922
17992
  }
@@ -17930,7 +18000,7 @@ var Methods = {
17930
18000
 
17931
18001
  if (reserve) {
17932
18002
  validRows.forEach(function (row) {
17933
- return _this40.handleRowExpandReserve(row, expanded);
18003
+ return _this41.handleRowExpandReserve(row, expanded);
17934
18004
  });
17935
18005
  }
17936
18006
  }
@@ -17951,7 +18021,7 @@ var Methods = {
17951
18021
  * 手动清空展开行状态,数据会恢复成未展开的状态
17952
18022
  */
17953
18023
  clearRowExpand: function clearRowExpand() {
17954
- var _this41 = this;
18024
+ var _this42 = this;
17955
18025
 
17956
18026
  var expandOpts = this.expandOpts,
17957
18027
  rowExpandeds = this.rowExpandeds,
@@ -17962,13 +18032,13 @@ var Methods = {
17962
18032
 
17963
18033
  if (reserve) {
17964
18034
  tableFullData.forEach(function (row) {
17965
- return _this41.handleRowExpandReserve(row, false);
18035
+ return _this42.handleRowExpandReserve(row, false);
17966
18036
  });
17967
18037
  }
17968
18038
 
17969
18039
  return this.$nextTick().then(function () {
17970
18040
  if (isExists) {
17971
- _this41.recalculate();
18041
+ _this42.recalculate();
17972
18042
  }
17973
18043
  });
17974
18044
  },
@@ -18047,7 +18117,7 @@ var Methods = {
18047
18117
  * @param {Row} row 行对象
18048
18118
  */
18049
18119
  reloadTreeExpand: function reloadTreeExpand(row) {
18050
- var _this42 = this;
18120
+ var _this43 = this;
18051
18121
 
18052
18122
  var treeOpts = this.treeOpts,
18053
18123
  treeLazyLoadeds = this.treeLazyLoadeds;
@@ -18057,15 +18127,15 @@ var Methods = {
18057
18127
 
18058
18128
  if (lazy && row[hasChild] && treeLazyLoadeds.indexOf(row) === -1) {
18059
18129
  this.clearTreeExpandLoaded(row).then(function () {
18060
- return _this42.handleAsyncTreeExpandChilds(row);
18130
+ return _this43.handleAsyncTreeExpandChilds(row);
18061
18131
  }).then(function () {
18062
18132
  if (transform) {
18063
- _this42.handleVirtualTreeToList();
18133
+ _this43.handleVirtualTreeToList();
18064
18134
 
18065
- return _this42.handleTableData();
18135
+ return _this43.handleTableData();
18066
18136
  }
18067
18137
  }).then(function () {
18068
- return _this42.recalculate();
18138
+ return _this43.recalculate();
18069
18139
  });
18070
18140
  }
18071
18141
 
@@ -18141,7 +18211,7 @@ var Methods = {
18141
18211
  }
18142
18212
  },
18143
18213
  handleAsyncTreeExpandChilds: function handleAsyncTreeExpandChilds(row) {
18144
- var _this43 = this;
18214
+ var _this44 = this;
18145
18215
 
18146
18216
  var fullAllDataRowMap = this.fullAllDataRowMap,
18147
18217
  treeExpandeds = this.treeExpandeds,
@@ -18155,7 +18225,7 @@ var Methods = {
18155
18225
  return new Promise(function (resolve) {
18156
18226
  treeLazyLoadeds.push(row);
18157
18227
  loadMethod({
18158
- $table: _this43,
18228
+ $table: _this44,
18159
18229
  row: row
18160
18230
  }).catch(function () {
18161
18231
  return [];
@@ -18170,29 +18240,29 @@ var Methods = {
18170
18240
  }
18171
18241
 
18172
18242
  if (childRecords) {
18173
- _this43.loadTreeChildren(row, childRecords).then(function (childRows) {
18243
+ _this44.loadTreeChildren(row, childRecords).then(function (childRows) {
18174
18244
  if (childRows.length && treeExpandeds.indexOf(row) === -1) {
18175
18245
  treeExpandeds.push(row);
18176
18246
  } // 如果当前节点已选中,则展开后子节点也被选中
18177
18247
 
18178
18248
 
18179
- if (!checkStrictly && _this43.isCheckedByCheckboxRow(row)) {
18180
- _this43.setCheckboxRow(childRows, true);
18249
+ if (!checkStrictly && _this44.isCheckedByCheckboxRow(row)) {
18250
+ _this44.setCheckboxRow(childRows, true);
18181
18251
  }
18182
18252
 
18183
- _this43.$nextTick().then(function () {
18253
+ _this44.$nextTick().then(function () {
18184
18254
  if (transform) {
18185
- return _this43.handleTableData();
18255
+ return _this44.handleTableData();
18186
18256
  }
18187
18257
  }).then(function () {
18188
- return _this43.recalculate();
18258
+ return _this44.recalculate();
18189
18259
  }).then(function () {
18190
18260
  return resolve();
18191
18261
  });
18192
18262
  });
18193
18263
  } else {
18194
- _this43.$nextTick().then(function () {
18195
- return _this43.recalculate();
18264
+ _this44.$nextTick().then(function () {
18265
+ return _this44.recalculate();
18196
18266
  }).then(function () {
18197
18267
  return resolve();
18198
18268
  });
@@ -18228,7 +18298,7 @@ var Methods = {
18228
18298
  * @returns
18229
18299
  */
18230
18300
  handleBaseTreeExpand: function handleBaseTreeExpand(rows, expanded) {
18231
- var _this44 = this;
18301
+ var _this45 = this;
18232
18302
 
18233
18303
  var fullAllDataRowMap = this.fullAllDataRowMap,
18234
18304
  tableFullData = this.tableFullData,
@@ -18276,7 +18346,7 @@ var Methods = {
18276
18346
  var isLoad = lazy && row[hasChild] && !rest.treeLoaded && treeLazyLoadeds.indexOf(row) === -1; // 是否使用懒加载
18277
18347
 
18278
18348
  if (isLoad) {
18279
- result.push(_this44.handleAsyncTreeExpandChilds(row));
18349
+ result.push(_this45.handleAsyncTreeExpandChilds(row));
18280
18350
  } else {
18281
18351
  if (row[children] && row[children].length) {
18282
18352
  treeExpandeds.push(row);
@@ -18292,7 +18362,7 @@ var Methods = {
18292
18362
 
18293
18363
  if (reserve) {
18294
18364
  validRows.forEach(function (row) {
18295
- return _this44.handleTreeExpandReserve(row, expanded);
18365
+ return _this45.handleTreeExpandReserve(row, expanded);
18296
18366
  });
18297
18367
  }
18298
18368
 
@@ -18306,14 +18376,14 @@ var Methods = {
18306
18376
  * @returns
18307
18377
  */
18308
18378
  handleVirtualTreeExpand: function handleVirtualTreeExpand(rows, expanded) {
18309
- var _this45 = this;
18379
+ var _this46 = this;
18310
18380
 
18311
18381
  return this.handleBaseTreeExpand(rows, expanded).then(function () {
18312
- _this45.handleVirtualTreeToList();
18382
+ _this46.handleVirtualTreeToList();
18313
18383
 
18314
- return _this45.handleTableData();
18384
+ return _this46.handleTableData();
18315
18385
  }).then(function () {
18316
- return _this45.recalculate();
18386
+ return _this46.recalculate();
18317
18387
  });
18318
18388
  },
18319
18389
 
@@ -18358,7 +18428,7 @@ var Methods = {
18358
18428
  * 手动清空树形节点的展开状态,数据会恢复成未展开的状态
18359
18429
  */
18360
18430
  clearTreeExpand: function clearTreeExpand() {
18361
- var _this46 = this;
18431
+ var _this47 = this;
18362
18432
 
18363
18433
  var treeOpts = this.treeOpts,
18364
18434
  treeExpandeds = this.treeExpandeds,
@@ -18370,19 +18440,19 @@ var Methods = {
18370
18440
 
18371
18441
  if (reserve) {
18372
18442
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(tableFullData, function (row) {
18373
- return _this46.handleTreeExpandReserve(row, false);
18443
+ return _this47.handleTreeExpandReserve(row, false);
18374
18444
  }, treeOpts);
18375
18445
  }
18376
18446
 
18377
18447
  return this.handleTableData().then(function () {
18378
18448
  if (transform) {
18379
- _this46.handleVirtualTreeToList();
18449
+ _this47.handleVirtualTreeToList();
18380
18450
 
18381
- return _this46.handleTableData();
18451
+ return _this47.handleTableData();
18382
18452
  }
18383
18453
  }).then(function () {
18384
18454
  if (isExists) {
18385
- _this46.recalculate();
18455
+ _this47.recalculate();
18386
18456
  }
18387
18457
  });
18388
18458
  },
@@ -18512,18 +18582,18 @@ var Methods = {
18512
18582
  },
18513
18583
  // 计算可视渲染相关数据
18514
18584
  computeScrollLoad: function computeScrollLoad() {
18515
- var _this47 = this;
18585
+ var _this48 = this;
18516
18586
 
18517
18587
  return this.$nextTick().then(function () {
18518
- var sYOpts = _this47.sYOpts,
18519
- sXOpts = _this47.sXOpts,
18520
- scrollXLoad = _this47.scrollXLoad,
18521
- scrollYLoad = _this47.scrollYLoad,
18522
- scrollXStore = _this47.scrollXStore,
18523
- scrollYStore = _this47.scrollYStore; // 计算 X 逻辑
18588
+ var sYOpts = _this48.sYOpts,
18589
+ sXOpts = _this48.sXOpts,
18590
+ scrollXLoad = _this48.scrollXLoad,
18591
+ scrollYLoad = _this48.scrollYLoad,
18592
+ scrollXStore = _this48.scrollXStore,
18593
+ scrollYStore = _this48.scrollYStore; // 计算 X 逻辑
18524
18594
 
18525
18595
  if (scrollXLoad) {
18526
- var _computeVirtualX3 = computeVirtualX(_this47),
18596
+ var _computeVirtualX3 = computeVirtualX(_this48),
18527
18597
  visibleXSize = _computeVirtualX3.visibleSize;
18528
18598
 
18529
18599
  var offsetXSize = sXOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(sXOpts.oSize) : browse.msie ? 10 : browse.edge ? 5 : 0;
@@ -18531,13 +18601,13 @@ var Methods = {
18531
18601
  scrollXStore.visibleSize = visibleXSize;
18532
18602
  scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex);
18533
18603
 
18534
- _this47.updateScrollXData();
18604
+ _this48.updateScrollXData();
18535
18605
  } else {
18536
- _this47.updateScrollXSpace();
18606
+ _this48.updateScrollXSpace();
18537
18607
  } // 计算 Y 逻辑
18538
18608
 
18539
18609
 
18540
- var _computeVirtualY = computeVirtualY(_this47),
18610
+ var _computeVirtualY = computeVirtualY(_this48),
18541
18611
  rowHeight = _computeVirtualY.rowHeight,
18542
18612
  visibleYSize = _computeVirtualY.visibleSize;
18543
18613
 
@@ -18549,14 +18619,14 @@ var Methods = {
18549
18619
  scrollYStore.visibleSize = visibleYSize;
18550
18620
  scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
18551
18621
 
18552
- _this47.updateScrollYData();
18622
+ _this48.updateScrollYData();
18553
18623
  } else {
18554
- _this47.updateScrollYSpace();
18624
+ _this48.updateScrollYSpace();
18555
18625
  }
18556
18626
 
18557
- _this47.rowHeight = rowHeight;
18627
+ _this48.rowHeight = rowHeight;
18558
18628
 
18559
- _this47.$nextTick(_this47.updateStyle);
18629
+ _this48.$nextTick(_this48.updateStyle);
18560
18630
  });
18561
18631
  },
18562
18632
  handleTableColumn: function handleTableColumn() {
@@ -18670,7 +18740,7 @@ var Methods = {
18670
18740
  * @param {Number} scrollTop 上距离
18671
18741
  */
18672
18742
  scrollTo: function scrollTo(scrollLeft, scrollTop) {
18673
- var _this48 = this;
18743
+ var _this49 = this;
18674
18744
 
18675
18745
  var $refs = this.$refs;
18676
18746
  var tableBody = $refs.tableBody,
@@ -18691,7 +18761,7 @@ var Methods = {
18691
18761
  if (this.scrollXLoad || this.scrollYLoad) {
18692
18762
  return new Promise(function (resolve) {
18693
18763
  return setTimeout(function () {
18694
- return resolve(_this48.$nextTick());
18764
+ return resolve(_this49.$nextTick());
18695
18765
  }, 50);
18696
18766
  });
18697
18767
  }
@@ -18742,7 +18812,7 @@ var Methods = {
18742
18812
  * @param {Row} row 行对象
18743
18813
  */
18744
18814
  scrollToTreeRow: function scrollToTreeRow(row) {
18745
- var _this49 = this;
18815
+ var _this50 = this;
18746
18816
 
18747
18817
  var tableFullData = this.tableFullData,
18748
18818
  treeConfig = this.treeConfig,
@@ -18757,15 +18827,15 @@ var Methods = {
18757
18827
  if (matchObj) {
18758
18828
  var nodes = matchObj.nodes;
18759
18829
  nodes.forEach(function (row, index) {
18760
- if (index < nodes.length - 1 && !_this49.isTreeExpandByRow(row)) {
18761
- rests.push(_this49.setTreeExpand(row, true));
18830
+ if (index < nodes.length - 1 && !_this50.isTreeExpandByRow(row)) {
18831
+ rests.push(_this50.setTreeExpand(row, true));
18762
18832
  }
18763
18833
  });
18764
18834
  }
18765
18835
  }
18766
18836
 
18767
18837
  return Promise.all(rests).then(function () {
18768
- return DomTools.rowToVisible(_this49, row);
18838
+ return DomTools.rowToVisible(_this50, row);
18769
18839
  });
18770
18840
  },
18771
18841
 
@@ -18829,29 +18899,29 @@ var Methods = {
18829
18899
  * 如果单元格配置了校验规则,则会进行校验
18830
18900
  */
18831
18901
  updateStatus: function updateStatus(scope, cellValue) {
18832
- var _this50 = this;
18902
+ var _this51 = this;
18833
18903
 
18834
18904
  var customVal = !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(cellValue);
18835
18905
  return this.$nextTick().then(function () {
18836
- var $refs = _this50.$refs,
18837
- editRules = _this50.editRules,
18838
- validStore = _this50.validStore;
18906
+ var $refs = _this51.$refs,
18907
+ editRules = _this51.editRules,
18908
+ validStore = _this51.validStore;
18839
18909
 
18840
18910
  if (scope && $refs.tableBody && editRules) {
18841
18911
  var row = scope.row,
18842
18912
  column = scope.column;
18843
18913
  var type = 'change';
18844
18914
 
18845
- if (_this50.hasCellRules(type, row, column)) {
18846
- var cell = _this50.getCell(row, column);
18915
+ if (_this51.hasCellRules(type, row, column)) {
18916
+ var cell = _this51.getCell(row, column);
18847
18917
 
18848
18918
  if (cell) {
18849
- return _this50.validCellRules(type, row, column, cellValue).then(function () {
18919
+ return _this51.validCellRules(type, row, column, cellValue).then(function () {
18850
18920
  if (customVal && validStore.visible) {
18851
18921
  methods_setCellValue(row, column, cellValue);
18852
18922
  }
18853
18923
 
18854
- _this50.clearValidate();
18924
+ _this51.clearValidate();
18855
18925
  }).catch(function (_ref8) {
18856
18926
  var rule = _ref8.rule;
18857
18927
 
@@ -18859,7 +18929,7 @@ var Methods = {
18859
18929
  methods_setCellValue(row, column, cellValue);
18860
18930
  }
18861
18931
 
18862
- _this50.showValidTooltip({
18932
+ _this51.showValidTooltip({
18863
18933
  rule: rule,
18864
18934
  row: row,
18865
18935
  column: column,
@@ -18880,7 +18950,7 @@ var Methods = {
18880
18950
  * @param {TableMergeConfig[]} merges { row: Row|number, column: ColumnInfo|number, rowspan: number, colspan: number }
18881
18951
  */
18882
18952
  setMergeCells: function setMergeCells(merges) {
18883
- var _this51 = this;
18953
+ var _this52 = this;
18884
18954
 
18885
18955
  if (this.spanMethod) {
18886
18956
  UtilTools.error('vxe.error.errConflicts', ['merge-cells', 'span-method']);
@@ -18888,7 +18958,7 @@ var Methods = {
18888
18958
 
18889
18959
  setMerges(this, merges, this.mergeList, this.afterFullData);
18890
18960
  return this.$nextTick().then(function () {
18891
- return _this51.updateCellAreas();
18961
+ return _this52.updateCellAreas();
18892
18962
  });
18893
18963
  },
18894
18964
 
@@ -18897,7 +18967,7 @@ var Methods = {
18897
18967
  * @param {TableMergeConfig[]} merges 多个或数组 [{row:Row|number, col:ColumnInfo|number}]
18898
18968
  */
18899
18969
  removeMergeCells: function removeMergeCells(merges) {
18900
- var _this52 = this;
18970
+ var _this53 = this;
18901
18971
 
18902
18972
  if (this.spanMethod) {
18903
18973
  UtilTools.error('vxe.error.errConflicts', ['merge-cells', 'span-method']);
@@ -18905,7 +18975,7 @@ var Methods = {
18905
18975
 
18906
18976
  var rest = removeMerges(this, merges, this.mergeList, this.afterFullData);
18907
18977
  return this.$nextTick().then(function () {
18908
- _this52.updateCellAreas();
18978
+ _this53.updateCellAreas();
18909
18979
 
18910
18980
  return rest;
18911
18981
  });
@@ -18929,7 +18999,7 @@ var Methods = {
18929
18999
  this.setMergeFooterItems(this.mergeFooterItems);
18930
19000
  },
18931
19001
  setMergeFooterItems: function setMergeFooterItems(merges) {
18932
- var _this53 = this;
19002
+ var _this54 = this;
18933
19003
 
18934
19004
  if (this.footerSpanMethod) {
18935
19005
  UtilTools.error('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
@@ -18937,11 +19007,11 @@ var Methods = {
18937
19007
 
18938
19008
  setMerges(this, merges, this.mergeFooterList, null);
18939
19009
  return this.$nextTick().then(function () {
18940
- return _this53.updateCellAreas();
19010
+ return _this54.updateCellAreas();
18941
19011
  });
18942
19012
  },
18943
19013
  removeMergeFooterItems: function removeMergeFooterItems(merges) {
18944
- var _this54 = this;
19014
+ var _this55 = this;
18945
19015
 
18946
19016
  if (this.footerSpanMethod) {
18947
19017
  UtilTools.error('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
@@ -18949,7 +19019,7 @@ var Methods = {
18949
19019
 
18950
19020
  var rest = removeMerges(this, merges, this.mergeFooterList, null);
18951
19021
  return this.$nextTick().then(function () {
18952
- _this54.updateCellAreas();
19022
+ _this55.updateCellAreas();
18953
19023
 
18954
19024
  return rest;
18955
19025
  });
@@ -19089,7 +19159,7 @@ var Methods = {
19089
19159
  }
19090
19160
  }; // Module methods
19091
19161
 
19092
- var funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,clearCopyCellArea,setCellAreas,openFind,openReplace,getSelectedCell,clearSelected,insert,insertAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearActived,getActiveRecord,isActiveByRow,setActiveRow,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',');
19162
+ var funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,clearCopyCellArea,setCellAreas,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearActived,getActiveRecord,isActiveByRow,setActiveRow,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',');
19093
19163
  funcs.forEach(function (name) {
19094
19164
  Methods[name] = function () {
19095
19165
  if (false) {}
@@ -20864,11 +20934,15 @@ var Table = Object.assign(table, {
20864
20934
  this.updateFooter();
20865
20935
 
20866
20936
  if (scrollXLoad || scrollYLoad) {
20867
- this.refreshScroll();
20937
+ if (scrollXLoad) {
20938
+ this.updateScrollXSpace();
20939
+ }
20868
20940
 
20869
20941
  if (scrollYLoad) {
20870
20942
  this.updateScrollYSpace();
20871
20943
  }
20944
+
20945
+ this.refreshScroll();
20872
20946
  }
20873
20947
  }
20874
20948
 
@@ -21469,6 +21543,7 @@ var Menu = {
21469
21543
 
21470
21544
 
21471
21545
 
21546
+
21472
21547
  var mixin_getRowid = UtilTools.getRowid;
21473
21548
 
21474
21549
  function insertTreeRow(_vm, newRecords, isAppend) {
@@ -22022,7 +22097,9 @@ function insertTreeRow(_vm, newRecords, isAppend) {
22022
22097
  // 判断是否禁用编辑
22023
22098
  var type = 'edit-disabled';
22024
22099
 
22025
- if (!activeMethod || activeMethod(params)) {
22100
+ if (!activeMethod || activeMethod(_objectSpread2(_objectSpread2({}, params), {}, {
22101
+ $table: this
22102
+ }))) {
22026
22103
  if (mouseConfig) {
22027
22104
  this.clearSelected(evnt);
22028
22105
  this.clearCellAreas(evnt);
@@ -23205,7 +23282,7 @@ var msgQueue = [];
23205
23282
 
23206
23283
  return this.$nextTick().then(function () {
23207
23284
  if (!_this7.zoomLocat) {
23208
- var marginSize = _this7.marginSize;
23285
+ var marginSize = Math.max(0, _this7.marginSize);
23209
23286
 
23210
23287
  var modalBoxElem = _this7.getBox();
23211
23288
 
@@ -23663,29 +23740,10 @@ var msgQueue = [];
23663
23740
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.pad-start.js
23664
23741
  var es_string_pad_start = __webpack_require__("4d90");
23665
23742
 
23666
- // CONCATENATED MODULE: ./packages/input/src/input.js
23667
-
23668
-
23669
-
23670
-
23743
+ // CONCATENATED MODULE: ./packages/input/src/date.js
23671
23744
 
23672
23745
 
23673
23746
 
23674
-
23675
-
23676
-
23677
-
23678
-
23679
-
23680
-
23681
-
23682
-
23683
-
23684
-
23685
- var yearSize = 20;
23686
- var monthSize = 20;
23687
- var quarterSize = 8;
23688
-
23689
23747
  function toStringTimeDate(str) {
23690
23748
  if (str) {
23691
23749
  var rest = new Date();
@@ -23714,7 +23772,6 @@ function toStringTimeDate(str) {
23714
23772
 
23715
23773
  return new Date('');
23716
23774
  }
23717
-
23718
23775
  function getDateQuarter(date) {
23719
23776
  var month = date.getMonth();
23720
23777
 
@@ -23728,7 +23785,14 @@ function getDateQuarter(date) {
23728
23785
 
23729
23786
  return 4;
23730
23787
  }
23788
+ // CONCATENATED MODULE: ./packages/input/src/number.js
23731
23789
 
23790
+
23791
+
23792
+
23793
+ function handleNumber(val) {
23794
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(val) ? val.replace(/,/g, '') : val;
23795
+ }
23732
23796
  function toFloatValueFixed(inputValue, digitsValue) {
23733
23797
  if (/^-/.test('' + inputValue)) {
23734
23798
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toFixed(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.ceil(inputValue, digitsValue), digitsValue);
@@ -23736,6 +23800,28 @@ function toFloatValueFixed(inputValue, digitsValue) {
23736
23800
 
23737
23801
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toFixed(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.floor(inputValue, digitsValue), digitsValue);
23738
23802
  }
23803
+ // CONCATENATED MODULE: ./packages/input/src/input.js
23804
+
23805
+
23806
+
23807
+
23808
+
23809
+
23810
+
23811
+
23812
+
23813
+
23814
+
23815
+
23816
+
23817
+
23818
+
23819
+
23820
+
23821
+
23822
+ var yearSize = 20;
23823
+ var monthSize = 20;
23824
+ var quarterSize = 8;
23739
23825
 
23740
23826
  function getNumberValue(_vm, val) {
23741
23827
  var type = _vm.type,
@@ -25244,7 +25330,7 @@ function renderExtraSuffixIcon(h, _vm) {
25244
25330
  if (!inpReadonly) {
25245
25331
  if (isNumType) {
25246
25332
  if (inputValue) {
25247
- var inpNumVal = type === 'integer' ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toInteger(inputValue) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(inputValue);
25333
+ var inpNumVal = type === 'integer' ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toInteger(handleNumber(inputValue)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(handleNumber(inputValue));
25248
25334
 
25249
25335
  if (!this.vaildMinNum(inpNumVal)) {
25250
25336
  inpNumVal = min;
@@ -25436,7 +25522,7 @@ function renderExtraSuffixIcon(h, _vm) {
25436
25522
  type = this.type,
25437
25523
  inputValue = this.inputValue,
25438
25524
  stepValue = this.stepValue;
25439
- var numValue = type === 'integer' ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toInteger(inputValue) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(inputValue);
25525
+ var numValue = type === 'integer' ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toInteger(handleNumber(inputValue)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(handleNumber(inputValue));
25440
25526
  var newValue = isPlus ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.add(numValue, stepValue) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.subtract(numValue, stepValue);
25441
25527
  var restNum;
25442
25528
 
@@ -28041,6 +28127,7 @@ var es_string_repeat = __webpack_require__("38cf");
28041
28127
 
28042
28128
 
28043
28129
 
28130
+
28044
28131
 
28045
28132
 
28046
28133
  var mixin_formatText = UtilTools.formatText; // 默认导出或打印的 HTML 样式
@@ -28076,16 +28163,18 @@ function hasTreeChildren($xetable, row) {
28076
28163
  return row[treeOpts.children] && row[treeOpts.children].length > 0;
28077
28164
  }
28078
28165
 
28079
- function getSeq($xetable, row, rowIndex, column, columnIndex) {
28166
+ function getSeq($xetable, row, $rowIndex, column, $columnIndex) {
28080
28167
  var seqOpts = $xetable.seqOpts;
28081
28168
  var seqMethod = seqOpts.seqMethod || column.seqMethod;
28082
28169
 
28083
28170
  if (seqMethod) {
28084
28171
  return seqMethod({
28085
28172
  row: row,
28086
- rowIndex: rowIndex,
28173
+ rowIndex: $xetable.getRowIndex(row),
28174
+ $rowIndex: $rowIndex,
28087
28175
  column: column,
28088
- columnIndex: columnIndex
28176
+ columnIndex: $xetable.getColumnIndex(column),
28177
+ $columnIndex: $columnIndex
28089
28178
  });
28090
28179
  }
28091
28180
 
@@ -28113,7 +28202,8 @@ function toBooleanValue(cellValue) {
28113
28202
  }
28114
28203
 
28115
28204
  function getLabelData($xetable, opts, columns, datas) {
28116
- var isAllExpand = opts.isAllExpand;
28205
+ var isAllExpand = opts.isAllExpand,
28206
+ mode = opts.mode;
28117
28207
  var treeConfig = $xetable.treeConfig,
28118
28208
  treeOpts = $xetable.treeOpts,
28119
28209
  radioOpts = $xetable.radioOpts,
@@ -28127,7 +28217,7 @@ function getLabelData($xetable, opts, columns, datas) {
28127
28217
  // 如果是树表格只允许导出数据源
28128
28218
  var rest = [];
28129
28219
  var expandMaps = new Map();
28130
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(datas, function (item, rowIndex, items, path, parent, nodes) {
28220
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eachTree(datas, function (item, $rowIndex, items, path, parent, nodes) {
28131
28221
  var row = item._row || item;
28132
28222
  var parentRow = parent && parent._row ? parent._row : parent;
28133
28223
 
@@ -28139,7 +28229,7 @@ function getLabelData($xetable, opts, columns, datas) {
28139
28229
  _hasChild: hasRowChild,
28140
28230
  _expand: hasRowChild && $xetable.isTreeExpandByRow(row)
28141
28231
  };
28142
- columns.forEach(function (column, columnIndex) {
28232
+ columns.forEach(function (column, $columnIndex) {
28143
28233
  var cellValue = '';
28144
28234
  var renderOpts = column.editRender || column.cellRender;
28145
28235
  var exportLabelMethod = column.exportMethod;
@@ -28162,7 +28252,9 @@ function getLabelData($xetable, opts, columns, datas) {
28162
28252
  } else {
28163
28253
  switch (column.type) {
28164
28254
  case 'seq':
28165
- cellValue = getSeq($xetable, row, rowIndex, column, columnIndex);
28255
+ cellValue = mode === 'all' ? path.map(function (num, i) {
28256
+ return i % 2 === 0 ? Number(num) + 1 : '.';
28257
+ }).join('') : getSeq($xetable, row, $rowIndex, column, $columnIndex);
28166
28258
  break;
28167
28259
 
28168
28260
  case 'checkbox':
@@ -28211,11 +28303,11 @@ function getLabelData($xetable, opts, columns, datas) {
28211
28303
  return rest;
28212
28304
  }
28213
28305
 
28214
- return datas.map(function (row, rowIndex) {
28306
+ return datas.map(function (row, $rowIndex) {
28215
28307
  var item = {
28216
28308
  _row: row
28217
28309
  };
28218
- columns.forEach(function (column, columnIndex) {
28310
+ columns.forEach(function (column, $columnIndex) {
28219
28311
  var cellValue = '';
28220
28312
  var renderOpts = column.editRender || column.cellRender;
28221
28313
  var exportLabelMethod = column.exportMethod;
@@ -28238,7 +28330,7 @@ function getLabelData($xetable, opts, columns, datas) {
28238
28330
  } else {
28239
28331
  switch (column.type) {
28240
28332
  case 'seq':
28241
- cellValue = getSeq($xetable, row, rowIndex, column, columnIndex);
28333
+ cellValue = mode === 'all' ? $rowIndex + 1 : getSeq($xetable, row, $rowIndex, column, $columnIndex);
28242
28334
  break;
28243
28335
 
28244
28336
  case 'checkbox':
@@ -30597,6 +30689,7 @@ function validErrorRuleValue(rule, val) {
30597
30689
  row: row,
30598
30690
  columnIndex: _this2.getColumnIndex(column),
30599
30691
  column: column,
30692
+ field: column.property,
30600
30693
  $table: _this2
30601
30694
  };
30602
30695
 
@@ -30744,6 +30837,7 @@ function validErrorRuleValue(rule, val) {
30744
30837
  rowIndex: _this3.getRowIndex(row),
30745
30838
  column: column,
30746
30839
  columnIndex: _this3.getColumnIndex(column),
30840
+ field: column.property,
30747
30841
  $table: _this3
30748
30842
  });
30749
30843
 
@@ -31027,6 +31121,18 @@ var cellType = 'header';
31027
31121
  elemStore["".concat(prefix, "xSpace")] = $refs.xSpace;
31028
31122
  elemStore["".concat(prefix, "repair")] = $refs.repair;
31029
31123
  },
31124
+ destroyed: function destroyed() {
31125
+ var $xetable = this.$parent,
31126
+ fixedType = this.fixedType;
31127
+ var elemStore = $xetable.elemStore;
31128
+ var prefix = "".concat(fixedType || 'main', "-header-");
31129
+ elemStore["".concat(prefix, "wrapper")] = null;
31130
+ elemStore["".concat(prefix, "table")] = null;
31131
+ elemStore["".concat(prefix, "colgroup")] = null;
31132
+ elemStore["".concat(prefix, "list")] = null;
31133
+ elemStore["".concat(prefix, "xSpace")] = null;
31134
+ elemStore["".concat(prefix, "repair")] = null;
31135
+ },
31030
31136
  render: function render(h) {
31031
31137
  var _this = this;
31032
31138
 
@@ -31396,6 +31502,17 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
31396
31502
  elemStore["".concat(prefix, "list")] = $refs.tfoot;
31397
31503
  elemStore["".concat(prefix, "xSpace")] = $refs.xSpace;
31398
31504
  },
31505
+ destroyed: function destroyed() {
31506
+ var $xetable = this.$parent,
31507
+ fixedType = this.fixedType;
31508
+ var elemStore = $xetable.elemStore;
31509
+ var prefix = "".concat(fixedType || 'main', "-footer-");
31510
+ elemStore["".concat(prefix, "wrapper")] = null;
31511
+ elemStore["".concat(prefix, "table")] = null;
31512
+ elemStore["".concat(prefix, "colgroup")] = null;
31513
+ elemStore["".concat(prefix, "list")] = null;
31514
+ elemStore["".concat(prefix, "xSpace")] = null;
31515
+ },
31399
31516
  render: function render(h) {
31400
31517
  var _e = this._e,
31401
31518
  $xetable = this.$parent,
@@ -32362,7 +32479,9 @@ Object.keys(packages_table.methods).forEach(function (name) {
32362
32479
  handleActiveMethod: function handleActiveMethod(params) {
32363
32480
  var editConfig = this.editConfig;
32364
32481
  var activeMethod = editConfig ? editConfig.activeMethod : null;
32365
- return this.pendingRecords.indexOf(params.row) === -1 && (!activeMethod || activeMethod(params));
32482
+ return this.pendingRecords.indexOf(params.row) === -1 && (!activeMethod || activeMethod(_objectSpread2(_objectSpread2({}, params), {}, {
32483
+ $grid: this
32484
+ })));
32366
32485
  },
32367
32486
  initToolbar: function initToolbar() {
32368
32487
  var _this3 = this;
@@ -32572,6 +32691,7 @@ Object.keys(packages_table.methods).forEach(function (name) {
32572
32691
 
32573
32692
  sortList = defaultSort.map(function (item) {
32574
32693
  return {
32694
+ field: item.field,
32575
32695
  property: item.field,
32576
32696
  order: item.order
32577
32697
  };
@@ -34026,6 +34146,11 @@ var Toolbar = Object.assign(src_toolbar, {
34026
34146
  default: null
34027
34147
  }
34028
34148
  },
34149
+ data: function data() {
34150
+ return {
34151
+ inpCurrPage: this.currentPage
34152
+ };
34153
+ },
34029
34154
  computed: {
34030
34155
  isSizes: function isSizes() {
34031
34156
  return this.layouts.some(function (name) {
@@ -34064,6 +34189,11 @@ var Toolbar = Object.assign(src_toolbar, {
34064
34189
  });
34065
34190
  }
34066
34191
  },
34192
+ watch: {
34193
+ currentPage: function currentPage(value) {
34194
+ this.inpCurrPage = value;
34195
+ }
34196
+ },
34067
34197
  render: function render(h) {
34068
34198
  var _this = this,
34069
34199
  _ref;
@@ -34224,13 +34354,14 @@ var Toolbar = Object.assign(src_toolbar, {
34224
34354
  }, conf.i18n('vxe.pager.goto')) : null, h('input', {
34225
34355
  class: 'vxe-pager--goto',
34226
34356
  domProps: {
34227
- value: this.currentPage
34357
+ value: this.inpCurrPage
34228
34358
  },
34229
34359
  attrs: {
34230
34360
  type: 'text',
34231
34361
  autocomplete: 'off'
34232
34362
  },
34233
34363
  on: {
34364
+ input: this.jumpInputEvent,
34234
34365
  keydown: this.jumpKeydownEvent,
34235
34366
  blur: this.triggerJumpEvent
34236
34367
  }
@@ -34374,6 +34505,9 @@ var Toolbar = Object.assign(src_toolbar, {
34374
34505
  });
34375
34506
  }
34376
34507
  },
34508
+ jumpInputEvent: function jumpInputEvent(evnt) {
34509
+ this.inpCurrPage = evnt.target.value;
34510
+ },
34377
34511
  jumpKeydownEvent: function jumpKeydownEvent(evnt) {
34378
34512
  if (evnt.keyCode === 13) {
34379
34513
  this.triggerJumpEvent(evnt);
@@ -36149,6 +36283,7 @@ function renderItems(h, _vm, itemList) {
36149
36283
  var hasEllipsis = showTitle || showTooltip || showEllipsis;
36150
36284
  var params = {
36151
36285
  data: data,
36286
+ field: field,
36152
36287
  property: field,
36153
36288
  item: item,
36154
36289
  $form: _vm
@@ -36482,6 +36617,7 @@ function renderItems(h, _vm, itemList) {
36482
36617
  evnt.preventDefault();
36483
36618
 
36484
36619
  if (!this.preventSubmit) {
36620
+ this.clearValidate();
36485
36621
  this.beginValidate(this.getItems()).then(function () {
36486
36622
  _this3.$emit('submit', {
36487
36623
  data: _this3.data,
@@ -36516,6 +36652,7 @@ function renderItems(h, _vm, itemList) {
36516
36652
  if (compConf && compConf.itemResetMethod) {
36517
36653
  compConf.itemResetMethod({
36518
36654
  data: data,
36655
+ field: field,
36519
36656
  property: field,
36520
36657
  item: item,
36521
36658
  $form: _this4
@@ -36626,6 +36763,7 @@ function renderItems(h, _vm, itemList) {
36626
36763
  return this.$nextTick();
36627
36764
  },
36628
36765
  validate: function validate(callback) {
36766
+ this.clearValidate();
36629
36767
  return this.beginValidate(this.getItems(), '', callback);
36630
36768
  },
36631
36769
  validateField: function validateField(field, callback) {
@@ -36642,7 +36780,6 @@ function renderItems(h, _vm, itemList) {
36642
36780
  var validRest = {};
36643
36781
  var validFields = [];
36644
36782
  var itemValids = [];
36645
- this.clearValidate();
36646
36783
  clearTimeout(this.showErrTime);
36647
36784
 
36648
36785
  if (data && formRules) {
@@ -36659,6 +36796,7 @@ function renderItems(h, _vm, itemList) {
36659
36796
  rule: rule,
36660
36797
  rules: rules,
36661
36798
  data: data,
36799
+ field: field,
36662
36800
  property: field,
36663
36801
  $form: _this7
36664
36802
  };
@@ -36750,6 +36888,7 @@ function renderItems(h, _vm, itemList) {
36750
36888
  rule: rule,
36751
36889
  rules: rules,
36752
36890
  data: data,
36891
+ field: property,
36753
36892
  property: property,
36754
36893
  $form: _this8
36755
36894
  });
@@ -37742,6 +37881,7 @@ var List = Object.assign(src_list, {
37742
37881
  name: 'VxePulldown',
37743
37882
  mixins: [size],
37744
37883
  props: {
37884
+ value: Boolean,
37745
37885
  disabled: Boolean,
37746
37886
  placement: String,
37747
37887
  size: {
@@ -37765,6 +37905,15 @@ var List = Object.assign(src_list, {
37765
37905
  isActivated: false
37766
37906
  };
37767
37907
  },
37908
+ watch: {
37909
+ value: function value(_value) {
37910
+ if (_value) {
37911
+ this.showPanel();
37912
+ } else {
37913
+ this.hidePanel();
37914
+ }
37915
+ }
37916
+ },
37768
37917
  created: function created() {
37769
37918
  GlobalEvent.on(this, 'mousewheel', this.handleGlobalMousewheelEvent);
37770
37919
  GlobalEvent.on(this, 'mousedown', this.handleGlobalMousedownEvent);
@@ -37905,6 +38054,8 @@ var List = Object.assign(src_list, {
37905
38054
  setTimeout(function () {
37906
38055
  _this.visiblePanel = true;
37907
38056
 
38057
+ _this.$emit('update:input', true);
38058
+
37908
38059
  _this.updatePlacement();
37909
38060
 
37910
38061
  setTimeout(function () {
@@ -37926,6 +38077,7 @@ var List = Object.assign(src_list, {
37926
38077
  var _this2 = this;
37927
38078
 
37928
38079
  this.visiblePanel = false;
38080
+ this.$emit('update:input', false);
37929
38081
  return new Promise(function (resolve) {
37930
38082
  if (_this2.animatVisible) {
37931
38083
  _this2.hidePanelTimeout = setTimeout(function () {