vxe-table 3.11.28 → 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.
Files changed (33) hide show
  1. package/es/style.css +1 -1
  2. package/es/table/module/custom/mixin.js +31 -19
  3. package/es/table/module/custom/panel.js +4 -4
  4. package/es/table/src/methods.js +8 -1
  5. package/es/table/src/table.js +37 -12
  6. package/es/ui/index.js +1 -1
  7. package/es/ui/src/log.js +1 -1
  8. package/lib/index.umd.js +86 -42
  9. package/lib/index.umd.min.js +1 -1
  10. package/lib/style.css +1 -1
  11. package/lib/table/module/custom/mixin.js +36 -23
  12. package/lib/table/module/custom/mixin.min.js +1 -1
  13. package/lib/table/module/custom/panel.js +4 -4
  14. package/lib/table/module/custom/panel.min.js +1 -1
  15. package/lib/table/src/methods.js +5 -1
  16. package/lib/table/src/methods.min.js +1 -1
  17. package/lib/table/src/table.js +39 -12
  18. package/lib/table/src/table.min.js +1 -1
  19. package/lib/ui/index.js +1 -1
  20. package/lib/ui/index.min.js +1 -1
  21. package/lib/ui/src/log.js +1 -1
  22. package/lib/ui/src/log.min.js +1 -1
  23. package/package.json +1 -1
  24. package/packages/table/module/custom/mixin.ts +35 -19
  25. package/packages/table/module/custom/panel.ts +4 -4
  26. package/packages/table/src/methods.ts +9 -1
  27. package/packages/table/src/table.ts +40 -12
  28. /package/es/{iconfont.1734056358523.ttf → iconfont.1734070646835.ttf} +0 -0
  29. /package/es/{iconfont.1734056358523.woff → iconfont.1734070646835.woff} +0 -0
  30. /package/es/{iconfont.1734056358523.woff2 → iconfont.1734070646835.woff2} +0 -0
  31. /package/lib/{iconfont.1734056358523.ttf → iconfont.1734070646835.ttf} +0 -0
  32. /package/lib/{iconfont.1734056358523.woff → iconfont.1734070646835.woff} +0 -0
  33. /package/lib/{iconfont.1734056358523.woff2 → iconfont.1734070646835.woff2} +0 -0
@@ -679,20 +679,34 @@ export default {
679
679
  const { tableColumn, visibleColumn } = this;
680
680
  return tableColumn.length || visibleColumn.length ? visibleColumn.filter((column) => column.width === 'auto' || column.minWidth === 'auto') : [];
681
681
  },
682
- fixedColumnSize() {
683
- const { collectColumn } = this;
682
+ computeFixedColumnSize() {
683
+ const $xeTable = this;
684
+ const reactData = $xeTable;
685
+ const internalData = $xeTable;
686
+ const { tableColumn } = reactData;
687
+ const { collectColumn } = internalData;
684
688
  let fixedSize = 0;
685
- collectColumn.forEach((column) => {
686
- if (column.renderFixed) {
687
- fixedSize++;
688
- }
689
- });
689
+ // 只判断第一层
690
+ if (tableColumn.length && collectColumn.length) {
691
+ collectColumn.forEach((column) => {
692
+ if (column.renderFixed) {
693
+ fixedSize++;
694
+ }
695
+ });
696
+ }
690
697
  return fixedSize;
691
698
  },
692
- isMaxFixedColumn() {
693
- const { maxFixedSize } = this.columnOpts;
699
+ fixedColumnSize() {
700
+ const $xeTable = this;
701
+ return $xeTable.computeFixedColumnSize;
702
+ },
703
+ computeIsMaxFixedColumn() {
704
+ const $xeTable = this;
705
+ const fixedColumnSize = $xeTable.computeFixedColumnSize;
706
+ const columnOpts = $xeTable.columnOpts;
707
+ const { maxFixedSize } = columnOpts;
694
708
  if (maxFixedSize) {
695
- return this.fixedColumnSize >= maxFixedSize;
709
+ return fixedColumnSize >= maxFixedSize;
696
710
  }
697
711
  return false;
698
712
  },
@@ -817,9 +831,20 @@ export default {
817
831
  tZindex: 0,
818
832
  elemStore: {},
819
833
  // 存放横向 X 虚拟滚动相关的信息
820
- scrollXStore: {},
834
+ scrollXStore: {
835
+ offsetSize: 0,
836
+ visibleSize: 0,
837
+ startIndex: 0,
838
+ endIndex: 0
839
+ },
821
840
  // 存放纵向 Y 虚拟滚动相关信息
822
- scrollYStore: {},
841
+ scrollYStore: {
842
+ rowHeight: 0,
843
+ offsetSize: 0,
844
+ visibleSize: 0,
845
+ startIndex: 0,
846
+ endIndex: 0
847
+ },
823
848
  // 表格宽度
824
849
  tableWidth: 0,
825
850
  // 表格高度
package/es/ui/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  import { getFuncText } from './src/utils';
3
- export const version = "3.11.28";
3
+ export const version = "3.11.30-beta.0";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
package/es/ui/src/log.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const version = `table v${"3.11.28"}`;
3
+ const version = `table v${"3.11.30-beta.0"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
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.28";
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.28"}`;
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;
@@ -5943,10 +5944,13 @@ const Methods = {
5943
5944
  return this.$nextTick().then(() => {
5944
5945
  if (this.$toolbar) {
5945
5946
  this.$toolbar.syncUpdate({
5946
- collectColumn,
5947
+ collectColumn: this.collectColumn,
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
  });
@@ -15658,7 +15662,7 @@ function panel_showDropTip(_vm, evnt, optEl, showLine, dragPos) {
15658
15662
  if (showLine) {
15659
15663
  const optRect = optEl.getBoundingClientRect();
15660
15664
  dragLineEl.style.display = 'block';
15661
- dragLineEl.style.top = `${Math.max(1, optRect.y - wrapperRect.y)}px`;
15665
+ dragLineEl.style.top = `${Math.max(1, optRect.y + el.scrollTop - wrapperRect.y)}px`;
15662
15666
  dragLineEl.style.height = `${optRect.height}px`;
15663
15667
  dragLineEl.style.width = `${optRect.width}px`;
15664
15668
  dragLineEl.setAttribute('drag-pos', dragPos);
@@ -15671,8 +15675,8 @@ function panel_showDropTip(_vm, evnt, optEl, showLine, dragPos) {
15671
15675
  const dragTipEl = _vm.$refs.refDragTipElem;
15672
15676
  if (dragTipEl) {
15673
15677
  dragTipEl.style.display = 'block';
15674
- dragTipEl.style.top = `${Math.min(el.clientHeight - el.scrollTop - dragTipEl.clientHeight, evnt.clientY - wrapperRect.y)}px`;
15675
- dragTipEl.style.left = `${Math.min(el.clientWidth - el.scrollLeft - dragTipEl.clientWidth - 16, evnt.clientX - wrapperRect.x)}px`;
15678
+ dragTipEl.style.top = `${Math.min(el.clientHeight + el.scrollTop - dragTipEl.clientHeight, evnt.clientY + el.scrollTop - wrapperRect.y)}px`;
15679
+ dragTipEl.style.left = `${Math.min(el.clientWidth + el.scrollLeft - dragTipEl.clientWidth, evnt.clientX + el.scrollLeft - wrapperRect.x)}px`;
15676
15680
  dragTipEl.setAttribute('drag-status', showLine ? prevDragToChild ? 'sub' : 'normal' : 'disabled');
15677
15681
  }
15678
15682
  }
@@ -15707,7 +15711,7 @@ const renderDragTip = (h, _vm) => {
15707
15711
  }), h('span', {
15708
15712
  class: ['vxe-table-custom-popup--drag-tip-disabled-status', panel_getIcon().TABLE_DRAG_DISABLED]
15709
15713
  })]), h('div', {
15710
- class: 'vxe-table--drag-tip-content'
15714
+ class: 'vxe-table-custom-popup--drag-tip-content'
15711
15715
  }, panel_getI18n('vxe.custom.cstmDragTarget', [dragCol && dragCol.type !== 'html' ? dragCol.getTitle() : '']))])])]);
15712
15716
  };
15713
15717
  const renderSimplePanel = (h, _vm) => {
@@ -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
  },
23582
- isMaxFixedColumn() {
23608
+ fixedColumnSize() {
23609
+ const $xeTable = this;
23610
+ return $xeTable.computeFixedColumnSize;
23611
+ },
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
  },
@@ -23740,9 +23773,20 @@ function handleUupdateResize(_vm) {
23740
23773
  tZindex: 0,
23741
23774
  elemStore: {},
23742
23775
  // 存放横向 X 虚拟滚动相关的信息
23743
- scrollXStore: {},
23776
+ scrollXStore: {
23777
+ offsetSize: 0,
23778
+ visibleSize: 0,
23779
+ startIndex: 0,
23780
+ endIndex: 0
23781
+ },
23744
23782
  // 存放纵向 Y 虚拟滚动相关信息
23745
- scrollYStore: {},
23783
+ scrollYStore: {
23784
+ rowHeight: 0,
23785
+ offsetSize: 0,
23786
+ visibleSize: 0,
23787
+ startIndex: 0,
23788
+ endIndex: 0
23789
+ },
23746
23790
  // 表格宽度
23747
23791
  tableWidth: 0,
23748
23792
  // 表格高度