vxe-table 3.14.0-beta.0 → 3.14.0-beta.1

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 (50) hide show
  1. package/es/grid/src/grid.js +26 -13
  2. package/es/style.css +1 -1
  3. package/es/table/module/edit/mixin.js +1 -1
  4. package/es/table/module/keyboard/mixin.js +3 -2
  5. package/es/table/src/body.js +2 -2
  6. package/es/table/src/column.js +2 -2
  7. package/es/table/src/group.js +2 -2
  8. package/es/table/src/methods.js +7 -3
  9. package/es/table/src/table.js +1 -1
  10. package/es/toolbar/src/toolbar.js +2 -2
  11. package/es/ui/index.js +1 -1
  12. package/es/ui/src/log.js +1 -1
  13. package/lib/grid/src/grid.js +27 -26
  14. package/lib/grid/src/grid.min.js +1 -1
  15. package/lib/index.umd.js +51 -42
  16. package/lib/index.umd.min.js +1 -1
  17. package/lib/style.css +1 -1
  18. package/lib/table/module/edit/mixin.js +1 -1
  19. package/lib/table/module/edit/mixin.min.js +1 -1
  20. package/lib/table/module/keyboard/mixin.js +3 -2
  21. package/lib/table/module/keyboard/mixin.min.js +1 -1
  22. package/lib/table/src/body.js +2 -1
  23. package/lib/table/src/body.min.js +1 -1
  24. package/lib/table/src/column.js +3 -2
  25. package/lib/table/src/group.js +3 -2
  26. package/lib/table/src/methods.js +9 -3
  27. package/lib/table/src/methods.min.js +1 -1
  28. package/lib/table/src/table.js +1 -1
  29. package/lib/table/src/table.min.js +1 -1
  30. package/lib/toolbar/src/toolbar.js +3 -2
  31. package/lib/ui/index.js +1 -1
  32. package/lib/ui/index.min.js +1 -1
  33. package/lib/ui/src/log.js +1 -1
  34. package/lib/ui/src/log.min.js +1 -1
  35. package/package.json +2 -2
  36. package/packages/grid/src/grid.ts +28 -13
  37. package/packages/table/module/edit/mixin.ts +1 -1
  38. package/packages/table/module/keyboard/mixin.ts +6 -2
  39. package/packages/table/src/body.ts +2 -2
  40. package/packages/table/src/column.ts +2 -2
  41. package/packages/table/src/group.ts +2 -2
  42. package/packages/table/src/methods.ts +14 -9
  43. package/packages/table/src/table.ts +1 -1
  44. package/packages/toolbar/src/toolbar.ts +2 -2
  45. /package/es/{iconfont.1740732119954.ttf → iconfont.1741051885975.ttf} +0 -0
  46. /package/es/{iconfont.1740732119954.woff → iconfont.1741051885975.woff} +0 -0
  47. /package/es/{iconfont.1740732119954.woff2 → iconfont.1741051885975.woff2} +0 -0
  48. /package/lib/{iconfont.1740732119954.ttf → iconfont.1741051885975.ttf} +0 -0
  49. /package/lib/{iconfont.1740732119954.woff → iconfont.1741051885975.woff} +0 -0
  50. /package/lib/{iconfont.1740732119954.woff2 → iconfont.1741051885975.woff2} +0 -0
@@ -149,7 +149,7 @@ function renderForm(h, _vm) {
149
149
  if (hasForm) {
150
150
  return h('div', {
151
151
  key: 'form',
152
- ref: 'formWrapper',
152
+ ref: 'refFormWrapper',
153
153
  class: 'vxe-grid--form-wrapper'
154
154
  }, formSlot ? formSlot.call(_vm, { $grid: _vm }, h) : renderDefaultForm(h, _vm));
155
155
  }
@@ -165,7 +165,7 @@ function renderToolbar(h, _vm) {
165
165
  if (hasToolbar) {
166
166
  return h('div', {
167
167
  key: 'toolbar',
168
- ref: 'toolbarWrapper',
168
+ ref: 'refToolbarWrapper',
169
169
  class: 'vxe-grid--toolbar-wrapper'
170
170
  }, toolbarSlot
171
171
  ? toolbarSlot.call(_vm, { $grid: _vm }, h)
@@ -188,7 +188,7 @@ function renderTop(h, _vm) {
188
188
  return topSlot
189
189
  ? h('div', {
190
190
  key: 'top',
191
- ref: 'topWrapper',
191
+ ref: 'refTopWrapper',
192
192
  class: 'vxe-grid--top-wrapper'
193
193
  }, topSlot.call(_vm, { $grid: _vm }, h))
194
194
  : _e();
@@ -239,7 +239,7 @@ function renderBottom(h, _vm) {
239
239
  return bottomSlot
240
240
  ? h('div', {
241
241
  key: 'bottom',
242
- ref: 'bottomWrapper',
242
+ ref: 'refBottomWrapper',
243
243
  class: 'vxe-grid--bottom-wrapper'
244
244
  }, bottomSlot.call(_vm, { $grid: _vm }, h))
245
245
  : _e();
@@ -257,7 +257,7 @@ function renderPager(h, $xeGrid) {
257
257
  if (hasPager) {
258
258
  return h('div', {
259
259
  key: 'pager',
260
- ref: 'pagerWrapper',
260
+ ref: 'refPagerWrapper',
261
261
  class: 'vxe-grid--pager-wrapper'
262
262
  }, pagerSlot
263
263
  ? pagerSlot.call($xeGrid, { $grid: $xeGrid }, h)
@@ -579,6 +579,7 @@ export default {
579
579
  const vSize = $xeGrid.computeSize;
580
580
  const styles = $xeGrid.computeStyles;
581
581
  return h('div', {
582
+ ref: 'refElem',
582
583
  class: ['vxe-grid', {
583
584
  [`size--${vSize}`]: vSize,
584
585
  'is--animat': !!this.animat,
@@ -601,18 +602,30 @@ export default {
601
602
  }
602
603
  return [];
603
604
  },
604
- getParentHeight() {
605
- const { $el, isZMax } = this;
606
- return (isZMax ? getDomNode().visibleHeight : XEUtils.toNumber(getComputedStyle($el.parentNode).height)) - this.getExcludeHeight();
607
- },
608
605
  /**
609
606
  * 获取需要排除的高度
610
607
  */
611
608
  getExcludeHeight() {
612
- const { $refs, $el, isZMax, height } = this;
613
- const { formWrapper, toolbarWrapper, topWrapper, bottomWrapper, pagerWrapper } = $refs;
614
- const parentPaddingSize = isZMax || !(height === 'auto' || height === '100%') ? 0 : getPaddingTopBottomSize($el.parentNode);
615
- return parentPaddingSize + getPaddingTopBottomSize($el) + getOffsetHeight(formWrapper) + getOffsetHeight(toolbarWrapper) + getOffsetHeight(topWrapper) + getOffsetHeight(bottomWrapper) + getOffsetHeight(pagerWrapper);
609
+ const $xeGrid = this;
610
+ const reactData = $xeGrid;
611
+ const { isZMax } = reactData;
612
+ const el = $xeGrid.$refs.refElem;
613
+ const formWrapper = $xeGrid.$refs.refFormWrapper;
614
+ const toolbarWrapper = $xeGrid.$refs.refToolbarWrapper;
615
+ const topWrapper = $xeGrid.$refs.refTopWrapper;
616
+ const bottomWrapper = $xeGrid.$refs.refBottomWrapper;
617
+ const pagerWrapper = $xeGrid.$refs.refPagerWrapper;
618
+ const parentPaddingSize = isZMax ? 0 : getPaddingTopBottomSize(el.parentNode);
619
+ return parentPaddingSize + getPaddingTopBottomSize(el) + getOffsetHeight(formWrapper) + getOffsetHeight(toolbarWrapper) + getOffsetHeight(topWrapper) + getOffsetHeight(bottomWrapper) + getOffsetHeight(pagerWrapper);
620
+ },
621
+ getParentHeight() {
622
+ const $xeGrid = this;
623
+ const reactData = $xeGrid;
624
+ const el = $xeGrid.$refs.refElem;
625
+ if (el) {
626
+ return (reactData.isZMax ? getDomNode().visibleHeight : XEUtils.toNumber(getComputedStyle(el.parentNode).height)) - $xeGrid.getExcludeHeight();
627
+ }
628
+ return 0;
616
629
  },
617
630
  initToolbar() {
618
631
  this.$nextTick(() => {