vxe-table 3.5.0-beta.2 → 3.5.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.umd.js CHANGED
@@ -8471,7 +8471,7 @@ var iconPrefix = 'vxe-icon--';
8471
8471
  parentField: 'parentId',
8472
8472
  children: 'children',
8473
8473
  hasChild: 'hasChild',
8474
- mapChildren: '_X_CHILD',
8474
+ mapChildren: '_X_ROW_CHILD',
8475
8475
  indent: 20,
8476
8476
  showIcon: true
8477
8477
  },
@@ -8756,7 +8756,7 @@ var es_array_concat = __webpack_require__("99af");
8756
8756
 
8757
8757
 
8758
8758
  function getLog(message, params) {
8759
- return "[vxe-table v".concat("3.5.0-beta.2", "] ").concat(conf.i18n(message, params));
8759
+ return "[vxe-table v".concat("3.5.0-beta.3", "] ").concat(conf.i18n(message, params));
8760
8760
  }
8761
8761
 
8762
8762
  function outLog(type) {
@@ -10025,7 +10025,7 @@ function _t(key, args) {
10025
10025
  var v = 'v3';
10026
10026
  var VXETable = {
10027
10027
  v: v,
10028
- version: "3.5.0-beta.2",
10028
+ version: "3.5.0-beta.3",
10029
10029
  reg: reg,
10030
10030
  use: use,
10031
10031
  setup: setup,
@@ -18689,8 +18689,14 @@ var Methods = {
18689
18689
  this.tableColumn = scrollXLoad ? visibleColumn.slice(scrollXStore.startIndex, scrollXStore.endIndex) : visibleColumn.slice(0);
18690
18690
  },
18691
18691
  updateScrollXData: function updateScrollXData() {
18692
- this.handleTableColumn();
18693
- this.updateScrollXSpace();
18692
+ var _this49 = this;
18693
+
18694
+ this.tableColumn = [];
18695
+ this.$nextTick(function () {
18696
+ _this49.handleTableColumn();
18697
+
18698
+ _this49.updateScrollXSpace();
18699
+ });
18694
18700
  },
18695
18701
  // 更新横向 X 可视渲染上下剩余空间大小
18696
18702
  updateScrollXSpace: function updateScrollXSpace() {
@@ -18746,8 +18752,14 @@ var Methods = {
18746
18752
  }
18747
18753
  },
18748
18754
  updateScrollYData: function updateScrollYData() {
18749
- this.handleTableData();
18750
- this.updateScrollYSpace();
18755
+ var _this50 = this;
18756
+
18757
+ this.tableData = [];
18758
+ this.$nextTick(function () {
18759
+ _this50.handleTableData();
18760
+
18761
+ _this50.updateScrollYSpace();
18762
+ });
18751
18763
  },
18752
18764
  // 更新纵向 Y 可视渲染上下剩余空间大小
18753
18765
  updateScrollYSpace: function updateScrollYSpace() {
@@ -18793,7 +18805,7 @@ var Methods = {
18793
18805
  * @param {Number} scrollTop 上距离
18794
18806
  */
18795
18807
  scrollTo: function scrollTo(scrollLeft, scrollTop) {
18796
- var _this49 = this;
18808
+ var _this51 = this;
18797
18809
 
18798
18810
  var $refs = this.$refs;
18799
18811
  var tableBody = $refs.tableBody,
@@ -18814,7 +18826,7 @@ var Methods = {
18814
18826
  if (this.scrollXLoad || this.scrollYLoad) {
18815
18827
  return new Promise(function (resolve) {
18816
18828
  return setTimeout(function () {
18817
- return resolve(_this49.$nextTick());
18829
+ return resolve(_this51.$nextTick());
18818
18830
  }, 50);
18819
18831
  });
18820
18832
  }
@@ -18865,7 +18877,7 @@ var Methods = {
18865
18877
  * @param {Row} row 行对象
18866
18878
  */
18867
18879
  scrollToTreeRow: function scrollToTreeRow(row) {
18868
- var _this50 = this;
18880
+ var _this52 = this;
18869
18881
 
18870
18882
  var tableFullData = this.tableFullData,
18871
18883
  treeConfig = this.treeConfig,
@@ -18880,15 +18892,15 @@ var Methods = {
18880
18892
  if (matchObj) {
18881
18893
  var nodes = matchObj.nodes;
18882
18894
  nodes.forEach(function (row, index) {
18883
- if (index < nodes.length - 1 && !_this50.isTreeExpandByRow(row)) {
18884
- rests.push(_this50.setTreeExpand(row, true));
18895
+ if (index < nodes.length - 1 && !_this52.isTreeExpandByRow(row)) {
18896
+ rests.push(_this52.setTreeExpand(row, true));
18885
18897
  }
18886
18898
  });
18887
18899
  }
18888
18900
  }
18889
18901
 
18890
18902
  return Promise.all(rests).then(function () {
18891
- return dom.rowToVisible(_this50, row);
18903
+ return dom.rowToVisible(_this52, row);
18892
18904
  });
18893
18905
  },
18894
18906
 
@@ -18952,29 +18964,29 @@ var Methods = {
18952
18964
  * 如果单元格配置了校验规则,则会进行校验
18953
18965
  */
18954
18966
  updateStatus: function updateStatus(scope, cellValue) {
18955
- var _this51 = this;
18967
+ var _this53 = this;
18956
18968
 
18957
18969
  var customVal = !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(cellValue);
18958
18970
  return this.$nextTick().then(function () {
18959
- var $refs = _this51.$refs,
18960
- editRules = _this51.editRules,
18961
- validStore = _this51.validStore;
18971
+ var $refs = _this53.$refs,
18972
+ editRules = _this53.editRules,
18973
+ validStore = _this53.validStore;
18962
18974
 
18963
18975
  if (scope && $refs.tableBody && editRules) {
18964
18976
  var row = scope.row,
18965
18977
  column = scope.column;
18966
18978
  var type = 'change';
18967
18979
 
18968
- if (_this51.hasCellRules(type, row, column)) {
18969
- var cell = _this51.getCell(row, column);
18980
+ if (_this53.hasCellRules(type, row, column)) {
18981
+ var cell = _this53.getCell(row, column);
18970
18982
 
18971
18983
  if (cell) {
18972
- return _this51.validCellRules(type, row, column, cellValue).then(function () {
18984
+ return _this53.validCellRules(type, row, column, cellValue).then(function () {
18973
18985
  if (customVal && validStore.visible) {
18974
18986
  methods_setCellValue(row, column, cellValue);
18975
18987
  }
18976
18988
 
18977
- _this51.clearValidate();
18989
+ _this53.clearValidate();
18978
18990
  }).catch(function (_ref8) {
18979
18991
  var rule = _ref8.rule;
18980
18992
 
@@ -18982,7 +18994,7 @@ var Methods = {
18982
18994
  methods_setCellValue(row, column, cellValue);
18983
18995
  }
18984
18996
 
18985
- _this51.showValidTooltip({
18997
+ _this53.showValidTooltip({
18986
18998
  rule: rule,
18987
18999
  row: row,
18988
19000
  column: column,
@@ -19003,7 +19015,7 @@ var Methods = {
19003
19015
  * @param {TableMergeConfig[]} merges { row: Row|number, column: ColumnInfo|number, rowspan: number, colspan: number }
19004
19016
  */
19005
19017
  setMergeCells: function setMergeCells(merges) {
19006
- var _this52 = this;
19018
+ var _this54 = this;
19007
19019
 
19008
19020
  if (this.spanMethod) {
19009
19021
  errLog('vxe.error.errConflicts', ['merge-cells', 'span-method']);
@@ -19011,7 +19023,7 @@ var Methods = {
19011
19023
 
19012
19024
  setMerges(this, merges, this.mergeList, this.afterFullData);
19013
19025
  return this.$nextTick().then(function () {
19014
- return _this52.updateCellAreas();
19026
+ return _this54.updateCellAreas();
19015
19027
  });
19016
19028
  },
19017
19029
 
@@ -19020,7 +19032,7 @@ var Methods = {
19020
19032
  * @param {TableMergeConfig[]} merges 多个或数组 [{row:Row|number, col:ColumnInfo|number}]
19021
19033
  */
19022
19034
  removeMergeCells: function removeMergeCells(merges) {
19023
- var _this53 = this;
19035
+ var _this55 = this;
19024
19036
 
19025
19037
  if (this.spanMethod) {
19026
19038
  errLog('vxe.error.errConflicts', ['merge-cells', 'span-method']);
@@ -19028,7 +19040,7 @@ var Methods = {
19028
19040
 
19029
19041
  var rest = removeMerges(this, merges, this.mergeList, this.afterFullData);
19030
19042
  return this.$nextTick().then(function () {
19031
- _this53.updateCellAreas();
19043
+ _this55.updateCellAreas();
19032
19044
 
19033
19045
  return rest;
19034
19046
  });
@@ -19052,7 +19064,7 @@ var Methods = {
19052
19064
  this.setMergeFooterItems(this.mergeFooterItems);
19053
19065
  },
19054
19066
  setMergeFooterItems: function setMergeFooterItems(merges) {
19055
- var _this54 = this;
19067
+ var _this56 = this;
19056
19068
 
19057
19069
  if (this.footerSpanMethod) {
19058
19070
  errLog('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
@@ -19060,11 +19072,11 @@ var Methods = {
19060
19072
 
19061
19073
  setMerges(this, merges, this.mergeFooterList, null);
19062
19074
  return this.$nextTick().then(function () {
19063
- return _this54.updateCellAreas();
19075
+ return _this56.updateCellAreas();
19064
19076
  });
19065
19077
  },
19066
19078
  removeMergeFooterItems: function removeMergeFooterItems(merges) {
19067
- var _this55 = this;
19079
+ var _this57 = this;
19068
19080
 
19069
19081
  if (this.footerSpanMethod) {
19070
19082
  errLog('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
@@ -19072,7 +19084,7 @@ var Methods = {
19072
19084
 
19073
19085
  var rest = removeMerges(this, merges, this.mergeFooterList, null);
19074
19086
  return this.$nextTick().then(function () {
19075
- _this55.updateCellAreas();
19087
+ _this57.updateCellAreas();
19076
19088
 
19077
19089
  return rest;
19078
19090
  });