vxe-table 4.10.9 → 4.10.11

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/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/header.js +4 -2
  6. package/es/table/src/table.js +42 -6
  7. package/es/table/style.css +23 -0
  8. package/es/table/style.min.css +1 -1
  9. package/es/ui/index.js +1 -1
  10. package/es/ui/src/log.js +1 -1
  11. package/es/vxe-table/style.css +23 -0
  12. package/es/vxe-table/style.min.css +1 -1
  13. package/lib/index.css +1 -1
  14. package/lib/index.min.css +1 -1
  15. package/lib/index.umd.js +44 -10
  16. package/lib/index.umd.min.js +1 -1
  17. package/lib/style.css +1 -1
  18. package/lib/style.min.css +1 -1
  19. package/lib/table/src/header.js +4 -2
  20. package/lib/table/src/header.min.js +1 -1
  21. package/lib/table/src/table.js +38 -6
  22. package/lib/table/src/table.min.js +1 -1
  23. package/lib/table/style/style.css +23 -0
  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 +23 -0
  30. package/lib/vxe-table/style/style.min.css +1 -1
  31. package/package.json +2 -2
  32. package/packages/table/src/header.ts +4 -2
  33. package/packages/table/src/table.ts +44 -6
  34. package/styles/components/table.scss +21 -0
  35. /package/es/{iconfont.1739152200042.ttf → iconfont.1739164577907.ttf} +0 -0
  36. /package/es/{iconfont.1739152200042.woff → iconfont.1739164577907.woff} +0 -0
  37. /package/es/{iconfont.1739152200042.woff2 → iconfont.1739164577907.woff2} +0 -0
  38. /package/lib/{iconfont.1739152200042.ttf → iconfont.1739164577907.ttf} +0 -0
  39. /package/lib/{iconfont.1739152200042.woff → iconfont.1739164577907.woff} +0 -0
  40. /package/lib/{iconfont.1739152200042.woff2 → iconfont.1739164577907.woff2} +0 -0
@@ -255,6 +255,13 @@ export default defineComponent({
255
255
  isFooter: false
256
256
  },
257
257
 
258
+ rowHeightStore: {
259
+ default: 48,
260
+ medium: 44,
261
+ small: 40,
262
+ mini: 36
263
+ },
264
+
258
265
  scrollVMLoading: false,
259
266
 
260
267
  calcCellHeightFlag: 1,
@@ -357,6 +364,7 @@ export default defineComponent({
357
364
  let tablePrivateMethods = {} as TablePrivateMethods
358
365
 
359
366
  const refElem = ref() as Ref<HTMLDivElement>
367
+ const refVarElem = ref() as Ref<HTMLDivElement>
360
368
  const refTooltip = ref() as Ref<VxeTooltipInstance>
361
369
  const refCommTooltip = ref() as Ref<VxeTooltipInstance>
362
370
  const refValidTooltip = ref() as Ref<VxeTooltipInstance>
@@ -473,12 +481,7 @@ export default defineComponent({
473
481
  })
474
482
 
475
483
  const computeRowHeightMaps = computed(() => {
476
- return {
477
- default: 48,
478
- medium: 44,
479
- small: 40,
480
- mini: 36
481
- }
484
+ return reactData.rowHeightStore
482
485
  })
483
486
 
484
487
  const computeDefaultRowHeight = computed(() => {
@@ -9447,6 +9450,23 @@ export default defineComponent({
9447
9450
  h('div', {
9448
9451
  class: 'vxe-table-slots'
9449
9452
  }, slots.default ? slots.default({}) : []),
9453
+ h('div', {
9454
+ ref: refVarElem,
9455
+ class: 'vxe-table-vars'
9456
+ }, [
9457
+ h('div', {
9458
+ class: 'vxe-table-var-default'
9459
+ }),
9460
+ h('div', {
9461
+ class: 'vxe-table-var-medium'
9462
+ }),
9463
+ h('div', {
9464
+ class: 'vxe-table-var-small'
9465
+ }),
9466
+ h('div', {
9467
+ class: 'vxe-table-var-mini'
9468
+ })
9469
+ ]),
9450
9470
  h('div', {
9451
9471
  key: 'tw',
9452
9472
  class: 'vxe-table--render-wrapper'
@@ -9810,10 +9830,28 @@ export default defineComponent({
9810
9830
  })
9811
9831
 
9812
9832
  onMounted(() => {
9833
+ const { rowHeightStore } = reactData
9834
+ const varEl = refVarElem.value
9813
9835
  const columnOpts = computeColumnOpts.value
9814
9836
  const rowOpts = computeRowOpts.value
9815
9837
  const customOpts = computeCustomOpts.value
9816
9838
 
9839
+ if (varEl) {
9840
+ const [defEl, mediumEl, smallEl, miniEl] = varEl.children
9841
+ if (defEl) {
9842
+ rowHeightStore.default = defEl.clientHeight
9843
+ }
9844
+ if (mediumEl) {
9845
+ rowHeightStore.medium = mediumEl.clientHeight
9846
+ }
9847
+ if (smallEl) {
9848
+ rowHeightStore.small = smallEl.clientHeight
9849
+ }
9850
+ if (miniEl) {
9851
+ rowHeightStore.mini = miniEl.clientHeight
9852
+ }
9853
+ }
9854
+
9817
9855
  if (columnOpts.drag || rowOpts.drag || customOpts.allowSort) {
9818
9856
  initTpImg()
9819
9857
  }
@@ -7,6 +7,27 @@
7
7
  display: none;
8
8
  }
9
9
 
10
+ .vxe-table-vars {
11
+ height: 0;
12
+ width: 0;
13
+ visibility: hidden;
14
+ overflow: hidden;
15
+ user-select: none;
16
+ pointer-events: none;
17
+ .vxe-table-var-default {
18
+ height: var(--vxe-ui-table-row-height-default);
19
+ }
20
+ .vxe-table-var-medium {
21
+ height: var(--vxe-ui-table-row-height-medium);
22
+ }
23
+ .vxe-table-var-small {
24
+ height: var(--vxe-ui-table-row-height-small);
25
+ }
26
+ .vxe-table-var-mini {
27
+ height: var(--vxe-ui-table-row-height-mini);
28
+ }
29
+ }
30
+
10
31
  .vxe-table--print-frame {
11
32
  position: fixed;
12
33
  bottom: -100%;