vxe-table 4.10.8 → 4.10.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 (37) hide show
  1. package/es/index.css +1 -1
  2. package/es/index.min.css +1 -1
  3. package/es/style.css +1 -1
  4. package/es/style.min.css +1 -1
  5. package/es/table/src/table.js +66 -28
  6. package/es/table/style.css +23 -0
  7. package/es/table/style.min.css +1 -1
  8. package/es/ui/index.js +5 -3
  9. package/es/ui/src/log.js +1 -1
  10. package/es/vxe-table/style.css +23 -0
  11. package/es/vxe-table/style.min.css +1 -1
  12. package/lib/index.css +1 -1
  13. package/lib/index.min.css +1 -1
  14. package/lib/index.umd.js +48 -13
  15. package/lib/index.umd.min.js +1 -1
  16. package/lib/style.css +1 -1
  17. package/lib/style.min.css +1 -1
  18. package/lib/table/src/table.js +42 -9
  19. package/lib/table/src/table.min.js +1 -1
  20. package/lib/table/style/style.css +23 -0
  21. package/lib/table/style/style.min.css +1 -1
  22. package/lib/ui/index.js +5 -3
  23. package/lib/ui/index.min.js +1 -1
  24. package/lib/ui/src/log.js +1 -1
  25. package/lib/ui/src/log.min.js +1 -1
  26. package/lib/vxe-table/style/style.css +23 -0
  27. package/lib/vxe-table/style/style.min.css +1 -1
  28. package/package.json +2 -2
  29. package/packages/table/src/table.ts +68 -28
  30. package/packages/ui/index.ts +4 -2
  31. package/styles/components/table.scss +21 -0
  32. /package/es/{iconfont.1739010729902.ttf → iconfont.1739161310227.ttf} +0 -0
  33. /package/es/{iconfont.1739010729902.woff → iconfont.1739161310227.woff} +0 -0
  34. /package/es/{iconfont.1739010729902.woff2 → iconfont.1739161310227.woff2} +0 -0
  35. /package/lib/{iconfont.1739010729902.ttf → iconfont.1739161310227.ttf} +0 -0
  36. /package/lib/{iconfont.1739010729902.woff → iconfont.1739161310227.woff} +0 -0
  37. /package/lib/{iconfont.1739010729902.woff2 → iconfont.1739161310227.woff2} +0 -0
@@ -243,6 +243,12 @@ export default defineComponent({
243
243
  isHeader: false,
244
244
  isFooter: false
245
245
  },
246
+ rowHeightStore: {
247
+ default: 48,
248
+ medium: 44,
249
+ small: 40,
250
+ mini: 36
251
+ },
246
252
  scrollVMLoading: false,
247
253
  calcCellHeightFlag: 1,
248
254
  resizeHeightFlag: 0,
@@ -337,6 +343,7 @@ export default defineComponent({
337
343
  let tableMethods = {};
338
344
  let tablePrivateMethods = {};
339
345
  const refElem = ref();
346
+ const refVarElem = ref();
340
347
  const refTooltip = ref();
341
348
  const refCommTooltip = ref();
342
349
  const refValidTooltip = ref();
@@ -436,12 +443,7 @@ export default defineComponent({
436
443
  return 0;
437
444
  });
438
445
  const computeRowHeightMaps = computed(() => {
439
- return {
440
- default: 48,
441
- medium: 44,
442
- small: 40,
443
- mini: 36
444
- };
446
+ return reactData.rowHeightStore;
445
447
  });
446
448
  const computeDefaultRowHeight = computed(() => {
447
449
  const vSize = computeSize.value;
@@ -9084,7 +9086,7 @@ export default defineComponent({
9084
9086
  return [h('span', dragTipText)];
9085
9087
  };
9086
9088
  const renderDragTip = () => {
9087
- const { dragRow } = reactData;
9089
+ const { dragRow, dragCol } = reactData;
9088
9090
  const rowOpts = computeRowOpts.value;
9089
9091
  const columnOpts = computeColumnOpts.value;
9090
9092
  const rowDragOpts = computeRowDragOpts.value;
@@ -9105,31 +9107,33 @@ export default defineComponent({
9105
9107
  'is--guides': columnDragOpts.showGuidesStatus
9106
9108
  }]
9107
9109
  }),
9108
- h('div', {
9109
- ref: refDragTipElem,
9110
- class: 'vxe-table--drag-sort-tip'
9111
- }, [
9112
- h('div', {
9113
- class: 'vxe-table--drag-sort-tip-wrapper'
9110
+ (dragRow && rowDragOpts.showDragTip) || (dragCol && columnDragOpts.showDragTip)
9111
+ ? h('div', {
9112
+ ref: refDragTipElem,
9113
+ class: 'vxe-table--drag-sort-tip'
9114
9114
  }, [
9115
9115
  h('div', {
9116
- class: 'vxe-table--drag-sort-tip-status'
9116
+ class: 'vxe-table--drag-sort-tip-wrapper'
9117
9117
  }, [
9118
- h('span', {
9119
- class: ['vxe-table--drag-sort-tip-normal-status', dragRow ? getIcon().TABLE_DRAG_STATUS_ROW : getIcon().TABLE_DRAG_STATUS_COLUMN]
9120
- }),
9121
- h('span', {
9122
- class: ['vxe-table--drag-sort-tip-sub-status', getIcon().TABLE_DRAG_STATUS_SUB_ROW]
9123
- }),
9124
- h('span', {
9125
- class: ['vxe-table--drag-sort-tip-disabled-status', getIcon().TABLE_DRAG_DISABLED]
9126
- })
9127
- ]),
9128
- h('div', {
9129
- class: 'vxe-table--drag-sort-tip-content'
9130
- }, renderDragTipContents())
9118
+ h('div', {
9119
+ class: 'vxe-table--drag-sort-tip-status'
9120
+ }, [
9121
+ h('span', {
9122
+ class: ['vxe-table--drag-sort-tip-normal-status', dragRow ? getIcon().TABLE_DRAG_STATUS_ROW : getIcon().TABLE_DRAG_STATUS_COLUMN]
9123
+ }),
9124
+ h('span', {
9125
+ class: ['vxe-table--drag-sort-tip-sub-status', getIcon().TABLE_DRAG_STATUS_SUB_ROW]
9126
+ }),
9127
+ h('span', {
9128
+ class: ['vxe-table--drag-sort-tip-disabled-status', getIcon().TABLE_DRAG_DISABLED]
9129
+ })
9130
+ ]),
9131
+ h('div', {
9132
+ class: 'vxe-table--drag-sort-tip-content'
9133
+ }, renderDragTipContents())
9134
+ ])
9131
9135
  ])
9132
- ])
9136
+ : renderEmptyElement($xeTable)
9133
9137
  ]);
9134
9138
  }
9135
9139
  return renderEmptyElement($xeTable);
@@ -9323,6 +9327,23 @@ export default defineComponent({
9323
9327
  h('div', {
9324
9328
  class: 'vxe-table-slots'
9325
9329
  }, slots.default ? slots.default({}) : []),
9330
+ h('div', {
9331
+ ref: refVarElem,
9332
+ class: 'vxe-table-vars'
9333
+ }, [
9334
+ h('div', {
9335
+ class: 'vxe-table-var-default'
9336
+ }),
9337
+ h('div', {
9338
+ class: 'vxe-table-var-medium'
9339
+ }),
9340
+ h('div', {
9341
+ class: 'vxe-table-var-small'
9342
+ }),
9343
+ h('div', {
9344
+ class: 'vxe-table-var-mini'
9345
+ })
9346
+ ]),
9326
9347
  h('div', {
9327
9348
  key: 'tw',
9328
9349
  class: 'vxe-table--render-wrapper'
@@ -9668,9 +9689,26 @@ export default defineComponent({
9668
9689
  tablePrivateMethods.preventEvent(null, 'deactivated', { $table: $xeTable });
9669
9690
  });
9670
9691
  onMounted(() => {
9692
+ const { rowHeightStore } = reactData;
9693
+ const varEl = refVarElem.value;
9671
9694
  const columnOpts = computeColumnOpts.value;
9672
9695
  const rowOpts = computeRowOpts.value;
9673
9696
  const customOpts = computeCustomOpts.value;
9697
+ if (varEl) {
9698
+ const [defEl, mediumEl, smallEl, miniEl] = varEl.children;
9699
+ if (defEl) {
9700
+ rowHeightStore.default = defEl.clientHeight;
9701
+ }
9702
+ if (mediumEl) {
9703
+ rowHeightStore.medium = mediumEl.clientHeight;
9704
+ }
9705
+ if (smallEl) {
9706
+ rowHeightStore.small = smallEl.clientHeight;
9707
+ }
9708
+ if (miniEl) {
9709
+ rowHeightStore.mini = miniEl.clientHeight;
9710
+ }
9711
+ }
9674
9712
  if (columnOpts.drag || rowOpts.drag || customOpts.allowSort) {
9675
9713
  initTpImg();
9676
9714
  }
@@ -1682,6 +1682,29 @@
1682
1682
  display: none;
1683
1683
  }
1684
1684
 
1685
+ .vxe-table-vars {
1686
+ height: 0;
1687
+ width: 0;
1688
+ visibility: hidden;
1689
+ overflow: hidden;
1690
+ -webkit-user-select: none;
1691
+ -moz-user-select: none;
1692
+ user-select: none;
1693
+ pointer-events: none;
1694
+ }
1695
+ .vxe-table-vars .vxe-table-var-default {
1696
+ height: var(--vxe-ui-table-row-height-default);
1697
+ }
1698
+ .vxe-table-vars .vxe-table-var-medium {
1699
+ height: var(--vxe-ui-table-row-height-medium);
1700
+ }
1701
+ .vxe-table-vars .vxe-table-var-small {
1702
+ height: var(--vxe-ui-table-row-height-small);
1703
+ }
1704
+ .vxe-table-vars .vxe-table-var-mini {
1705
+ height: var(--vxe-ui-table-row-height-mini);
1706
+ }
1707
+
1685
1708
  .vxe-table--print-frame {
1686
1709
  position: fixed;
1687
1710
  bottom: -100%;