vxe-table 3.16.9 → 3.16.11

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.
@@ -298,10 +298,10 @@ function cacheColumnMap($xeTable) {
298
298
  }
299
299
  if (htmlColumn) {
300
300
  if (!columnOpts.useKey) {
301
- errLog('vxe.error.reqProp', ['column-config.useKey & column.type=html']);
301
+ errLog('vxe.error.notSupportProp', ['column.type=html', 'column-config.useKey=false', 'column-config.useKey=true']);
302
302
  }
303
303
  if (!rowOpts.useKey) {
304
- errLog('vxe.error.reqProp', ['row-config.useKey & column.type=html']);
304
+ errLog('vxe.error.notSupportProp', ['column.type=html', 'row-config.useKey=false', 'row-config.useKey=true']);
305
305
  }
306
306
  }
307
307
  reactData.isGroup = isGroup;
@@ -757,12 +757,40 @@ export default {
757
757
  computeVirtualXOpts() {
758
758
  const $xeTable = this;
759
759
  const props = $xeTable;
760
- return Object.assign({}, getConfig().table.virtualXConfig || getConfig().table.scrollX, props.virtualXConfig || props.scrollX);
760
+ const { virtualXConfig, scrollX } = props;
761
+ const globalVirtualXConfig = getConfig().table.virtualXConfig;
762
+ const globalScrollX = getConfig().table.scrollX;
763
+ if (virtualXConfig) {
764
+ return Object.assign({}, globalVirtualXConfig, virtualXConfig);
765
+ }
766
+ if (scrollX) {
767
+ // 已废弃,保留兼容
768
+ return Object.assign({}, globalScrollX, scrollX);
769
+ }
770
+ if (globalVirtualXConfig) {
771
+ return Object.assign({}, globalVirtualXConfig, virtualXConfig);
772
+ }
773
+ // 已废弃,保留兼容
774
+ return Object.assign({}, globalScrollX, scrollX);
761
775
  },
762
776
  computeVirtualYOpts() {
763
777
  const $xeTable = this;
764
778
  const props = $xeTable;
765
- return Object.assign({}, getConfig().table.virtualYConfig || getConfig().table.scrollY, props.virtualYConfig || props.scrollY);
779
+ const { virtualYConfig, scrollY } = props;
780
+ const globalVirtualYConfig = getConfig().table.virtualYConfig;
781
+ const globalScrollY = getConfig().table.scrollY;
782
+ if (virtualYConfig) {
783
+ return Object.assign({}, globalVirtualYConfig, virtualYConfig);
784
+ }
785
+ if (scrollY) {
786
+ // 已废弃,保留兼容
787
+ return Object.assign({}, globalScrollY, scrollY);
788
+ }
789
+ if (globalVirtualYConfig) {
790
+ return Object.assign({}, globalVirtualYConfig, virtualYConfig);
791
+ }
792
+ // 已废弃,保留兼容
793
+ return Object.assign({}, globalScrollY, scrollY);
766
794
  },
767
795
  computeScrollbarOpts() {
768
796
  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.16.9";
3
+ export const version = "3.16.11";
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.16.9"}`;
3
+ const version = `table v${"3.16.11"}`;
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.16.9";
3237
+ const version = "3.16.11";
3238
3238
  core_.VxeUI.version = version;
3239
3239
  core_.VxeUI.tableVersion = version;
3240
3240
  core_.VxeUI.setConfig({
@@ -3908,7 +3908,7 @@ var es_iterator_map = __webpack_require__(1701);
3908
3908
  const {
3909
3909
  log: log_log
3910
3910
  } = core_.VxeUI;
3911
- const log_version = `table v${"3.16.9"}`;
3911
+ const log_version = `table v${"3.16.11"}`;
3912
3912
  const warnLog = log_log.create('warn', log_version);
3913
3913
  const errLog = log_log.create('error', log_version);
3914
3914
  ;// ./packages/table/src/columnInfo.ts
@@ -6864,10 +6864,10 @@ function cacheColumnMap($xeTable) {
6864
6864
  }
6865
6865
  if (htmlColumn) {
6866
6866
  if (!columnOpts.useKey) {
6867
- errLog('vxe.error.reqProp', ['column-config.useKey & column.type=html']);
6867
+ errLog('vxe.error.notSupportProp', ['column.type=html', 'column-config.useKey=false', 'column-config.useKey=true']);
6868
6868
  }
6869
6869
  if (!rowOpts.useKey) {
6870
- errLog('vxe.error.reqProp', ['row-config.useKey & column.type=html']);
6870
+ errLog('vxe.error.notSupportProp', ['column.type=html', 'row-config.useKey=false', 'row-config.useKey=true']);
6871
6871
  }
6872
6872
  }
6873
6873
  reactData.isGroup = isGroup;
@@ -22080,7 +22080,7 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
22080
22080
  }
22081
22081
  }
22082
22082
  }
22083
- if (!targetFixed !== null) {
22083
+ if (targetFixed !== null) {
22084
22084
  $xeTable.dispatchEvent('custom-fixed-change', {
22085
22085
  column,
22086
22086
  fixed: targetFixed
@@ -29952,12 +29952,46 @@ function renderBody(h, $xeTable) {
29952
29952
  computeVirtualXOpts() {
29953
29953
  const $xeTable = this;
29954
29954
  const props = $xeTable;
29955
- return Object.assign({}, table_getConfig().table.virtualXConfig || table_getConfig().table.scrollX, props.virtualXConfig || props.scrollX);
29955
+ const {
29956
+ virtualXConfig,
29957
+ scrollX
29958
+ } = props;
29959
+ const globalVirtualXConfig = table_getConfig().table.virtualXConfig;
29960
+ const globalScrollX = table_getConfig().table.scrollX;
29961
+ if (virtualXConfig) {
29962
+ return Object.assign({}, globalVirtualXConfig, virtualXConfig);
29963
+ }
29964
+ if (scrollX) {
29965
+ // 已废弃,保留兼容
29966
+ return Object.assign({}, globalScrollX, scrollX);
29967
+ }
29968
+ if (globalVirtualXConfig) {
29969
+ return Object.assign({}, globalVirtualXConfig, virtualXConfig);
29970
+ }
29971
+ // 已废弃,保留兼容
29972
+ return Object.assign({}, globalScrollX, scrollX);
29956
29973
  },
29957
29974
  computeVirtualYOpts() {
29958
29975
  const $xeTable = this;
29959
29976
  const props = $xeTable;
29960
- return Object.assign({}, table_getConfig().table.virtualYConfig || table_getConfig().table.scrollY, props.virtualYConfig || props.scrollY);
29977
+ const {
29978
+ virtualYConfig,
29979
+ scrollY
29980
+ } = props;
29981
+ const globalVirtualYConfig = table_getConfig().table.virtualYConfig;
29982
+ const globalScrollY = table_getConfig().table.scrollY;
29983
+ if (virtualYConfig) {
29984
+ return Object.assign({}, globalVirtualYConfig, virtualYConfig);
29985
+ }
29986
+ if (scrollY) {
29987
+ // 已废弃,保留兼容
29988
+ return Object.assign({}, globalScrollY, scrollY);
29989
+ }
29990
+ if (globalVirtualYConfig) {
29991
+ return Object.assign({}, globalVirtualYConfig, virtualYConfig);
29992
+ }
29993
+ // 已废弃,保留兼容
29994
+ return Object.assign({}, globalScrollY, scrollY);
29961
29995
  },
29962
29996
  computeScrollbarOpts() {
29963
29997
  const $xeTable = this;