vxe-table 4.21.8 → 4.21.10

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 (39) hide show
  1. package/dist/all.esm.js +47 -13
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/index.css +1 -1
  5. package/es/index.min.css +1 -1
  6. package/es/style.css +1 -1
  7. package/es/style.min.css +1 -1
  8. package/es/table/src/cell.js +39 -5
  9. package/es/table/style.css +1 -2
  10. package/es/table/style.min.css +1 -1
  11. package/es/ui/index.js +1 -1
  12. package/es/ui/src/log.js +1 -1
  13. package/es/vxe-table/style.css +1 -2
  14. package/es/vxe-table/style.min.css +1 -1
  15. package/lib/index.css +1 -1
  16. package/lib/index.min.css +1 -1
  17. package/lib/index.umd.js +39 -5
  18. package/lib/index.umd.min.js +1 -1
  19. package/lib/style.css +1 -1
  20. package/lib/style.min.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/style/style.css +1 -2
  24. package/lib/table/style/style.min.css +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/lib/vxe-table/style/style.css +1 -2
  30. package/lib/vxe-table/style/style.min.css +1 -1
  31. package/package.json +2 -2
  32. package/packages/table/src/cell.ts +51 -5
  33. package/styles/components/table.scss +10 -1
  34. /package/es/{iconfont.1788921188086.ttf → iconfont.1789035007778.ttf} +0 -0
  35. /package/es/{iconfont.1788921188086.woff → iconfont.1789035007778.woff} +0 -0
  36. /package/es/{iconfont.1788921188086.woff2 → iconfont.1789035007778.woff2} +0 -0
  37. /package/lib/{iconfont.1788921188086.ttf → iconfont.1789035007778.ttf} +0 -0
  38. /package/lib/{iconfont.1788921188086.woff → iconfont.1789035007778.woff} +0 -0
  39. /package/lib/{iconfont.1788921188086.woff2 → iconfont.1789035007778.woff2} +0 -0
@@ -5,7 +5,7 @@ import { getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/sr
5
5
  import { updateCellTitle } from '../../ui/src/dom';
6
6
  import { createColumn, getRowid } from './util';
7
7
  import { getSlotVNs } from '../../ui/src/vn';
8
- const { getI18n, getIcon, renderer, renderEmptyElement } = VxeUI;
8
+ const { getConfig, getI18n, getIcon, renderer, renderEmptyElement } = VxeUI;
9
9
  function renderTitlePrefixIcon(params) {
10
10
  const { $table, column } = params;
11
11
  const titlePrefix = column.titlePrefix || column.titleHelp;
@@ -280,9 +280,12 @@ function renderHeaderHandle(params) {
280
280
  const tableProps = $table.props;
281
281
  const { editConfig } = tableProps;
282
282
  const { type, filters, sortable, editRender, slots } = column;
283
- const headerSlot = slots ? slots.header : null;
284
- if (headerSlot) {
285
- return renderTitleContent(params, $table.callSlot(headerSlot, params));
283
+ // 兼容已废弃方式
284
+ if (getConfig().tableHeadeSlotToTitleSlot !== 'obsolete') {
285
+ const headerSlot = slots ? slots.header : null;
286
+ if (headerSlot) {
287
+ return renderTitleContent(params, $table.callSlot(headerSlot, params));
288
+ }
286
289
  }
287
290
  switch (type) {
288
291
  case 'seq':
@@ -342,11 +345,18 @@ export const Cell = {
342
345
  const { $table, column } = params;
343
346
  const tableProps = $table.props;
344
347
  const { editConfig } = tableProps;
345
- const { editRender, cellRender } = column;
348
+ const { slots, editRender, cellRender } = column;
346
349
  const isEnableEdit = editConfig && isEnableConf(editConfig);
347
350
  const editRenderOpts = isEnableEdit && isEnableConf(editRender) ? editRender : null;
348
351
  const cellRenderOpts = isEnableConf(cellRender) ? cellRender : null;
349
352
  const renderOpts = editRenderOpts || cellRenderOpts;
353
+ // 兼容已废弃方式
354
+ if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
355
+ const headerSlot = slots ? slots.header : null;
356
+ if (headerSlot) {
357
+ return renderTitleContent(params, $table.callSlot(headerSlot, params));
358
+ }
359
+ }
350
360
  if (renderOpts) {
351
361
  const compConf = renderer.get(renderOpts.name);
352
362
  if (compConf) {
@@ -615,6 +625,12 @@ export const Cell = {
615
625
  */
616
626
  renderSeqHeader(params) {
617
627
  const { $table, column } = params;
628
+ // 兼容已废弃方式
629
+ if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
630
+ const { slots } = column;
631
+ const headerSlot = slots ? slots.header : null;
632
+ return renderHeaderCellBaseVNs(params, renderTitleContent(params, headerSlot ? $table.callSlot(headerSlot, params) : $table.getHeaderCellLabel(column)));
633
+ }
618
634
  return renderHeaderCellBaseVNs(params, renderTitleContent(params, $table.getHeaderCellLabel(column)));
619
635
  },
620
636
  renderSeqCell(params) {
@@ -644,6 +660,17 @@ export const Cell = {
644
660
  const { $table, column } = params;
645
661
  const { slots } = column;
646
662
  const titleSlot = slots ? slots.title : null;
663
+ // 兼容已废弃方式
664
+ if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
665
+ const headerSlot = slots ? slots.header : null;
666
+ return renderHeaderCellBaseVNs(params, renderTitleContent(params, headerSlot
667
+ ? $table.callSlot(headerSlot, params)
668
+ : [
669
+ h('span', {
670
+ class: 'vxe-radio--label'
671
+ }, titleSlot ? $table.callSlot(titleSlot, params) : $table.getHeaderCellLabel(column))
672
+ ]));
673
+ }
647
674
  return renderHeaderCellBaseVNs(params, renderTitleContent(params, [
648
675
  h('span', {
649
676
  class: 'vxe-radio--label'
@@ -725,6 +752,13 @@ export const Cell = {
725
752
  };
726
753
  }
727
754
  const checkboxParams = Object.assign(Object.assign({}, params), { checked: isAllCheckboxSelected, disabled: isAllCheckboxDisabled, indeterminate: isAllCheckboxIndeterminate });
755
+ // 兼容已废弃方式
756
+ if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
757
+ const headerSlot = slots ? slots.header : null;
758
+ if (headerSlot) {
759
+ return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, $table.callSlot(headerSlot, checkboxParams)));
760
+ }
761
+ }
728
762
  if (checkStrictly ? !showHeader : showHeader === false) {
729
763
  return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, [
730
764
  h('span', {
@@ -3997,7 +3997,7 @@
3997
3997
  .vxe-table--render-default .vxe-cell--wrapper {
3998
3998
  margin: auto 0;
3999
3999
  }
4000
- .vxe-table--render-default .vxe-body--row .vxe-table--column .vxe-cell .vxe-cell--wrapper > .vxe-reusekeep-control {
4000
+ .vxe-table--render-default .vxe-body--row .vxe-table--column .vxe-cell .vxe-cell--wrapper > div > .vxe-reusekeep-control, .vxe-table--render-default .vxe-body--row .vxe-table--column .vxe-cell .vxe-cell--wrapper > span > .vxe-reusekeep-control, .vxe-table--render-default .vxe-body--row .vxe-table--column .vxe-cell .vxe-cell--wrapper > .vxe-reusekeep-control {
4001
4001
  position: absolute;
4002
4002
  width: 0;
4003
4003
  height: 0;
@@ -4006,7 +4006,6 @@
4006
4006
  padding: 0;
4007
4007
  outline: none;
4008
4008
  }
4009
-
4010
4009
  /*valid error*/
4011
4010
  div.vxe-table--tooltip-wrapper.vxe-table--valid-error {
4012
4011
  padding: 0;