vxe-table 4.16.19 → 4.16.20

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.
@@ -290,7 +290,7 @@ function renderCellHandle(params) {
290
290
  case 'html':
291
291
  return isDeepCell ? Cell.renderDeepHTMLCell(params) : Cell.renderHTMLCell(params);
292
292
  }
293
- if (isEnableConf(editConfig) && editRender) {
293
+ if (editConfig && isEnableConf(editOpts) && editRender) {
294
294
  return editOpts.mode === 'cell' ? (isDeepCell ? Cell.renderDeepCellEdit(params) : Cell.renderCellEdit(params)) : (isDeepCell ? Cell.renderDeepRowEdit(params) : Cell.renderRowEdit(params));
295
295
  }
296
296
  return isDeepCell ? Cell.renderDeepCell(params) : Cell.renderDefaultCell(params);
@@ -298,7 +298,9 @@ function renderCellHandle(params) {
298
298
  function renderHeaderHandle(params) {
299
299
  const { column, $table } = params;
300
300
  const tableProps = $table.props;
301
+ const { computeEditOpts } = $table.getComputeMaps();
301
302
  const { editConfig } = tableProps;
303
+ const editOpts = computeEditOpts.value;
302
304
  const { type, filters, sortable, editRender } = column;
303
305
  switch (type) {
304
306
  case 'seq':
@@ -319,7 +321,7 @@ function renderHeaderHandle(params) {
319
321
  }
320
322
  break;
321
323
  }
322
- if (editConfig && editRender) {
324
+ if (editConfig && isEnableConf(editOpts) && editRender) {
323
325
  return Cell.renderEditHeader(params);
324
326
  }
325
327
  else if (filters && sortable) {
@@ -376,11 +378,15 @@ export const Cell = {
376
378
  },
377
379
  renderDefaultCell(params) {
378
380
  const { $table, row, column } = params;
381
+ const tableProps = $table.props;
379
382
  const tableReactData = $table.reactData;
380
383
  const tableInternalData = $table.internalData;
381
384
  const { isRowGroupStatus } = tableReactData;
385
+ const { computeEditOpts } = $table.getComputeMaps();
386
+ const { editConfig } = tableProps;
387
+ const editOpts = computeEditOpts.value;
382
388
  const { field, slots, editRender, cellRender, rowGroupNode, aggFunc } = column;
383
- const renderOpts = editRender || cellRender;
389
+ const renderOpts = editConfig && isEnableConf(editOpts) && editRender ? editRender : cellRender;
384
390
  const defaultSlot = slots ? slots.default : null;
385
391
  const gcSlot = slots ? (slots.groupContent || slots['group-content']) : null;
386
392
  let cellValue = '';
package/lib/index.umd.js CHANGED
@@ -5343,7 +5343,7 @@ function renderCellHandle(params) {
5343
5343
  case 'html':
5344
5344
  return isDeepCell ? Cell.renderDeepHTMLCell(params) : Cell.renderHTMLCell(params);
5345
5345
  }
5346
- if (isEnableConf(editConfig) && editRender) {
5346
+ if (editConfig && isEnableConf(editOpts) && editRender) {
5347
5347
  return editOpts.mode === 'cell' ? isDeepCell ? Cell.renderDeepCellEdit(params) : Cell.renderCellEdit(params) : isDeepCell ? Cell.renderDeepRowEdit(params) : Cell.renderRowEdit(params);
5348
5348
  }
5349
5349
  return isDeepCell ? Cell.renderDeepCell(params) : Cell.renderDefaultCell(params);
@@ -5354,9 +5354,13 @@ function renderHeaderHandle(params) {
5354
5354
  $table
5355
5355
  } = params;
5356
5356
  const tableProps = $table.props;
5357
+ const {
5358
+ computeEditOpts
5359
+ } = $table.getComputeMaps();
5357
5360
  const {
5358
5361
  editConfig
5359
5362
  } = tableProps;
5363
+ const editOpts = computeEditOpts.value;
5360
5364
  const {
5361
5365
  type,
5362
5366
  filters,
@@ -5380,7 +5384,7 @@ function renderHeaderHandle(params) {
5380
5384
  }
5381
5385
  break;
5382
5386
  }
5383
- if (editConfig && editRender) {
5387
+ if (editConfig && isEnableConf(editOpts) && editRender) {
5384
5388
  return Cell.renderEditHeader(params);
5385
5389
  } else if (filters && sortable) {
5386
5390
  return Cell.renderSortAndFilterHeader(params);
@@ -5447,11 +5451,19 @@ const Cell = {
5447
5451
  row,
5448
5452
  column
5449
5453
  } = params;
5454
+ const tableProps = $table.props;
5450
5455
  const tableReactData = $table.reactData;
5451
5456
  const tableInternalData = $table.internalData;
5452
5457
  const {
5453
5458
  isRowGroupStatus
5454
5459
  } = tableReactData;
5460
+ const {
5461
+ computeEditOpts
5462
+ } = $table.getComputeMaps();
5463
+ const {
5464
+ editConfig
5465
+ } = tableProps;
5466
+ const editOpts = computeEditOpts.value;
5455
5467
  const {
5456
5468
  field,
5457
5469
  slots,
@@ -5460,7 +5472,7 @@ const Cell = {
5460
5472
  rowGroupNode,
5461
5473
  aggFunc
5462
5474
  } = column;
5463
- const renderOpts = editRender || cellRender;
5475
+ const renderOpts = editConfig && isEnableConf(editOpts) && editRender ? editRender : cellRender;
5464
5476
  const defaultSlot = slots ? slots.default : null;
5465
5477
  const gcSlot = slots ? slots.groupContent || slots['group-content'] : null;
5466
5478
  let cellValue = '';