vxe-table 3.11.29 → 3.11.30-beta.0

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
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
2220
2220
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2221
2221
 
2222
2222
 
2223
- const version = "3.11.29";
2223
+ const version = "3.11.30-beta.0";
2224
2224
  core_.VxeUI.version = version;
2225
2225
  core_.VxeUI.tableVersion = version;
2226
2226
  core_.VxeUI.setConfig({
@@ -2790,7 +2790,7 @@ function isNodeElement(elem) {
2790
2790
  const {
2791
2791
  log: log_log
2792
2792
  } = core_.VxeUI;
2793
- const log_version = `table v${"3.11.29"}`;
2793
+ const log_version = `table v${"3.11.30-beta.0"}`;
2794
2794
  const warnLog = log_log.create('warn', log_version);
2795
2795
  const errLog = log_log.create('error', log_version);
2796
2796
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -5918,6 +5918,7 @@ const Methods = {
5918
5918
  });
5919
5919
  },
5920
5920
  handleColumn(collectColumn) {
5921
+ const $xeTable = this;
5921
5922
  this.collectColumn = collectColumn;
5922
5923
  const tableFullColumn = getColumnList(collectColumn);
5923
5924
  this.tableFullColumn = tableFullColumn;
@@ -5947,6 +5948,9 @@ const Methods = {
5947
5948
  $table: this
5948
5949
  });
5949
5950
  }
5951
+ if ($xeTable.handleUpdateCustomColumn) {
5952
+ $xeTable.handleUpdateCustomColumn();
5953
+ }
5950
5954
  return this.recalculate();
5951
5955
  });
5952
5956
  });
@@ -22555,33 +22559,17 @@ function validErrorRuleValue(rule, val) {
22555
22559
  /* harmony default export */ var custom_mixin = ({
22556
22560
  methods: {
22557
22561
  _openCustom() {
22562
+ const $xeTable = this;
22563
+ const reactData = $xeTable;
22558
22564
  const {
22559
22565
  initStore,
22560
- customStore,
22561
- collectColumn
22562
- } = this;
22563
- const sortMaps = {};
22564
- const fixedMaps = {};
22565
- const visibleMaps = {};
22566
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, column => {
22567
- const colid = column.getKey();
22568
- column.renderFixed = column.fixed;
22569
- column.renderVisible = column.visible;
22570
- column.renderResizeWidth = column.renderWidth;
22571
- sortMaps[colid] = column.renderSortNumber;
22572
- fixedMaps[colid] = column.fixed;
22573
- visibleMaps[colid] = column.visible;
22574
- }, {
22575
- children: 'children'
22576
- });
22577
- customStore.oldSortMaps = sortMaps;
22578
- customStore.oldFixedMaps = fixedMaps;
22579
- customStore.oldVisibleMaps = visibleMaps;
22580
- this.customColumnList = collectColumn.slice(0);
22566
+ customStore
22567
+ } = reactData;
22581
22568
  customStore.visible = true;
22582
22569
  initStore.custom = true;
22583
- this.checkCustomStatus();
22584
- this.calcMaxHeight();
22570
+ $xeTable.handleUpdateCustomColumn();
22571
+ $xeTable.checkCustomStatus();
22572
+ $xeTable.calcMaxHeight();
22585
22573
  return this.$nextTick().then(() => this.calcMaxHeight());
22586
22574
  },
22587
22575
  _closeCustom() {
@@ -22852,6 +22840,35 @@ function validErrorRuleValue(rule, val) {
22852
22840
  this.closeCustom();
22853
22841
  this.emitCustomEvent('close', evnt);
22854
22842
  }
22843
+ },
22844
+ handleUpdateCustomColumn() {
22845
+ const $xeTable = this;
22846
+ const reactData = $xeTable;
22847
+ const internalData = $xeTable;
22848
+ const {
22849
+ customStore
22850
+ } = reactData;
22851
+ const {
22852
+ collectColumn
22853
+ } = internalData;
22854
+ if (customStore.visible) {
22855
+ const sortMaps = {};
22856
+ const fixedMaps = {};
22857
+ const visibleMaps = {};
22858
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, column => {
22859
+ const colid = column.getKey();
22860
+ column.renderFixed = column.fixed;
22861
+ column.renderVisible = column.visible;
22862
+ column.renderResizeWidth = column.renderWidth;
22863
+ sortMaps[colid] = column.renderSortNumber;
22864
+ fixedMaps[colid] = column.fixed;
22865
+ visibleMaps[colid] = column.visible;
22866
+ });
22867
+ customStore.oldSortMaps = sortMaps;
22868
+ customStore.oldFixedMaps = fixedMaps;
22869
+ customStore.oldVisibleMaps = visibleMaps;
22870
+ reactData.customColumnList = collectColumn.slice(0);
22871
+ }
22855
22872
  }
22856
22873
  }
22857
22874
  });
@@ -23567,24 +23584,40 @@ function handleUupdateResize(_vm) {
23567
23584
  } = this;
23568
23585
  return tableColumn.length || visibleColumn.length ? visibleColumn.filter(column => column.width === 'auto' || column.minWidth === 'auto') : [];
23569
23586
  },
23570
- fixedColumnSize() {
23587
+ computeFixedColumnSize() {
23588
+ const $xeTable = this;
23589
+ const reactData = $xeTable;
23590
+ const internalData = $xeTable;
23591
+ const {
23592
+ tableColumn
23593
+ } = reactData;
23571
23594
  const {
23572
23595
  collectColumn
23573
- } = this;
23596
+ } = internalData;
23574
23597
  let fixedSize = 0;
23575
- collectColumn.forEach(column => {
23576
- if (column.renderFixed) {
23577
- fixedSize++;
23578
- }
23579
- });
23598
+ // 只判断第一层
23599
+ if (tableColumn.length && collectColumn.length) {
23600
+ collectColumn.forEach(column => {
23601
+ if (column.renderFixed) {
23602
+ fixedSize++;
23603
+ }
23604
+ });
23605
+ }
23580
23606
  return fixedSize;
23581
23607
  },
23608
+ fixedColumnSize() {
23609
+ const $xeTable = this;
23610
+ return $xeTable.computeFixedColumnSize;
23611
+ },
23582
23612
  computeIsMaxFixedColumn() {
23613
+ const $xeTable = this;
23614
+ const fixedColumnSize = $xeTable.computeFixedColumnSize;
23615
+ const columnOpts = $xeTable.columnOpts;
23583
23616
  const {
23584
23617
  maxFixedSize
23585
- } = this.columnOpts;
23618
+ } = columnOpts;
23586
23619
  if (maxFixedSize) {
23587
- return this.fixedColumnSize >= maxFixedSize;
23620
+ return fixedColumnSize >= maxFixedSize;
23588
23621
  }
23589
23622
  return false;
23590
23623
  },