vxe-table 3.18.0-beta.4 → 3.18.0-beta.5

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.
@@ -369,6 +369,8 @@ export const Cell = {
369
369
  const { isRowGroupStatus } = tableReactData;
370
370
  const { field, slots, editRender, cellRender, rowGroupNode, aggFunc } = column;
371
371
  const renderOpts = editRender || cellRender;
372
+ const defaultSlot = slots ? slots.default : null;
373
+ const gcSlot = slots ? (slots.groupContent || slots['group-content']) : null;
372
374
  let cellValue = '';
373
375
  if (isRowGroupStatus && field && row.isAggregate) {
374
376
  const aggRow = row;
@@ -396,6 +398,9 @@ export const Cell = {
396
398
  */
397
399
  totalValue: childCount
398
400
  };
401
+ if (gcSlot) {
402
+ return renderCellBaseVNs(h, params, $table.callSlot(gcSlot, Object.assign({ groupField, groupContent, childCount }, params), h));
403
+ }
399
404
  if (mode === 'column' ? field === aggRow.groupField : rowGroupNode) {
400
405
  cellValue = groupContent;
401
406
  if (contentMethod) {
@@ -416,8 +421,8 @@ export const Cell = {
416
421
  }
417
422
  }
418
423
  else {
419
- if (slots && slots.default) {
420
- return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h));
424
+ if (defaultSlot) {
425
+ return renderCellBaseVNs(h, params, $table.callSlot(defaultSlot, params, h));
421
426
  }
422
427
  if (renderOpts) {
423
428
  const compConf = renderer.get(renderOpts.name);
@@ -3032,6 +3032,7 @@ function loadTableData($xeTable, datas, isReset) {
3032
3032
  }).then(() => {
3033
3033
  computeScrollLoad($xeTable);
3034
3034
  }).then(() => {
3035
+ const virtualYOpts = $xeTable.computeVirtualYOpts;
3035
3036
  // 是否启用了虚拟滚动
3036
3037
  if (sYLoad) {
3037
3038
  scrollYStore.endIndex = scrollYStore.visibleSize;
@@ -3040,6 +3041,9 @@ function loadTableData($xeTable, datas, isReset) {
3040
3041
  if (reactData.expandColumn && expandOpts.mode !== 'fixed') {
3041
3042
  errLog('vxe.error.notConflictProp', ['column.type="expand', 'expand-config.mode="fixed"']);
3042
3043
  }
3044
+ if (virtualYOpts.mode === 'scroll' && expandOpts.mode === 'fixed') {
3045
+ warnLog('vxe.error.notConflictProp', ['virtual-y-config.mode=scroll', 'expand-config.mode=inside']);
3046
+ }
3043
3047
  // if (showOverflow) {
3044
3048
  // if (!rowOpts.height) {
3045
3049
  // const errColumn = internalData.tableFullColumn.find(column => column.showOverflow === false)
@@ -3756,7 +3760,7 @@ const Methods = {
3756
3760
  const $xeGGWrapper = $xeGrid || $xeGantt;
3757
3761
  if (slotFunc) {
3758
3762
  if ($xeGGWrapper) {
3759
- return $xeGGWrapper.callSlot(slotFunc, params, h, vNodes);
3763
+ return $xeGGWrapper.callSlot(slotFunc, params, h);
3760
3764
  }
3761
3765
  // if (XEUtils.isString(slotFunc)) {
3762
3766
  // slotFunc = slots[slotFunc] || null
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.18.0-beta.4";
3
+ export const version = "3.18.0-beta.5";
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.18.0-beta.4"}`;
3
+ const version = `table v${"3.18.0-beta.5"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
package/lib/index.umd.js CHANGED
@@ -2002,7 +2002,7 @@ function getClass(property, params) {
2002
2002
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2003
2003
 
2004
2004
 
2005
- const version = "3.18.0-beta.4";
2005
+ const version = "3.18.0-beta.5";
2006
2006
  core_.VxeUI.version = version;
2007
2007
  core_.VxeUI.tableVersion = version;
2008
2008
  core_.VxeUI.setConfig({
@@ -2678,7 +2678,7 @@ function isNodeElement(elem) {
2678
2678
  const {
2679
2679
  log: log_log
2680
2680
  } = core_.VxeUI;
2681
- const log_version = `table v${"3.18.0-beta.4"}`;
2681
+ const log_version = `table v${"3.18.0-beta.5"}`;
2682
2682
  const warnLog = log_log.create('warn', log_version);
2683
2683
  const errLog = log_log.create('error', log_version);
2684
2684
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -4105,6 +4105,8 @@ const Cell = {
4105
4105
  aggFunc
4106
4106
  } = column;
4107
4107
  const renderOpts = editRender || cellRender;
4108
+ const defaultSlot = slots ? slots.default : null;
4109
+ const gcSlot = slots ? slots.groupContent || slots['group-content'] : null;
4108
4110
  let cellValue = '';
4109
4111
  if (isRowGroupStatus && field && row.isAggregate) {
4110
4112
  const aggRow = row;
@@ -4141,6 +4143,13 @@ const Cell = {
4141
4143
  */
4142
4144
  totalValue: childCount
4143
4145
  };
4146
+ if (gcSlot) {
4147
+ return renderCellBaseVNs(h, params, $table.callSlot(gcSlot, Object.assign({
4148
+ groupField,
4149
+ groupContent,
4150
+ childCount
4151
+ }, params), h));
4152
+ }
4144
4153
  if (mode === 'column' ? field === aggRow.groupField : rowGroupNode) {
4145
4154
  cellValue = groupContent;
4146
4155
  if (contentMethod) {
@@ -4158,8 +4167,8 @@ const Cell = {
4158
4167
  }
4159
4168
  }
4160
4169
  } else {
4161
- if (slots && slots.default) {
4162
- return renderCellBaseVNs(h, params, $table.callSlot(slots.default, params, h));
4170
+ if (defaultSlot) {
4171
+ return renderCellBaseVNs(h, params, $table.callSlot(defaultSlot, params, h));
4163
4172
  }
4164
4173
  if (renderOpts) {
4165
4174
  const compConf = cell_renderer.get(renderOpts.name);
@@ -9310,6 +9319,7 @@ function loadTableData($xeTable, datas, isReset) {
9310
9319
  }).then(() => {
9311
9320
  computeScrollLoad($xeTable);
9312
9321
  }).then(() => {
9322
+ const virtualYOpts = $xeTable.computeVirtualYOpts;
9313
9323
  // 是否启用了虚拟滚动
9314
9324
  if (sYLoad) {
9315
9325
  scrollYStore.endIndex = scrollYStore.visibleSize;
@@ -9318,6 +9328,9 @@ function loadTableData($xeTable, datas, isReset) {
9318
9328
  if (reactData.expandColumn && expandOpts.mode !== 'fixed') {
9319
9329
  errLog('vxe.error.notConflictProp', ['column.type="expand', 'expand-config.mode="fixed"']);
9320
9330
  }
9331
+ if (virtualYOpts.mode === 'scroll' && expandOpts.mode === 'fixed') {
9332
+ warnLog('vxe.error.notConflictProp', ['virtual-y-config.mode=scroll', 'expand-config.mode=inside']);
9333
+ }
9321
9334
  // if (showOverflow) {
9322
9335
  // if (!rowOpts.height) {
9323
9336
  // const errColumn = internalData.tableFullColumn.find(column => column.showOverflow === false)
@@ -10141,7 +10154,7 @@ const Methods = {
10141
10154
  const $xeGGWrapper = $xeGrid || $xeGantt;
10142
10155
  if (slotFunc) {
10143
10156
  if ($xeGGWrapper) {
10144
- return $xeGGWrapper.callSlot(slotFunc, params, h, vNodes);
10157
+ return $xeGGWrapper.callSlot(slotFunc, params, h);
10145
10158
  }
10146
10159
  // if (XEUtils.isString(slotFunc)) {
10147
10160
  // slotFunc = slots[slotFunc] || null