vxe-table 3.19.32 → 3.19.33

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.
@@ -359,6 +359,7 @@ export const Cell = {
359
359
  const renderOpts = editConfig && isEnableConf(editRender) ? editRender : (isEnableConf(cellRender) ? cellRender : null);
360
360
  const defaultSlot = slots ? slots.default : null;
361
361
  const gcSlot = slots ? (slots.groupContent || slots['group-content']) : null;
362
+ const gvSlot = slots ? (slots.groupValues || slots['group-values']) : null;
362
363
  let cellValue = '';
363
364
  if (isRowGroupStatus && field && row.isAggregate) {
364
365
  const aggRow = row;
@@ -392,9 +393,6 @@ export const Cell = {
392
393
  */
393
394
  totalValue: childCount
394
395
  };
395
- if (gcSlot) {
396
- return renderCellBaseVNs(h, params, $table.callSlot(gcSlot, Object.assign({ groupField, groupContent, childList, childCount }, params), h));
397
- }
398
396
  if (mode === 'column' ? field === aggRow.groupField : rowGroupNode) {
399
397
  cellValue = groupContent;
400
398
  if (contentMethod) {
@@ -403,9 +401,16 @@ export const Cell = {
403
401
  if (showTotal) {
404
402
  cellValue = getI18n('vxe.table.rowGroupContentTotal', [cellValue, totalMethod ? totalMethod(ctParams) : childCount, childCount]);
405
403
  }
404
+ if (gcSlot) {
405
+ return renderCellBaseVNs(h, params, $table.callSlot(gcSlot, Object.assign({ groupField, groupContent, childList, childCount }, params), h));
406
+ }
406
407
  }
407
408
  else if ($table.getPivotTableAggregateCellAggValue) {
408
409
  cellValue = $table.getPivotTableAggregateCellAggValue(params);
410
+ ctParams.aggValue = cellValue;
411
+ if (gvSlot) {
412
+ return renderCellBaseVNs(h, params, $table.callSlot(gvSlot, Object.assign({ groupField, groupContent, childList, childCount }, params, ctParams), h));
413
+ }
409
414
  }
410
415
  else if (aggFunc === true || (countFields && countFields.includes(field))) {
411
416
  cellValue = currAggData ? currAggData.value : childCount;
@@ -413,6 +418,9 @@ export const Cell = {
413
418
  if (formatValuesMethod) {
414
419
  cellValue = formatValuesMethod(ctParams);
415
420
  }
421
+ if (gvSlot) {
422
+ return renderCellBaseVNs(h, params, $table.callSlot(gvSlot, Object.assign({ groupField, groupContent, childList, childCount }, params, ctParams), h));
423
+ }
416
424
  }
417
425
  }
418
426
  else {
@@ -307,7 +307,7 @@ function renderFilterRows(h, _vm, isOptimizeMode, cols) {
307
307
  ]);
308
308
  });
309
309
  }
310
- function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups) {
310
+ function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups, renderColumnList) {
311
311
  const props = _vm;
312
312
  const $xeTable = _vm.$parent;
313
313
  const tableProps = $xeTable;
@@ -331,7 +331,7 @@ function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups) {
331
331
  class: [
332
332
  'vxe-header--row'
333
333
  ]
334
- }, renderFilterRows(h, _vm, isOptimizeMode, headerGroups[headerGroups.length - 1])));
334
+ }, renderFilterRows(h, _vm, isOptimizeMode, renderColumnList)));
335
335
  }
336
336
  return rowVNs;
337
337
  }
@@ -508,7 +508,7 @@ export default {
508
508
  */
509
509
  h('thead', {
510
510
  ref: 'refHeaderTHead'
511
- }, renderHeads(h, _vm, isGroup, isOptimizeMode, renderHeaderList))
511
+ }, renderHeads(h, _vm, isGroup, isOptimizeMode, renderHeaderList, renderColumnList))
512
512
  ]),
513
513
  mouseConfig && mouseOpts.area
514
514
  ? h('div', {
@@ -4415,7 +4415,6 @@ const tableMethods = {
4415
4415
  const reactData = $xeTable;
4416
4416
  const internalData = $xeTable;
4417
4417
  const { data } = props;
4418
- $xeTable.dispatchEvent('ready', {}, null);
4419
4418
  loadTableData($xeTable, data || [], true, true).then(() => {
4420
4419
  if (data && data.length) {
4421
4420
  internalData.inited = true;
@@ -4429,6 +4428,9 @@ const tableMethods = {
4429
4428
  updateRowOffsetTop($xeTable);
4430
4429
  }
4431
4430
  });
4431
+ $xeTable.$nextTick().then(() => {
4432
+ $xeTable.dispatchEvent('ready', {}, null);
4433
+ });
4432
4434
  },
4433
4435
  /**
4434
4436
  * 加载表格数据
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.19.32";
3
+ export const version = "3.19.33";
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.19.32"}`;
3
+ const version = `table v${"3.19.33"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
package/lib/index.umd.js CHANGED
@@ -2005,7 +2005,7 @@ function getClass(property, params) {
2005
2005
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2006
2006
 
2007
2007
 
2008
- const version = "3.19.32";
2008
+ const version = "3.19.33";
2009
2009
  core_.VxeUI.version = version;
2010
2010
  core_.VxeUI.tableVersion = version;
2011
2011
  core_.VxeUI.setConfig({
@@ -2715,7 +2715,7 @@ function isNodeElement(elem) {
2715
2715
  const {
2716
2716
  log: log_log
2717
2717
  } = core_.VxeUI;
2718
- const log_version = `table v${"3.19.32"}`;
2718
+ const log_version = `table v${"3.19.33"}`;
2719
2719
  const warnLog = log_log.create('warn', log_version);
2720
2720
  const errLog = log_log.create('error', log_version);
2721
2721
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -4184,6 +4184,7 @@ const Cell = {
4184
4184
  const renderOpts = editConfig && isEnableConf(editRender) ? editRender : isEnableConf(cellRender) ? cellRender : null;
4185
4185
  const defaultSlot = slots ? slots.default : null;
4186
4186
  const gcSlot = slots ? slots.groupContent || slots['group-content'] : null;
4187
+ const gvSlot = slots ? slots.groupValues || slots['group-values'] : null;
4187
4188
  let cellValue = '';
4188
4189
  if (isRowGroupStatus && field && row.isAggregate) {
4189
4190
  const aggRow = row;
@@ -4227,14 +4228,6 @@ const Cell = {
4227
4228
  */
4228
4229
  totalValue: childCount
4229
4230
  };
4230
- if (gcSlot) {
4231
- return renderCellBaseVNs(h, params, $table.callSlot(gcSlot, Object.assign({
4232
- groupField,
4233
- groupContent,
4234
- childList,
4235
- childCount
4236
- }, params), h));
4237
- }
4238
4231
  if (mode === 'column' ? field === aggRow.groupField : rowGroupNode) {
4239
4232
  cellValue = groupContent;
4240
4233
  if (contentMethod) {
@@ -4243,14 +4236,39 @@ const Cell = {
4243
4236
  if (showTotal) {
4244
4237
  cellValue = cell_getI18n('vxe.table.rowGroupContentTotal', [cellValue, totalMethod ? totalMethod(ctParams) : childCount, childCount]);
4245
4238
  }
4239
+ if (gcSlot) {
4240
+ return renderCellBaseVNs(h, params, $table.callSlot(gcSlot, Object.assign({
4241
+ groupField,
4242
+ groupContent,
4243
+ childList,
4244
+ childCount
4245
+ }, params), h));
4246
+ }
4246
4247
  } else if ($table.getPivotTableAggregateCellAggValue) {
4247
4248
  cellValue = $table.getPivotTableAggregateCellAggValue(params);
4249
+ ctParams.aggValue = cellValue;
4250
+ if (gvSlot) {
4251
+ return renderCellBaseVNs(h, params, $table.callSlot(gvSlot, Object.assign({
4252
+ groupField,
4253
+ groupContent,
4254
+ childList,
4255
+ childCount
4256
+ }, params, ctParams), h));
4257
+ }
4248
4258
  } else if (aggFunc === true || countFields && countFields.includes(field)) {
4249
4259
  cellValue = currAggData ? currAggData.value : childCount;
4250
4260
  ctParams.aggValue = cellValue;
4251
4261
  if (formatValuesMethod) {
4252
4262
  cellValue = formatValuesMethod(ctParams);
4253
4263
  }
4264
+ if (gvSlot) {
4265
+ return renderCellBaseVNs(h, params, $table.callSlot(gvSlot, Object.assign({
4266
+ groupField,
4267
+ groupContent,
4268
+ childList,
4269
+ childCount
4270
+ }, params, ctParams), h));
4271
+ }
4254
4272
  }
4255
4273
  } else {
4256
4274
  if (defaultSlot) {
@@ -6142,7 +6160,7 @@ if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_defau
6142
6160
  setTimeout(()=>handleLazyRecalculate($xeTable,false,true,true),50);});},handleTableData(force){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{scrollYLoad}=reactData;const{scrollYStore,fullDataRowIdData}=internalData;const $xeGanttView=internalData.xeGanttView;let fullList=internalData.afterFullData;// 是否进行数据处理
6143
6161
  if(force){// 更新数据,处理筛选和排序
6144
6162
  updateAfterFullData($xeTable);// 如果为虚拟树,将树结构拍平
6145
- fullList=handleVirtualTreeToList($xeTable);}const tableData=scrollYLoad?fullList.slice(scrollYStore.startIndex,scrollYStore.endIndex):fullList.slice(0);const visibleDataRowIdMaps={};tableData.forEach((row,$index)=>{const rowid=getRowid($xeTable,row);const rest=fullDataRowIdData[rowid];if(rest){rest.$index=$index;}visibleDataRowIdMaps[rowid]=row;});reactData.tableData=tableData;internalData.visibleDataRowIdData=visibleDataRowIdMaps;if($xeGanttView&&$xeGanttView.updateViewData){$xeGanttView.updateViewData();}return $xeTable.$nextTick();},initData(){const $xeTable=this;const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{data}=props;$xeTable.dispatchEvent('ready',{},null);loadTableData($xeTable,data||[],true,true).then(()=>{if(data&&data.length){internalData.inited=true;internalData.initStatus=true;handleLoadDefaults($xeTable);}handleInitDefaults($xeTable);updateStyle($xeTable);if(!reactData.isAllOverflow){calcCellHeight($xeTable);updateRowOffsetTop($xeTable);}});},/**
6163
+ fullList=handleVirtualTreeToList($xeTable);}const tableData=scrollYLoad?fullList.slice(scrollYStore.startIndex,scrollYStore.endIndex):fullList.slice(0);const visibleDataRowIdMaps={};tableData.forEach((row,$index)=>{const rowid=getRowid($xeTable,row);const rest=fullDataRowIdData[rowid];if(rest){rest.$index=$index;}visibleDataRowIdMaps[rowid]=row;});reactData.tableData=tableData;internalData.visibleDataRowIdData=visibleDataRowIdMaps;if($xeGanttView&&$xeGanttView.updateViewData){$xeGanttView.updateViewData();}return $xeTable.$nextTick();},initData(){const $xeTable=this;const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{data}=props;loadTableData($xeTable,data||[],true,true).then(()=>{if(data&&data.length){internalData.inited=true;internalData.initStatus=true;handleLoadDefaults($xeTable);}handleInitDefaults($xeTable);updateStyle($xeTable);if(!reactData.isAllOverflow){calcCellHeight($xeTable);updateRowOffsetTop($xeTable);}});$xeTable.$nextTick().then(()=>{$xeTable.dispatchEvent('ready',{},null);});},/**
6146
6164
  * 加载表格数据
6147
6165
  * @param {Array} datas 数据
6148
6166
  */loadTableData(datas,isReload,isReset){const $xeTable=this;return loadTableData($xeTable,datas,isReload,isReset);},/**
@@ -8086,7 +8104,7 @@ function renderFilterRows(h, _vm, isOptimizeMode, cols) {
8086
8104
  }, flSlot ? $xeTable.callSlot(flSlot, cellParams, h) : rtFloatingFilter && firstFilterOption ? getSlotVNs(rtFloatingFilter.call($xeTable, h, filterRender, cellParams)) : [])])]);
8087
8105
  });
8088
8106
  }
8089
- function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups) {
8107
+ function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups, renderColumnList) {
8090
8108
  const props = _vm;
8091
8109
  const $xeTable = _vm.$parent;
8092
8110
  const tableProps = $xeTable;
@@ -8115,7 +8133,7 @@ function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups) {
8115
8133
  rowVNs.push(h('tr', {
8116
8134
  key: 'ff',
8117
8135
  class: ['vxe-header--row']
8118
- }, renderFilterRows(h, _vm, isOptimizeMode, headerGroups[headerGroups.length - 1])));
8136
+ }, renderFilterRows(h, _vm, isOptimizeMode, renderColumnList)));
8119
8137
  }
8120
8138
  return rowVNs;
8121
8139
  }
@@ -8312,7 +8330,7 @@ function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups) {
8312
8330
  */
8313
8331
  h('thead', {
8314
8332
  ref: 'refHeaderTHead'
8315
- }, renderHeads(h, _vm, isGroup, isOptimizeMode, renderHeaderList))]), mouseConfig && mouseOpts.area ? h('div', {
8333
+ }, renderHeads(h, _vm, isGroup, isOptimizeMode, renderHeaderList, renderColumnList))]), mouseConfig && mouseOpts.area ? h('div', {
8316
8334
  class: 'vxe-table--cell-area',
8317
8335
  attrs: {
8318
8336
  xid: xID