vxe-table 4.13.30 → 4.13.31

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.
@@ -11,7 +11,7 @@ let htmlCellElem;
11
11
  const csvBOM = '\ufeff';
12
12
  const enterSymbol = '\r\n';
13
13
  function defaultFilterExportColumn(column) {
14
- return !!column.field || ['seq', 'checkbox', 'radio'].indexOf(column.type || '') > -1;
14
+ return !!column.field || ['seq', 'checkbox', 'radio'].indexOf(column.type || '') === -1;
15
15
  }
16
16
  const getConvertColumns = (columns) => {
17
17
  const result = [];
@@ -1118,9 +1118,14 @@ hooks.add('tableExportModule', {
1118
1118
  if (!mode) {
1119
1119
  mode = selectRecords.length ? 'selected' : 'current';
1120
1120
  }
1121
- const customCols = columns && columns.length
1122
- ? columns
1123
- : XEUtils.searchTree(collectColumn, column => {
1121
+ let isCustomCol = false;
1122
+ let customCols = [];
1123
+ if (columns && columns.length) {
1124
+ isCustomCol = true;
1125
+ customCols = columns;
1126
+ }
1127
+ else {
1128
+ customCols = XEUtils.searchTree(collectColumn, column => {
1124
1129
  const isColGroup = column.children && column.children.length > 0;
1125
1130
  let isChecked = false;
1126
1131
  if (columns && columns.length) {
@@ -1134,9 +1139,10 @@ hooks.add('tableExportModule', {
1134
1139
  }
1135
1140
  return isChecked;
1136
1141
  }, { children: 'children', mapChildren: 'childNodes', original: true });
1142
+ }
1137
1143
  const handleOptions = Object.assign({}, opts, { filename: '', sheetName: '' });
1138
1144
  // 如果设置源数据,则默认导出设置了字段的列
1139
- if (!customCols && !columnFilterMethod) {
1145
+ if (!isCustomCol && !columnFilterMethod) {
1140
1146
  columnFilterMethod = ({ column }) => {
1141
1147
  if (excludeFields) {
1142
1148
  if (XEUtils.includes(excludeFields, column.field)) {
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 = "4.13.30";
3
+ export const version = "4.13.31";
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${"4.13.30"}`;
3
+ const version = `table v${"4.13.31"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
package/lib/index.umd.js CHANGED
@@ -3138,7 +3138,7 @@ function eqEmptyValue(cellValue) {
3138
3138
  ;// ./packages/ui/index.ts
3139
3139
 
3140
3140
 
3141
- const version = "4.13.30";
3141
+ const version = "4.13.31";
3142
3142
  core_.VxeUI.version = version;
3143
3143
  core_.VxeUI.tableVersion = version;
3144
3144
  core_.VxeUI.setConfig({
@@ -3599,7 +3599,7 @@ var esnext_iterator_some = __webpack_require__(7550);
3599
3599
  const {
3600
3600
  log: log_log
3601
3601
  } = core_.VxeUI;
3602
- const log_version = `table v${"4.13.30"}`;
3602
+ const log_version = `table v${"4.13.31"}`;
3603
3603
  const warnLog = log_log.create('warn', log_version);
3604
3604
  const errLog = log_log.create('error', log_version);
3605
3605
  ;// ./packages/table/src/columnInfo.ts
@@ -15916,7 +15916,7 @@ let htmlCellElem;
15916
15916
  const csvBOM = '\ufeff';
15917
15917
  const enterSymbol = '\r\n';
15918
15918
  function defaultFilterExportColumn(column) {
15919
- return !!column.field || ['seq', 'checkbox', 'radio'].indexOf(column.type || '') > -1;
15919
+ return !!column.field || ['seq', 'checkbox', 'radio'].indexOf(column.type || '') === -1;
15920
15920
  }
15921
15921
  const getConvertColumns = columns => {
15922
15922
  const result = [];
@@ -17245,28 +17245,35 @@ export_hook_hooks.add('tableExportModule', {
17245
17245
  if (!mode) {
17246
17246
  mode = selectRecords.length ? 'selected' : 'current';
17247
17247
  }
17248
- const customCols = columns && columns.length ? columns : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(collectColumn, column => {
17249
- const isColGroup = column.children && column.children.length > 0;
17250
- let isChecked = false;
17251
- if (columns && columns.length) {
17252
- isChecked = handleFilterColumns(opts, column, columns);
17253
- } else if (excludeFields || includeFields) {
17254
- isChecked = handleFilterFields(opts, column, includeFields, excludeFields);
17255
- } else {
17256
- isChecked = column.visible && (isColGroup || defaultFilterExportColumn(column));
17257
- }
17258
- return isChecked;
17259
- }, {
17260
- children: 'children',
17261
- mapChildren: 'childNodes',
17262
- original: true
17263
- });
17248
+ let isCustomCol = false;
17249
+ let customCols = [];
17250
+ if (columns && columns.length) {
17251
+ isCustomCol = true;
17252
+ customCols = columns;
17253
+ } else {
17254
+ customCols = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(collectColumn, column => {
17255
+ const isColGroup = column.children && column.children.length > 0;
17256
+ let isChecked = false;
17257
+ if (columns && columns.length) {
17258
+ isChecked = handleFilterColumns(opts, column, columns);
17259
+ } else if (excludeFields || includeFields) {
17260
+ isChecked = handleFilterFields(opts, column, includeFields, excludeFields);
17261
+ } else {
17262
+ isChecked = column.visible && (isColGroup || defaultFilterExportColumn(column));
17263
+ }
17264
+ return isChecked;
17265
+ }, {
17266
+ children: 'children',
17267
+ mapChildren: 'childNodes',
17268
+ original: true
17269
+ });
17270
+ }
17264
17271
  const handleOptions = Object.assign({}, opts, {
17265
17272
  filename: '',
17266
17273
  sheetName: ''
17267
17274
  });
17268
17275
  // 如果设置源数据,则默认导出设置了字段的列
17269
- if (!customCols && !columnFilterMethod) {
17276
+ if (!isCustomCol && !columnFilterMethod) {
17270
17277
  columnFilterMethod = ({
17271
17278
  column
17272
17279
  }) => {