vxe-table 3.7.9-beta.0 → 3.7.9-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.umd.js CHANGED
@@ -10593,7 +10593,7 @@ var es_array_concat = __webpack_require__(2222);
10593
10593
 
10594
10594
 
10595
10595
  function getLog(message, params) {
10596
- return "[vxe-table v".concat("3.7.9-beta.0", "] ").concat(conf.i18n(message, params));
10596
+ return "[vxe-table v".concat("3.7.9-beta.1", "] ").concat(conf.i18n(message, params));
10597
10597
  }
10598
10598
  function outLog(type) {
10599
10599
  return function (message, params) {
@@ -12025,7 +12025,7 @@ var setup = config;
12025
12025
  var globalStore = {};
12026
12026
  var VXETable = {
12027
12027
  v: v,
12028
- version: "3.7.9-beta.0",
12028
+ version: "3.7.9-beta.1",
12029
12029
  reg: reg,
12030
12030
  use: use,
12031
12031
  setup: setup,
@@ -12418,9 +12418,11 @@ var DomTools = {
12418
12418
  });
12419
12419
  },
12420
12420
  getAbsolutePos: function getAbsolutePos(elem) {
12421
+ // 当主页面嵌套在iframe时,elem.getBoundingClientRect()仅计算在当前body内的边界距离,忽略了body所在的边界距离
12422
+ var bodyBounding = document.body.getBoundingClientRect();
12421
12423
  var bounding = elem.getBoundingClientRect();
12422
- var boundingTop = bounding.top;
12423
- var boundingLeft = bounding.left;
12424
+ var boundingTop = bounding.top - bodyBounding.top;
12425
+ var boundingLeft = bounding.left - bodyBounding.left;
12424
12426
  var _getDomNode = getDomNode(),
12425
12427
  scrollTop = _getDomNode.scrollTop,
12426
12428
  scrollLeft = _getDomNode.scrollLeft,
@@ -12810,6 +12812,7 @@ function getSlotVNs(vns) {
12810
12812
 
12811
12813
 
12812
12814
 
12815
+
12813
12816
  var renderType = 'body';
12814
12817
 
12815
12818
  // 滚动、拖动过程中不需要触发
@@ -12895,7 +12898,8 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
12895
12898
  align = column.align,
12896
12899
  showOverflow = column.showOverflow,
12897
12900
  className = column.className,
12898
- treeNode = column.treeNode;
12901
+ treeNode = column.treeNode,
12902
+ slots = column.slots;
12899
12903
  var actived = editStore.actived;
12900
12904
  var scrollYRHeight = sYOpts.rHeight;
12901
12905
  var rowHeight = rowOpts.height;
@@ -13073,12 +13077,15 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
13073
13077
  }
13074
13078
  }, column.renderCell(h, params))]));
13075
13079
  if (showValidTip && errorValidItem) {
13080
+ var errRule = errorValidItem.rule;
13081
+ var validSlot = slots ? slots.valid : null;
13082
+ var validParams = _objectSpread2(_objectSpread2({}, params), errorValidItem);
13076
13083
  tdVNs.push(h('div', {
13077
- class: 'vxe-cell--valid-error-hint',
13078
- style: errorValidItem.rule && errorValidItem.rule.maxWidth ? {
13079
- width: "".concat(errorValidItem.rule.maxWidth, "px")
13084
+ class: ['vxe-cell--valid-error-hint', utils.getClass(validOpts.className, errorValidItem)],
13085
+ style: errRule && errRule.maxWidth ? {
13086
+ width: "".concat(errRule.maxWidth, "px")
13080
13087
  } : null
13081
- }, [h('span', {
13088
+ }, validSlot ? $xetable.callSlot(validSlot, validParams, h) : [h('span', {
13082
13089
  class: 'vxe-cell--valid-error-msg'
13083
13090
  }, errorValidItem.content)]));
13084
13091
  }
@@ -15964,6 +15971,7 @@ var Methods = {
15964
15971
  }
15965
15972
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(rows, function (childRow, index, items, path, parent, nodes) {
15966
15973
  var rowid = getRowid(_this12, childRow);
15974
+ var parentRow = parent || row;
15967
15975
  var rest = {
15968
15976
  row: childRow,
15969
15977
  rowid: rowid,
@@ -15972,7 +15980,7 @@ var Methods = {
15972
15980
  _index: -1,
15973
15981
  $index: -1,
15974
15982
  items: items,
15975
- parent: parent,
15983
+ parent: parentRow,
15976
15984
  level: parentLevel + nodes.length
15977
15985
  };
15978
15986
  fullDataRowIdData[rowid] = rest;
@@ -16806,7 +16814,8 @@ var Methods = {
16806
16814
  rowid = getRowid(this, rowOrRowid);
16807
16815
  }
16808
16816
  if (rowid) {
16809
- return fullDataRowIdData[rowid] ? fullDataRowIdData[rowid].parent : null;
16817
+ var rest = fullDataRowIdData[rowid];
16818
+ return rest ? rest.parent : null;
16810
16819
  }
16811
16820
  }
16812
16821
  return null;
@@ -23739,7 +23748,7 @@ function insertTreeRow(_vm, newRecords, isAppend) {
23739
23748
  _index: -1,
23740
23749
  $index: -1,
23741
23750
  items: parentChilds,
23742
- parent: parent,
23751
+ parent: parentRow,
23743
23752
  level: parentLevel + 1
23744
23753
  };
23745
23754
  fullDataRowIdData[rowid] = rest;
@@ -23785,7 +23794,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
23785
23794
  var _ref;
23786
23795
  return Object.assign(treeConfig && transform ? (_ref = {}, _defineProperty(_ref, mapChildrenField, []), _defineProperty(_ref, childrenField, []), _ref) : {}, record);
23787
23796
  }));
23788
- if (!row) {
23797
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(row)) {
23789
23798
  // 如果为虚拟树
23790
23799
  if (treeConfig && transform) {
23791
23800
  insertTreeRow(_vm, newRecords, false);