vxe-table 3.18.7 → 3.18.9

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.
@@ -326,6 +326,10 @@ function cacheColumnMap($xeTable) {
326
326
  const props = $xeTable;
327
327
  const reactData = $xeTable;
328
328
  const internalData = $xeTable;
329
+ const {
330
+ treeConfig,
331
+ showOverflow
332
+ } = props;
329
333
  const {
330
334
  tableFullColumn,
331
335
  collectColumn
@@ -336,17 +340,19 @@ function cacheColumnMap($xeTable) {
336
340
  const expandOpts = $xeTable.computeExpandOpts;
337
341
  const columnOpts = $xeTable.computeColumnOpts;
338
342
  const columnDragOpts = $xeTable.computeColumnDragOpts;
343
+ const virtualYOpts = $xeTable.computeVirtualYOpts;
339
344
  const {
340
345
  isCrossDrag,
341
346
  isSelfToChildDrag
342
347
  } = columnDragOpts;
343
348
  const customOpts = $xeTable.computeCustomOpts;
349
+ const treeOpts = $xeTable.computeTreeOpts;
344
350
  const {
345
351
  storage
346
352
  } = customOpts;
347
353
  const rowOpts = $xeTable.computeRowOpts;
348
354
  const isGroup = collectColumn.some(_utils.hasChildrenList);
349
- let isAllOverflow = !!props.showOverflow;
355
+ let isAllOverflow = !!showOverflow;
350
356
  let rowGroupColumn;
351
357
  let expandColumn;
352
358
  let treeNodeColumn;
@@ -448,9 +454,15 @@ function cacheColumnMap($xeTable) {
448
454
  } else {
449
455
  tableFullColumn.forEach(handleFunc);
450
456
  }
457
+ if (expandColumn && expandOpts.mode !== 'fixed' && virtualYOpts.enabled) {
458
+ (0, _log.warnLog)('vxe.error.notConflictProp', ['column.type="expand', 'virtual-y-config.enabled=false']);
459
+ }
451
460
  if (expandColumn && expandOpts.mode !== 'fixed' && mouseOpts.area) {
452
461
  (0, _log.errLog)('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand']);
453
462
  }
463
+ if (expandColumn && expandOpts.mode !== 'inside' && treeConfig && !treeOpts.transform) {
464
+ (0, _log.errLog)('vxe.error.notConflictProp', ['tree-config.transform=false', 'expand-config.mode=fixed']);
465
+ }
454
466
  if (htmlColumn) {
455
467
  if (!columnOpts.useKey) {
456
468
  (0, _log.errLog)('vxe.error.notSupportProp', ['column.type=html', 'column-config.useKey=false', 'column-config.useKey=true']);
@@ -3238,7 +3250,7 @@ function clearRowDragData($xeTable) {
3238
3250
  * @param {Event} evnt 事件
3239
3251
  * @param {Row} row 行对象
3240
3252
  */
3241
- function handleTooltip($xeTable, evnt, tdEl, overflowElem, tipElem, params) {
3253
+ function handleTooltip($xeTable, evnt, type, tdEl, overflowElem, tipElem, params) {
3242
3254
  const reactData = $xeTable;
3243
3255
  const tipOverEl = overflowElem || tdEl;
3244
3256
  if (!tipOverEl) {
@@ -3262,16 +3274,19 @@ function handleTooltip($xeTable, evnt, tdEl, overflowElem, tipElem, params) {
3262
3274
  const content = useCustom ? customContent : _xeUtils.default.toString(column.type === 'html' ? tipOverEl.innerText : tipOverEl.textContent).trim();
3263
3275
  const isOver = tipOverEl.scrollWidth > tipOverEl.clientWidth;
3264
3276
  if (content && (showAll || useCustom || isOver)) {
3277
+ const tipContent = (0, _utils.formatText)(content);
3265
3278
  Object.assign(tooltipStore, {
3266
3279
  row,
3267
3280
  column,
3268
3281
  visible: true,
3282
+ content: tipContent,
3283
+ type,
3269
3284
  currOpts: {}
3270
3285
  });
3271
3286
  $xeTable.$nextTick(() => {
3272
3287
  const $tooltip = $xeTable.$refs.refTooltip;
3273
3288
  if ($tooltip && $tooltip.open) {
3274
- $tooltip.open(isOver ? tipOverEl : tipElem, (0, _utils.formatText)(content));
3289
+ $tooltip.open(isOver ? tipOverEl : tipElem, tipContent);
3275
3290
  }
3276
3291
  });
3277
3292
  }
@@ -8021,7 +8036,7 @@ const Methods = {
8021
8036
  }
8022
8037
  if (tooltipStore.column !== column || !tooltipStore.visible) {
8023
8038
  const ctEl = thEl.querySelector('.vxe-cell--title');
8024
- handleTooltip($xeTable, evnt, thEl, ((0, _dom.hasClass)(thEl, 'col--ellipsis') ? ctEl : cWrapperEl) || cWrapperEl, ctEl || cellEl, params);
8039
+ handleTooltip($xeTable, evnt, 'header', thEl, ((0, _dom.hasClass)(thEl, 'col--ellipsis') ? ctEl : cWrapperEl) || cWrapperEl, ctEl || cellEl, params);
8025
8040
  }
8026
8041
  },
8027
8042
  /**
@@ -8071,7 +8086,7 @@ const Methods = {
8071
8086
  if (!tipEl) {
8072
8087
  tipEl = ctEl;
8073
8088
  }
8074
- handleTooltip($xeTable, evnt, tdEl, ovEl || ctEl, tipEl, params);
8089
+ handleTooltip($xeTable, evnt, 'body', tdEl, ovEl || ctEl, tipEl, params);
8075
8090
  }
8076
8091
  },
8077
8092
  /**
@@ -8098,7 +8113,7 @@ const Methods = {
8098
8113
  if (!tipEl) {
8099
8114
  tipEl = ctEl;
8100
8115
  }
8101
- handleTooltip($xeTable, evnt, tdEl, ovEl || ctEl, tipEl, params);
8116
+ handleTooltip($xeTable, evnt, 'footer', tdEl, ovEl || ctEl, tipEl, params);
8102
8117
  }
8103
8118
  },
8104
8119
  openTooltip(target, content) {
@@ -8128,6 +8143,7 @@ const Methods = {
8128
8143
  column: null,
8129
8144
  content: null,
8130
8145
  visible: false,
8146
+ type: null,
8131
8147
  currOpts: {}
8132
8148
  });
8133
8149
  if (tooltip) {