vxe-table 3.23.7 → 3.23.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.
Files changed (40) hide show
  1. package/es/locale/lang/en-US.js +2 -2
  2. package/es/locale/lang/zh-CHT.js +2 -2
  3. package/es/locale/lang/zh-CN.js +2 -2
  4. package/es/style.css +1 -1
  5. package/es/table/src/cell.js +39 -5
  6. package/es/table/src/table.js +3 -0
  7. package/es/ui/index.js +1 -1
  8. package/es/ui/src/log.js +1 -1
  9. package/lib/index.umd.js +44 -7
  10. package/lib/index.umd.min.js +1 -1
  11. package/lib/locale/lang/en-US.js +2 -2
  12. package/lib/locale/lang/en-US.min.js +1 -1
  13. package/lib/locale/lang/en-US.umd.js +2 -2
  14. package/lib/locale/lang/zh-CHT.js +2 -2
  15. package/lib/locale/lang/zh-CHT.min.js +1 -1
  16. package/lib/locale/lang/zh-CHT.umd.js +2 -2
  17. package/lib/locale/lang/zh-CN.js +2 -2
  18. package/lib/locale/lang/zh-CN.min.js +1 -1
  19. package/lib/locale/lang/zh-CN.umd.js +2 -2
  20. package/lib/style.css +1 -1
  21. package/lib/table/src/cell.js +37 -3
  22. package/lib/table/src/cell.min.js +1 -1
  23. package/lib/table/src/table.js +3 -0
  24. package/lib/table/src/table.min.js +1 -1
  25. package/lib/ui/index.js +1 -1
  26. package/lib/ui/index.min.js +1 -1
  27. package/lib/ui/src/log.js +1 -1
  28. package/lib/ui/src/log.min.js +1 -1
  29. package/package.json +2 -2
  30. package/packages/locale/lang/en-US.ts +2 -2
  31. package/packages/locale/lang/zh-CHT.ts +2 -2
  32. package/packages/locale/lang/zh-CN.ts +2 -2
  33. package/packages/table/src/cell.ts +51 -5
  34. package/packages/table/src/table.ts +3 -0
  35. /package/es/{iconfont.1788696064361.ttf → iconfont.1788956861004.ttf} +0 -0
  36. /package/es/{iconfont.1788696064361.woff → iconfont.1788956861004.woff} +0 -0
  37. /package/es/{iconfont.1788696064361.woff2 → iconfont.1788956861004.woff2} +0 -0
  38. /package/lib/{iconfont.1788696064361.ttf → iconfont.1788956861004.ttf} +0 -0
  39. /package/lib/{iconfont.1788696064361.woff → iconfont.1788956861004.woff} +0 -0
  40. /package/lib/{iconfont.1788696064361.woff2 → iconfont.1788956861004.woff2} +0 -0
@@ -4,7 +4,7 @@ import { getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/sr
4
4
  import { updateCellTitle } from '../../ui/src/dom';
5
5
  import { createColumn, getRowid } from './util';
6
6
  import { getSlotVNs } from '../../ui/src/vn';
7
- const { getI18n, getIcon, renderer, renderEmptyElement } = VxeUI;
7
+ const { getConfig, getI18n, getIcon, renderer, renderEmptyElement } = VxeUI;
8
8
  function renderTitlePrefixIcon(h, params) {
9
9
  const { $table, column } = params;
10
10
  const titlePrefix = column.titlePrefix || column.titleHelp;
@@ -284,9 +284,12 @@ function renderHeaderHandle(h, params) {
284
284
  const tableProps = $table;
285
285
  const { editConfig } = tableProps;
286
286
  const { type, filters, sortable, editRender, slots } = column;
287
- const headerSlot = slots ? slots.header : null;
288
- if (headerSlot) {
289
- return renderTitleContent(h, params, $table.callSlot(headerSlot, params, h));
287
+ // 兼容已废弃方式
288
+ if (getConfig().tableHeadeSlotToTitleSlot !== 'obsolete') {
289
+ const headerSlot = slots ? slots.header : null;
290
+ if (headerSlot) {
291
+ return renderTitleContent(h, params, $table.callSlot(headerSlot, params, h));
292
+ }
290
293
  }
291
294
  switch (type) {
292
295
  case 'seq':
@@ -346,11 +349,18 @@ export const Cell = {
346
349
  const { $table, column } = params;
347
350
  const tableProps = $table;
348
351
  const { editConfig } = tableProps;
349
- const { editRender, cellRender } = column;
352
+ const { slots, editRender, cellRender } = column;
350
353
  const isEnableEdit = editConfig && isEnableConf(editConfig);
351
354
  const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
352
355
  const cellRenderOpts = isEnableConf(cellRender) ? cellRender : null;
353
356
  const renderOpts = editRenderOpts || cellRenderOpts;
357
+ // 兼容已废弃方式
358
+ if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
359
+ const headerSlot = slots ? slots.header : null;
360
+ if (headerSlot) {
361
+ return renderTitleContent(h, params, $table.callSlot(headerSlot, params, h));
362
+ }
363
+ }
354
364
  if (renderOpts) {
355
365
  const compConf = renderer.get(renderOpts.name);
356
366
  const rtHeader = compConf ? (compConf.renderTableHeader || compConf.renderHeader) : null;
@@ -620,6 +630,12 @@ export const Cell = {
620
630
  */
621
631
  renderSeqHeader(h, params) {
622
632
  const { $table, column } = params;
633
+ // 兼容已废弃方式
634
+ if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
635
+ const { slots } = column;
636
+ const headerSlot = slots ? slots.header : null;
637
+ return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, headerSlot ? $table.callSlot(headerSlot, params, h) : $table.getHeaderCellLabel(column)));
638
+ }
623
639
  return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, $table.getHeaderCellLabel(column)));
624
640
  },
625
641
  renderSeqCell(h, params) {
@@ -647,6 +663,17 @@ export const Cell = {
647
663
  const { $table, column } = params;
648
664
  const { slots } = column;
649
665
  const titleSlot = slots ? slots.title : null;
666
+ // 兼容已废弃方式
667
+ if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
668
+ const headerSlot = slots ? slots.header : null;
669
+ return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, headerSlot
670
+ ? $table.callSlot(headerSlot, params, h)
671
+ : [
672
+ h('span', {
673
+ class: 'vxe-radio--label'
674
+ }, titleSlot ? $table.callSlot(titleSlot, params, h) : $table.getHeaderCellLabel(column))
675
+ ]));
676
+ }
650
677
  return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, [
651
678
  h('span', {
652
679
  class: 'vxe-radio--label'
@@ -729,6 +756,13 @@ export const Cell = {
729
756
  };
730
757
  }
731
758
  const checkboxParams = Object.assign(Object.assign({}, params), { checked: isAllCheckboxSelected, disabled: isAllCheckboxDisabled, indeterminate: isAllCheckboxIndeterminate });
759
+ // 兼容已废弃方式
760
+ if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
761
+ const headerSlot = slots ? slots.header : null;
762
+ if (headerSlot) {
763
+ return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, $table.callSlot(headerSlot, checkboxParams, h)));
764
+ }
765
+ }
732
766
  if (checkStrictly ? !showHeader : showHeader === false) {
733
767
  return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, [
734
768
  h('span', {
@@ -1730,6 +1730,9 @@ export default {
1730
1730
  if (mouseOpts.area && areaOpts.selectCellByHeader && columnOpts.drag && columnDragOpts.trigger === 'cell') {
1731
1731
  errLog('vxe.error.notSupportProp', ['area-config.selectCellByHeader & column-config.drag', 'column-drag-config.trigger=cell', 'column-drag-config.trigger=default | area-config.selectCellByHeader=false']);
1732
1732
  }
1733
+ if (mouseOpts.area && props.spanMethod) {
1734
+ warnLog('vxe.error.notSupportProp', ['mouse-config.area', 'span-method', 'merge-cells']);
1735
+ }
1733
1736
  }
1734
1737
  if (!$xeTable.handlePivotTableAggData) {
1735
1738
  if (customOpts.allowGroup) {
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.23.7";
3
+ export const version = "3.23.9";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
package/es/ui/src/log.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const tableVersion = `table v${"3.23.7"}`;
3
+ const tableVersion = `table v${"3.23.9"}`;
4
4
  export function createComponentLog(name) {
5
5
  const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
6
6
  const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
package/lib/index.umd.js CHANGED
@@ -3314,7 +3314,7 @@ function getDefaultConfig(val1, def1) {
3314
3314
  /* unused harmony import specifier */ var VxeUI;
3315
3315
 
3316
3316
 
3317
- const version = "3.23.7";
3317
+ const version = "3.23.9";
3318
3318
  core_.VxeUI.version = version;
3319
3319
  core_.VxeUI.tableVersion = version;
3320
3320
  core_.VxeUI.setConfig({
@@ -4276,7 +4276,7 @@ function getPopupAppendElement(appendTo) {
4276
4276
  const {
4277
4277
  log: log_log
4278
4278
  } = core_.VxeUI;
4279
- const tableVersion = `table v${"3.23.7"}`;
4279
+ const tableVersion = `table v${"3.23.9"}`;
4280
4280
  function createComponentLog(name) {
4281
4281
  const uiVersion = core_.VxeUI.uiVersion ? `ui v${core_.VxeUI.uiVersion}` : '';
4282
4282
  const ganttVersion = core_.VxeUI.ganttVersion ? `gantt v${core_.VxeUI.ganttVersion}` : '';
@@ -5755,6 +5755,7 @@ function getSlotVNs(vns) {
5755
5755
 
5756
5756
 
5757
5757
  const {
5758
+ getConfig: cell_getConfig,
5758
5759
  getI18n: cell_getI18n,
5759
5760
  getIcon: cell_getIcon,
5760
5761
  renderer: cell_renderer,
@@ -6101,9 +6102,12 @@ function renderHeaderHandle(h, params) {
6101
6102
  editRender,
6102
6103
  slots
6103
6104
  } = column;
6104
- const headerSlot = slots ? slots.header : null;
6105
- if (headerSlot) {
6106
- return renderTitleContent(h, params, $table.callSlot(headerSlot, params, h));
6105
+ // 兼容已废弃方式
6106
+ if (cell_getConfig().tableHeadeSlotToTitleSlot !== 'obsolete') {
6107
+ const headerSlot = slots ? slots.header : null;
6108
+ if (headerSlot) {
6109
+ return renderTitleContent(h, params, $table.callSlot(headerSlot, params, h));
6110
+ }
6107
6111
  }
6108
6112
  switch (type) {
6109
6113
  case 'seq':
@@ -6166,6 +6170,7 @@ const Cell = {
6166
6170
  editConfig
6167
6171
  } = tableProps;
6168
6172
  const {
6173
+ slots,
6169
6174
  editRender,
6170
6175
  cellRender
6171
6176
  } = column;
@@ -6173,6 +6178,13 @@ const Cell = {
6173
6178
  const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
6174
6179
  const cellRenderOpts = isEnableConf(cellRender) ? cellRender : null;
6175
6180
  const renderOpts = editRenderOpts || cellRenderOpts;
6181
+ // 兼容已废弃方式
6182
+ if (cell_getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
6183
+ const headerSlot = slots ? slots.header : null;
6184
+ if (headerSlot) {
6185
+ return renderTitleContent(h, params, $table.callSlot(headerSlot, params, h));
6186
+ }
6187
+ }
6176
6188
  if (renderOpts) {
6177
6189
  const compConf = cell_renderer.get(renderOpts.name);
6178
6190
  const rtHeader = compConf ? compConf.renderTableHeader || compConf.renderHeader : null;
@@ -6507,6 +6519,14 @@ const Cell = {
6507
6519
  $table,
6508
6520
  column
6509
6521
  } = params;
6522
+ // 兼容已废弃方式
6523
+ if (cell_getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
6524
+ const {
6525
+ slots
6526
+ } = column;
6527
+ const headerSlot = slots ? slots.header : null;
6528
+ return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, headerSlot ? $table.callSlot(headerSlot, params, h) : $table.getHeaderCellLabel(column)));
6529
+ }
6510
6530
  return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, $table.getHeaderCellLabel(column)));
6511
6531
  },
6512
6532
  renderSeqCell(h, params) {
@@ -6546,6 +6566,13 @@ const Cell = {
6546
6566
  slots
6547
6567
  } = column;
6548
6568
  const titleSlot = slots ? slots.title : null;
6569
+ // 兼容已废弃方式
6570
+ if (cell_getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
6571
+ const headerSlot = slots ? slots.header : null;
6572
+ return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, headerSlot ? $table.callSlot(headerSlot, params, h) : [h('span', {
6573
+ class: 'vxe-radio--label'
6574
+ }, titleSlot ? $table.callSlot(titleSlot, params, h) : $table.getHeaderCellLabel(column))]));
6575
+ }
6549
6576
  return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, params, [h('span', {
6550
6577
  class: 'vxe-radio--label'
6551
6578
  }, titleSlot ? $table.callSlot(titleSlot, params, h) : $table.getHeaderCellLabel(column))]));
@@ -6667,6 +6694,13 @@ const Cell = {
6667
6694
  disabled: isAllCheckboxDisabled,
6668
6695
  indeterminate: isAllCheckboxIndeterminate
6669
6696
  };
6697
+ // 兼容已废弃方式
6698
+ if (cell_getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
6699
+ const headerSlot = slots ? slots.header : null;
6700
+ if (headerSlot) {
6701
+ return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, $table.callSlot(headerSlot, checkboxParams, h)));
6702
+ }
6703
+ }
6670
6704
  if (checkStrictly ? !showHeader : showHeader === false) {
6671
6705
  return renderHeaderCellBaseVNs(h, params, renderTitleContent(h, checkboxParams, [h('span', {
6672
6706
  class: 'vxe-checkbox--label'
@@ -23007,6 +23041,9 @@ function renderBody(h, $xeTable) {
23007
23041
  if (mouseOpts.area && areaOpts.selectCellByHeader && columnOpts.drag && columnDragOpts.trigger === 'cell') {
23008
23042
  table_errLog('vxe.error.notSupportProp', ['area-config.selectCellByHeader & column-config.drag', 'column-drag-config.trigger=cell', 'column-drag-config.trigger=default | area-config.selectCellByHeader=false']);
23009
23043
  }
23044
+ if (mouseOpts.area && props.spanMethod) {
23045
+ table_warnLog('vxe.error.notSupportProp', ['mouse-config.area', 'span-method', 'merge-cells']);
23046
+ }
23010
23047
  }
23011
23048
  if (!$xeTable.handlePivotTableAggData) {
23012
23049
  if (customOpts.allowGroup) {
@@ -29730,7 +29767,7 @@ const Toolbar = VxeToolbar;
29730
29767
  mergeErr: '无法对合并单元格进行该操作',
29731
29768
  multiErr: '无法对多重选择区域进行该操作',
29732
29769
  selectErr: '无法操作指定区域的单元格',
29733
- extendErr: '如果延伸的区域包含被合并的单元格,所有合并的单元格需大小相同',
29770
+ extendErr: '若要执行此操作,所有合并的单元格需大小相同',
29734
29771
  pasteMultiErr: '无法粘贴,需要相同大小的复制的区域和粘贴的区域才能执行此操作',
29735
29772
  cpInvalidErr: '该操作无法进行,您选择的区域中存在被禁止的列({0})'
29736
29773
  },
@@ -29882,7 +29919,7 @@ const Toolbar = VxeToolbar;
29882
29919
  area: {
29883
29920
  mergeErr: '无法对合并单元格进行该操作',
29884
29921
  multiErr: '无法对多重选择区域进行该操作',
29885
- extendErr: '如果延伸的区域包含被合并的单元格,所有合并的单元格需大小相同',
29922
+ extendErr: '若要执行此操作,所有合并的单元格需大小相同',
29886
29923
  pasteMultiErr: '无法粘贴,需要相同大小的复制的区域和粘贴的区域才能执行此操作'
29887
29924
  },
29888
29925
  fnr: {