vxe-table 3.15.56 → 3.15.57

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.
@@ -743,12 +743,40 @@ export default {
743
743
  computeVirtualXOpts() {
744
744
  const $xeTable = this;
745
745
  const props = $xeTable;
746
- return Object.assign({}, getConfig().table.virtualXConfig || getConfig().table.scrollX, props.virtualXConfig || props.scrollX);
746
+ const { virtualXConfig, scrollX } = props;
747
+ const globalVirtualXConfig = getConfig().table.virtualXConfig;
748
+ const globalScrollX = getConfig().table.scrollX;
749
+ if (virtualXConfig) {
750
+ return Object.assign({}, globalVirtualXConfig, virtualXConfig);
751
+ }
752
+ if (scrollX) {
753
+ // 已废弃,保留兼容
754
+ return Object.assign({}, globalScrollX, scrollX);
755
+ }
756
+ if (globalVirtualXConfig) {
757
+ return Object.assign({}, globalVirtualXConfig, virtualXConfig);
758
+ }
759
+ // 已废弃,保留兼容
760
+ return Object.assign({}, globalScrollX, scrollX);
747
761
  },
748
762
  computeVirtualYOpts() {
749
763
  const $xeTable = this;
750
764
  const props = $xeTable;
751
- return Object.assign({}, getConfig().table.virtualYConfig || getConfig().table.scrollY, props.virtualYConfig || props.scrollY);
765
+ const { virtualYConfig, scrollY } = props;
766
+ const globalVirtualYConfig = getConfig().table.virtualYConfig;
767
+ const globalScrollY = getConfig().table.scrollY;
768
+ if (virtualYConfig) {
769
+ return Object.assign({}, globalVirtualYConfig, virtualYConfig);
770
+ }
771
+ if (scrollY) {
772
+ // 已废弃,保留兼容
773
+ return Object.assign({}, globalScrollY, scrollY);
774
+ }
775
+ if (globalVirtualYConfig) {
776
+ return Object.assign({}, globalVirtualYConfig, virtualYConfig);
777
+ }
778
+ // 已废弃,保留兼容
779
+ return Object.assign({}, globalScrollY, scrollY);
752
780
  },
753
781
  computeScrollbarOpts() {
754
782
  const $xeTable = this;
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.15.56";
3
+ export const version = "3.15.57";
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.15.56"}`;
3
+ const version = `table v${"3.15.57"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
package/lib/index.umd.js CHANGED
@@ -3234,7 +3234,7 @@ function getClass(property, params) {
3234
3234
  ;// ./packages/ui/index.ts
3235
3235
 
3236
3236
 
3237
- const version = "3.15.56";
3237
+ const version = "3.15.57";
3238
3238
  core_.VxeUI.version = version;
3239
3239
  core_.VxeUI.tableVersion = version;
3240
3240
  core_.VxeUI.setConfig({
@@ -3907,7 +3907,7 @@ var es_iterator_map = __webpack_require__(1701);
3907
3907
  const {
3908
3908
  log: log_log
3909
3909
  } = core_.VxeUI;
3910
- const log_version = `table v${"3.15.56"}`;
3910
+ const log_version = `table v${"3.15.57"}`;
3911
3911
  const warnLog = log_log.create('warn', log_version);
3912
3912
  const errLog = log_log.create('error', log_version);
3913
3913
  ;// ./packages/table/src/columnInfo.ts
@@ -6806,10 +6806,10 @@ function cacheColumnMap($xeTable) {
6806
6806
  }
6807
6807
  if (htmlColumn) {
6808
6808
  if (!columnOpts.useKey) {
6809
- errLog('vxe.error.reqProp', ['column-config.useKey & column.type=html']);
6809
+ errLog('vxe.error.notSupportProp', ['column.type=html', 'column-config.useKey=false', 'column-config.useKey=true']);
6810
6810
  }
6811
6811
  if (!rowOpts.useKey) {
6812
- errLog('vxe.error.reqProp', ['row-config.useKey & column.type=html']);
6812
+ errLog('vxe.error.notSupportProp', ['column.type=html', 'row-config.useKey=false', 'row-config.useKey=true']);
6813
6813
  }
6814
6814
  }
6815
6815
  reactData.isGroup = isGroup;
@@ -29753,12 +29753,46 @@ function renderBody(h, $xeTable) {
29753
29753
  computeVirtualXOpts() {
29754
29754
  const $xeTable = this;
29755
29755
  const props = $xeTable;
29756
- return Object.assign({}, table_getConfig().table.virtualXConfig || table_getConfig().table.scrollX, props.virtualXConfig || props.scrollX);
29756
+ const {
29757
+ virtualXConfig,
29758
+ scrollX
29759
+ } = props;
29760
+ const globalVirtualXConfig = table_getConfig().table.virtualXConfig;
29761
+ const globalScrollX = table_getConfig().table.scrollX;
29762
+ if (virtualXConfig) {
29763
+ return Object.assign({}, globalVirtualXConfig, virtualXConfig);
29764
+ }
29765
+ if (scrollX) {
29766
+ // 已废弃,保留兼容
29767
+ return Object.assign({}, globalScrollX, scrollX);
29768
+ }
29769
+ if (globalVirtualXConfig) {
29770
+ return Object.assign({}, globalVirtualXConfig, virtualXConfig);
29771
+ }
29772
+ // 已废弃,保留兼容
29773
+ return Object.assign({}, globalScrollX, scrollX);
29757
29774
  },
29758
29775
  computeVirtualYOpts() {
29759
29776
  const $xeTable = this;
29760
29777
  const props = $xeTable;
29761
- return Object.assign({}, table_getConfig().table.virtualYConfig || table_getConfig().table.scrollY, props.virtualYConfig || props.scrollY);
29778
+ const {
29779
+ virtualYConfig,
29780
+ scrollY
29781
+ } = props;
29782
+ const globalVirtualYConfig = table_getConfig().table.virtualYConfig;
29783
+ const globalScrollY = table_getConfig().table.scrollY;
29784
+ if (virtualYConfig) {
29785
+ return Object.assign({}, globalVirtualYConfig, virtualYConfig);
29786
+ }
29787
+ if (scrollY) {
29788
+ // 已废弃,保留兼容
29789
+ return Object.assign({}, globalScrollY, scrollY);
29790
+ }
29791
+ if (globalVirtualYConfig) {
29792
+ return Object.assign({}, globalVirtualYConfig, virtualYConfig);
29793
+ }
29794
+ // 已废弃,保留兼容
29795
+ return Object.assign({}, globalScrollY, scrollY);
29762
29796
  },
29763
29797
  computeScrollbarOpts() {
29764
29798
  const $xeTable = this;