pro-design-vue 1.3.5 → 1.3.7

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 (96) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.js +107 -90
  3. package/dist/index.full.min.js +8 -8
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +8 -8
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +107 -90
  8. package/es/components/table/src/components/Body/Body.vue.d.ts +0 -18
  9. package/es/components/table/src/components/Body/EditInput.vue.d.ts +1 -1
  10. package/es/components/table/src/components/Form/Form.d.ts +9 -0
  11. package/es/components/table/src/components/InteralTable.vue.d.ts +28 -18
  12. package/es/components/table/src/components/Table.d.ts +9 -0
  13. package/es/components/table/src/components/ToolBar/FullscreenIcon.vue.d.ts +1 -1
  14. package/es/components/table/src/components/ToolBar/ToolBar.vue.d.ts +1 -1
  15. package/es/components/table/src/components/interface.d.ts +13 -0
  16. package/es/index.d.ts +14 -0
  17. package/es/packages/components/table/src/components/Body/Body.vue.mjs +2 -3
  18. package/es/packages/components/table/src/components/Body/Body.vue.mjs.map +1 -1
  19. package/es/packages/components/table/src/components/Body/Body.vue2.mjs +5 -6
  20. package/es/packages/components/table/src/components/Body/Body.vue2.mjs.map +1 -1
  21. package/es/packages/components/table/src/components/Body/BodyCell.mjs +1 -0
  22. package/es/packages/components/table/src/components/Body/BodyCell.mjs.map +1 -1
  23. package/es/packages/components/table/src/components/Body/BodyCellTooltip.mjs +8 -9
  24. package/es/packages/components/table/src/components/Body/BodyCellTooltip.mjs.map +1 -1
  25. package/es/packages/components/table/src/components/Form/Form.mjs +7 -2
  26. package/es/packages/components/table/src/components/Form/Form.mjs.map +1 -1
  27. package/es/packages/components/table/src/components/Header/HeaderCell.vue.mjs.map +1 -1
  28. package/es/packages/components/table/src/components/Header/HeaderCell.vue2.mjs +1 -0
  29. package/es/packages/components/table/src/components/Header/HeaderCell.vue2.mjs.map +1 -1
  30. package/es/packages/components/table/src/components/Header/HeaderRowsWrap.vue.mjs +3 -4
  31. package/es/packages/components/table/src/components/Header/HeaderRowsWrap.vue.mjs.map +1 -1
  32. package/es/packages/components/table/src/components/Header/HeaderRowsWrap.vue2.mjs.map +1 -1
  33. package/es/packages/components/table/src/components/InteralTable.vue.mjs +5 -2
  34. package/es/packages/components/table/src/components/InteralTable.vue.mjs.map +1 -1
  35. package/es/packages/components/table/src/components/InteralTable.vue2.mjs +8 -2
  36. package/es/packages/components/table/src/components/InteralTable.vue2.mjs.map +1 -1
  37. package/es/packages/components/table/src/components/Scrollbar/XScroll.mjs +2 -2
  38. package/es/packages/components/table/src/components/Scrollbar/XScroll.mjs.map +1 -1
  39. package/es/packages/components/table/src/components/Table.mjs +61 -53
  40. package/es/packages/components/table/src/components/Table.mjs.map +1 -1
  41. package/es/packages/components/table/src/components/ToolBar/FullscreenIcon.vue.mjs.map +1 -1
  42. package/es/packages/components/table/src/components/ToolBar/FullscreenIcon.vue2.mjs +4 -11
  43. package/es/packages/components/table/src/components/ToolBar/FullscreenIcon.vue2.mjs.map +1 -1
  44. package/es/packages/components/table/src/components/interface.mjs +4 -0
  45. package/es/packages/components/table/src/components/interface.mjs.map +1 -1
  46. package/es/packages/components/table/src/hooks/useColumns.mjs.map +1 -1
  47. package/es/version.d.ts +1 -1
  48. package/es/version.mjs +1 -1
  49. package/es/version.mjs.map +1 -1
  50. package/lib/components/table/src/components/Body/Body.vue.d.ts +0 -18
  51. package/lib/components/table/src/components/Body/EditInput.vue.d.ts +1 -1
  52. package/lib/components/table/src/components/Form/Form.d.ts +9 -0
  53. package/lib/components/table/src/components/InteralTable.vue.d.ts +28 -18
  54. package/lib/components/table/src/components/Table.d.ts +9 -0
  55. package/lib/components/table/src/components/ToolBar/FullscreenIcon.vue.d.ts +1 -1
  56. package/lib/components/table/src/components/ToolBar/ToolBar.vue.d.ts +1 -1
  57. package/lib/components/table/src/components/interface.d.ts +13 -0
  58. package/lib/index.d.ts +14 -0
  59. package/lib/packages/components/table/src/components/Body/Body.vue.js +1 -2
  60. package/lib/packages/components/table/src/components/Body/Body.vue.js.map +1 -1
  61. package/lib/packages/components/table/src/components/Body/Body.vue2.js +5 -6
  62. package/lib/packages/components/table/src/components/Body/Body.vue2.js.map +1 -1
  63. package/lib/packages/components/table/src/components/Body/BodyCell.js +1 -0
  64. package/lib/packages/components/table/src/components/Body/BodyCell.js.map +1 -1
  65. package/lib/packages/components/table/src/components/Body/BodyCellTooltip.js +8 -9
  66. package/lib/packages/components/table/src/components/Body/BodyCellTooltip.js.map +1 -1
  67. package/lib/packages/components/table/src/components/Form/Form.js +7 -2
  68. package/lib/packages/components/table/src/components/Form/Form.js.map +1 -1
  69. package/lib/packages/components/table/src/components/Header/HeaderCell.vue.js.map +1 -1
  70. package/lib/packages/components/table/src/components/Header/HeaderCell.vue2.js +1 -0
  71. package/lib/packages/components/table/src/components/Header/HeaderCell.vue2.js.map +1 -1
  72. package/lib/packages/components/table/src/components/Header/HeaderRowsWrap.vue.js +3 -4
  73. package/lib/packages/components/table/src/components/Header/HeaderRowsWrap.vue.js.map +1 -1
  74. package/lib/packages/components/table/src/components/Header/HeaderRowsWrap.vue2.js.map +1 -1
  75. package/lib/packages/components/table/src/components/InteralTable.vue.js +5 -2
  76. package/lib/packages/components/table/src/components/InteralTable.vue.js.map +1 -1
  77. package/lib/packages/components/table/src/components/InteralTable.vue2.js +8 -2
  78. package/lib/packages/components/table/src/components/InteralTable.vue2.js.map +1 -1
  79. package/lib/packages/components/table/src/components/Scrollbar/XScroll.js +2 -2
  80. package/lib/packages/components/table/src/components/Scrollbar/XScroll.js.map +1 -1
  81. package/lib/packages/components/table/src/components/Table.js +59 -51
  82. package/lib/packages/components/table/src/components/Table.js.map +1 -1
  83. package/lib/packages/components/table/src/components/ToolBar/FullscreenIcon.vue.js.map +1 -1
  84. package/lib/packages/components/table/src/components/ToolBar/FullscreenIcon.vue2.js +3 -10
  85. package/lib/packages/components/table/src/components/ToolBar/FullscreenIcon.vue2.js.map +1 -1
  86. package/lib/packages/components/table/src/components/interface.js +4 -0
  87. package/lib/packages/components/table/src/components/interface.js.map +1 -1
  88. package/lib/packages/components/table/src/hooks/useColumns.js.map +1 -1
  89. package/lib/version.d.ts +1 -1
  90. package/lib/version.js +1 -1
  91. package/lib/version.js.map +1 -1
  92. package/package.json +1 -1
  93. package/theme-chalk/index.css +1 -1
  94. package/theme-chalk/src/table/bordered.less +13 -6
  95. package/theme-chalk/src/table/size.less +1 -0
  96. package/theme-chalk/src/table/table.less +17 -11
@@ -1,4 +1,4 @@
1
- /*! Pro Design Vue v1.3.5 */
1
+ /*! Pro Design Vue v1.3.7 */
2
2
 
3
3
  import { Modal, theme as theme$1, ConfigProvider, App, Button as Button$1, Tooltip, Popconfirm, Dropdown, Menu, Slider, Drawer, Input, InputNumber, Form as Form$1, Space, Textarea, Select, TreeSelect, Checkbox as Checkbox$1, CheckboxGroup, RadioGroup, Radio as Radio$1, Cascader, Switch, Rate, DatePicker, RangePicker, TimePicker, TimeRangePicker, Upload, FormItemRest, Spin, message, Row as Row$1, Col, FormItem as FormItem$1, Steps, Popover, MenuItem, SubMenu, Empty, Badge, Tag, Pagination, InputSearch, Tree, Card, Tabs, TabPane } from 'ant-design-vue';
4
4
  import { inject, ref, getCurrentInstance, nextTick, h, reactive, defineComponent, createVNode, isVNode, Fragment, cloneVNode, provide, watch, computed, renderSlot, createPropsRestProxy, createBlock, openBlock, unref, mergeProps, withCtx, normalizeProps, guardReactiveProps, shallowRef, shallowReadonly, toValue, getCurrentScope, onScopeDispose, onMounted, hasInjectionContext, isRef, toRefs as toRefs$1, customRef, toRef as toRef$1, readonly, watchEffect, toRaw, createElementBlock, createCommentVNode, resolveDynamicComponent, createElementVNode, normalizeStyle, toDisplayString, normalizeClass, createSlots, createTextVNode, useAttrs, useTemplateRef, Teleport, onUnmounted, Comment as Comment$1, useSlots, useModel, withModifiers, mergeModels, renderList, camelize, isReactive, onActivated, onDeactivated, onBeforeUnmount, triggerRef, resolveDirective, withDirectives, vShow, render as render$1, resolveComponent, vModelText } from 'vue';
@@ -30,7 +30,7 @@ const SCROLL_FIXED_CLASS = `_scroll__fixed_`;
30
30
  const DEFAULT_NAMESPACE = "pro";
31
31
  const DEFAULT_LOCALE = "zh-CN";
32
32
 
33
- const version$1 = "1.3.5";
33
+ const version$1 = "1.3.7";
34
34
 
35
35
  const makeInstaller = (components = []) => {
36
36
  const install = (app) => {
@@ -24025,6 +24025,10 @@ const baseTableProps = () => ({
24025
24025
  type: Object,
24026
24026
  default: void 0
24027
24027
  },
24028
+ autoHeight: {
24029
+ type: [Boolean, Function],
24030
+ default: false
24031
+ },
24028
24032
  rangeSelection: {
24029
24033
  type: [String, Boolean],
24030
24034
  default: false
@@ -28990,6 +28994,7 @@ var XScroll = /* @__PURE__ */ defineComponent({
28990
28994
  };
28991
28995
  return style;
28992
28996
  });
28997
+ const isApple = isMacOsUserAgent() || isIOSUserAgent();
28993
28998
  const stickyStyle = computed(() => {
28994
28999
  const scrollBarSize = `-${tableContext.scrollBarSize.value || 15}px`;
28995
29000
  const horizontalScrollSticky = tableContext.props.horizontalScrollSticky;
@@ -29003,12 +29008,11 @@ var XScroll = /* @__PURE__ */ defineComponent({
29003
29008
  position: "sticky",
29004
29009
  "z-index": 8,
29005
29010
  bottom: `${bottom}px`,
29006
- marginTop: scrollBarSize
29011
+ marginTop: isApple ? scrollBarSize : 0
29007
29012
  };
29008
29013
  }
29009
29014
  return {};
29010
29015
  });
29011
- const isApple = isMacOsUserAgent() || isIOSUserAgent();
29012
29016
  const isIosScroll = computed(() => 0 === tableContext.scrollBarSize.value && isApple);
29013
29017
  const rootClass = computed(() => ({
29014
29018
  [`${prefixCls.value}-horizontal-scroll`]: true,
@@ -30671,6 +30675,7 @@ var _sfc_main$w = defineComponent({
30671
30675
  return Object.assign(
30672
30676
  {
30673
30677
  [`${prefixCls}-cell`]: true,
30678
+ [`${prefixCls}-first-cell`]: props.column.columnIndex === 0,
30674
30679
  [`${prefixCls}-header-cell`]: true,
30675
30680
  [column.class || ""]: true,
30676
30681
  [column.className || ""]: true,
@@ -31828,12 +31833,11 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
31828
31833
  createElementVNode(
31829
31834
  "div",
31830
31835
  {
31831
- class: normalizeClass(`${_ctx.prefixCls}-cell-shadow-right`),
31832
- style: normalizeStyle(_ctx.shadowRightStyle)
31836
+ class: normalizeClass(`${_ctx.prefixCls}-cell-shadow-right`)
31833
31837
  },
31834
31838
  null,
31835
- 6
31836
- /* CLASS, STYLE */
31839
+ 2
31840
+ /* CLASS */
31837
31841
  ),
31838
31842
  createVNode(_component_HeaderRows, {
31839
31843
  "prefix-cls": _ctx.prefixCls,
@@ -32643,24 +32647,23 @@ var BodyCellTooltip = /* @__PURE__ */ defineComponent({
32643
32647
  range.setStart(firstChild, 0);
32644
32648
  range.setEnd(firstChild, firstChild.childNodes.length);
32645
32649
  let rangeWidth = range.getBoundingClientRect().width;
32646
- let rangeHeight = range.getBoundingClientRect().height;
32647
32650
  rangeWidth - Math.floor(rangeWidth) < 1e-3 && (rangeWidth = Math.floor(rangeWidth));
32648
- rangeHeight - Math.floor(rangeHeight) < 1e-3 && (rangeHeight = Math.floor(rangeHeight));
32649
32651
  const {
32650
32652
  pLeft,
32651
- pRight,
32652
- pTop,
32653
- pBottom
32653
+ pRight
32654
+ // pTop: pTop,
32655
+ // pBottom: pBottom,
32654
32656
  } = ((child) => {
32655
32657
  const styles = window.getComputedStyle(child, null);
32656
32658
  return {
32657
32659
  pLeft: Number.parseInt(styles.paddingLeft, 10) || 0,
32658
- pRight: Number.parseInt(styles.paddingRight, 10) || 0,
32659
- pTop: Number.parseInt(styles.paddingTop, 10) || 0,
32660
- pBottom: Number.parseInt(styles.paddingBottom, 10) || 0
32660
+ pRight: Number.parseInt(styles.paddingRight, 10) || 0
32661
+ // pTop: Number.parseInt(styles.paddingTop, 10) || 0,
32662
+ // pBottom: Number.parseInt(styles.paddingBottom, 10) || 0,
32661
32663
  };
32662
32664
  })(firstChild);
32663
- return rangeWidth + (pLeft + pRight) > firstChild.offsetWidth || rangeHeight + (pTop + pBottom) > firstChild.offsetHeight || firstChild.scrollWidth > firstChild.offsetWidth;
32665
+ return rangeWidth + (pLeft + pRight) > firstChild.offsetWidth || // rangeHeight + (pTop + pBottom) > firstChild.offsetHeight ||
32666
+ firstChild.scrollWidth > firstChild.offsetWidth;
32664
32667
  };
32665
32668
  watch(() => props.open, (newValue) => {
32666
32669
  if (newValue) {
@@ -32994,6 +32997,7 @@ const BodyCell = (props, { slots, emit }) => {
32994
32997
  const cellPosition = { rowIndex: props.flattenRowIndex, rowPinned: null, column };
32995
32998
  const cellClass = {
32996
32999
  [`${prefixCls}-cell`]: true,
33000
+ [`${prefixCls}-first-cell`]: column.columnIndex === 0,
32997
33001
  [`${prefixCls}-body-cell`]: true,
32998
33002
  [`${prefixCls}-cell-multi`]: cellRowSpan > 1,
32999
33003
  [`${prefixCls}-cell-hidden`]: cellRowSpan === 0,
@@ -34335,7 +34339,7 @@ var _sfc_main$h = defineComponent({
34335
34339
  Empty,
34336
34340
  RenderVNode,
34337
34341
  RenderSlot,
34338
- HorizontalScroll: XScroll,
34342
+ // HorizontalScroll: XScroll,
34339
34343
  YScroll
34340
34344
  },
34341
34345
  directives: { resize },
@@ -34631,8 +34635,8 @@ var _sfc_main$h = defineComponent({
34631
34635
  return {
34632
34636
  width,
34633
34637
  minWidth: width,
34634
- maxWidth: width,
34635
- height: `${viewportHeight.value}px`
34638
+ maxWidth: width
34639
+ // height: `${viewportHeight.value}px`,
34636
34640
  };
34637
34641
  });
34638
34642
  const rightStyle = computed(() => {
@@ -34640,8 +34644,8 @@ var _sfc_main$h = defineComponent({
34640
34644
  return {
34641
34645
  width,
34642
34646
  minWidth: width,
34643
- maxWidth: width,
34644
- height: `${viewportHeight.value}px`
34647
+ maxWidth: width
34648
+ // height: `${viewportHeight.value}px`,
34645
34649
  };
34646
34650
  });
34647
34651
  const summaryClass = computed(() => ({
@@ -34800,7 +34804,6 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
34800
34804
  const _component_BodyRows = resolveComponent("BodyRows");
34801
34805
  const _component_Empty = resolveComponent("Empty");
34802
34806
  const _component_YScroll = resolveComponent("YScroll");
34803
- const _component_HorizontalScroll = resolveComponent("HorizontalScroll");
34804
34807
  const _directive_resize = resolveDirective("resize");
34805
34808
  return openBlock(), createElementBlock(
34806
34809
  Fragment,
@@ -35336,7 +35339,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
35336
35339
  _: 1
35337
35340
  /* STABLE */
35338
35341
  }),
35339
- createVNode(_component_HorizontalScroll)
35342
+ createCommentVNode(" <HorizontalScroll /> ")
35340
35343
  ],
35341
35344
  64
35342
35345
  /* STABLE_FRAGMENT */
@@ -35357,7 +35360,8 @@ var _sfc_main$g = defineComponent({
35357
35360
  PopupContainer,
35358
35361
  AutoHeightHeader,
35359
35362
  ProHeader: Header,
35360
- ProBody: Body
35363
+ ProBody: Body,
35364
+ HorizontalScroll: XScroll
35361
35365
  },
35362
35366
  props: baseTableProps(),
35363
35367
  emits: [
@@ -35431,9 +35435,10 @@ var _sfc_main$g = defineComponent({
35431
35435
  });
35432
35436
  const scrollTop = ref(0);
35433
35437
  const scrollLeft = ref(0);
35434
- const rootRef = ref();
35435
35438
  const bodyWidth = ref(0);
35436
35439
  const bodyHeight = ref(0);
35440
+ const rootRef = ref();
35441
+ const paginationRef = ref();
35437
35442
  const measureWidthRef = shallowRef();
35438
35443
  const mergedScrollX = eagerComputed(() => {
35439
35444
  var _a, _b;
@@ -36131,6 +36136,8 @@ var _sfc_main$g = defineComponent({
36131
36136
  scrollTo,
36132
36137
  scrollLeft,
36133
36138
  scrollTop,
36139
+ rootRef,
36140
+ paginationRef,
36134
36141
  bodyRef: computed(() => {
36135
36142
  var _a;
36136
36143
  return (_a = bodyRef.value) == null ? void 0 : _a.bodyRef;
@@ -36196,6 +36203,7 @@ var _sfc_main$g = defineComponent({
36196
36203
  measureWidthRef,
36197
36204
  flattenData,
36198
36205
  rootRef,
36206
+ paginationRef,
36199
36207
  mergedSummaryFixed,
36200
36208
  handleResize: (e) => {
36201
36209
  realHeaderHeight.value = e.detail.height;
@@ -36225,6 +36233,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
36225
36233
  const _component_AutoHeightHeader = resolveComponent("AutoHeightHeader");
36226
36234
  const _component_ProHeader = resolveComponent("ProHeader");
36227
36235
  const _component_ProBody = resolveComponent("ProBody");
36236
+ const _component_HorizontalScroll = resolveComponent("HorizontalScroll");
36228
36237
  const _component_PopupContainer = resolveComponent("PopupContainer");
36229
36238
  const _component_Spin = resolveComponent("Spin");
36230
36239
  const _component_MeasureWidth = resolveComponent("MeasureWidth");
@@ -36263,7 +36272,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
36263
36272
  "div",
36264
36273
  {
36265
36274
  key: "content",
36266
- ref: "ref",
36275
+ ref: "rootRef",
36267
36276
  class: normalizeClass(_ctx.rootClass),
36268
36277
  style: normalizeStyle(_ctx.rootStyle)
36269
36278
  },
@@ -36308,6 +36317,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
36308
36317
  6
36309
36318
  /* CLASS, STYLE */
36310
36319
  ),
36320
+ createVNode(_component_HorizontalScroll),
36311
36321
  createElementVNode(
36312
36322
  "div",
36313
36323
  {
@@ -36341,8 +36351,9 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
36341
36351
  "div",
36342
36352
  {
36343
36353
  key: 2,
36354
+ ref: "paginationRef",
36344
36355
  style: normalizeStyle(_ctx.bottomPaginationStyle),
36345
- class: normalizeClass(`${_ctx.prefixCls}-pagination-wrap`),
36356
+ class: normalizeClass(`${_ctx.prefixCls}-pagination-wrap ${_ctx.prefixCls}-pagination-wrap-${_ctx.size}`),
36346
36357
  onResizeheight: _cache[5] || (_cache[5] = (...args) => _ctx.handlePaginationResize && _ctx.handlePaginationResize(...args))
36347
36358
  },
36348
36359
  [
@@ -36505,15 +36516,8 @@ var _sfc_main$d = defineComponent({
36505
36516
  props: { prefixCls: String },
36506
36517
  setup() {
36507
36518
  const intl = useIntl();
36508
- const fullscreen = ref(false);
36509
- onMounted(() => {
36510
- if (!isBrowser$1()) {
36511
- return;
36512
- }
36513
- document.onfullscreenchange = () => {
36514
- fullscreen.value = !!document.fullscreenElement;
36515
- };
36516
- });
36519
+ const counter = useInjectContainer();
36520
+ const fullscreen = computed(() => counter.hasFullScreen.value);
36517
36521
  return {
36518
36522
  h,
36519
36523
  intl,
@@ -37717,6 +37721,10 @@ var FormRender = /* @__PURE__ */ defineComponent({
37717
37721
  onSearchTabChange: {
37718
37722
  type: Function,
37719
37723
  default: void 0
37724
+ },
37725
+ onCollapse: {
37726
+ type: Function,
37727
+ default: void 0
37720
37728
  }
37721
37729
  },
37722
37730
  setup: (props, {
@@ -37761,7 +37769,7 @@ var FormRender = /* @__PURE__ */ defineComponent({
37761
37769
  "items": props.items,
37762
37770
  "loading": props.loading,
37763
37771
  "style": {
37764
- marginBlockEnd: ((_a2 = props.search) == null ? void 0 : _a2.cardProps) !== false && props.tableShowCard ? 0 : "30px",
37772
+ marginBlockEnd: ((_a2 = props.search) == null ? void 0 : _a2.cardProps) !== false && props.tableShowCard ? 0 : "16px",
37765
37773
  ...(_b2 = props.search) == null ? void 0 : _b2.style
37766
37774
  },
37767
37775
  "onReset": props.onReset,
@@ -37777,7 +37785,8 @@ var FormRender = /* @__PURE__ */ defineComponent({
37777
37785
  },
37778
37786
  "onInit": (values) => {
37779
37787
  submit(values, true);
37780
- }
37788
+ },
37789
+ "onCollapse": props.onCollapse
37781
37790
  }), slots);
37782
37791
  if (((_c2 = props.search) == null ? void 0 : _c2.cardProps) !== false && props.tableShowCard) {
37783
37792
  return createVNode(Card, mergeProps({
@@ -37817,7 +37826,6 @@ var Table = /* @__PURE__ */ defineComponent({
37817
37826
  const tableRef = ref();
37818
37827
  const {
37819
37828
  table,
37820
- prefixCls: antPrefixCls,
37821
37829
  dark
37822
37830
  } = useProConfigInject();
37823
37831
  const prefixCls = usePrefixCls("table");
@@ -38105,6 +38113,23 @@ var Table = /* @__PURE__ */ defineComponent({
38105
38113
  setMergeShowAlert(false);
38106
38114
  }
38107
38115
  });
38116
+ const tableHeight = ref(props.height);
38117
+ const calcTableHeight = async () => {
38118
+ var _a2, _b2, _c, _d, _e, _f, _g;
38119
+ if (props.autoHeight || counter.hasFullScreen.value) {
38120
+ await nextTick();
38121
+ const height = window.innerHeight - (((_c = (_b2 = (_a2 = tableRef.value) == null ? void 0 : _a2.rootRef) == null ? void 0 : _b2.getBoundingClientRect()) == null ? void 0 : _c.top) || 0) - (((_f = (_e = (_d = tableRef.value) == null ? void 0 : _d.paginationRef) == null ? void 0 : _e.getBoundingClientRect()) == null ? void 0 : _f.height) || 0);
38122
+ tableHeight.value = typeof props.autoHeight === "function" ? (_g = props.autoHeight) == null ? void 0 : _g.call(props, height) : height;
38123
+ } else {
38124
+ tableHeight.value = props.height;
38125
+ }
38126
+ };
38127
+ watch(() => counter.tableSize.value, () => {
38128
+ calcTableHeight();
38129
+ });
38130
+ onMounted(() => {
38131
+ calcTableHeight();
38132
+ });
38108
38133
  expose({
38109
38134
  scrollTo: (pos, behavior) => {
38110
38135
  var _a2;
@@ -38122,6 +38147,14 @@ var Table = /* @__PURE__ */ defineComponent({
38122
38147
  var _a2;
38123
38148
  return unref((_a2 = tableRef.value) == null ? void 0 : _a2.bodyRef);
38124
38149
  }),
38150
+ rootRef: computed(() => {
38151
+ var _a2;
38152
+ return unref((_a2 = tableRef.value) == null ? void 0 : _a2.rootRef);
38153
+ }),
38154
+ paginationRef: computed(() => {
38155
+ var _a2;
38156
+ return unref((_a2 = tableRef.value) == null ? void 0 : _a2.paginationRef);
38157
+ }),
38125
38158
  copySelectedRange: () => {
38126
38159
  var _a2;
38127
38160
  return (_a2 = tableRef.value) == null ? void 0 : _a2.copySelectedRange();
@@ -38152,10 +38185,11 @@ var Table = /* @__PURE__ */ defineComponent({
38152
38185
  return (_a2 = tableRef.value) == null ? void 0 : _a2.closeEditor(cellInfos);
38153
38186
  },
38154
38187
  reload,
38155
- reset
38188
+ reset,
38189
+ calcTableHeight
38156
38190
  });
38157
38191
  return () => {
38158
- var _a2, _b2, _c, _d, _e;
38192
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i;
38159
38193
  const {
38160
38194
  expandIcon = slots.expandIcon,
38161
38195
  expandedRowRender = slots.expandedRowRender
@@ -38170,17 +38204,8 @@ var Table = /* @__PURE__ */ defineComponent({
38170
38204
  "actionsRef": {
38171
38205
  ...actions,
38172
38206
  fullScreen: () => {
38173
- var _a3;
38174
- if (!counter.rootDomRef.value || !document.fullscreenEnabled) {
38175
- return;
38176
- }
38177
- if (document.fullscreenElement) {
38178
- document.exitFullscreen();
38179
- counter.hasFullScreen.value = false;
38180
- } else {
38181
- (_a3 = counter.rootDomRef.value) == null ? void 0 : _a3.requestFullscreen();
38182
- counter.hasFullScreen.value = true;
38183
- }
38207
+ counter.hasFullScreen.value = !counter.hasFullScreen.value;
38208
+ calcTableHeight();
38184
38209
  }
38185
38210
  },
38186
38211
  "tableColumn": tableColumn.value,
@@ -38213,6 +38238,8 @@ var Table = /* @__PURE__ */ defineComponent({
38213
38238
  }), createVNode(InteralTable, mergeProps({
38214
38239
  "ref": tableRef
38215
38240
  }, omit(props, ["onChange", "onUpdate:pagination", "onUpdate:selectedRowKeys", "onUpdate:columns"]), {
38241
+ "height": tableHeight.value,
38242
+ "virtual": !!props.autoHeight || !!counter.hasFullScreen.value || props.virtual,
38216
38243
  "prefixCls": mergedPrefixCls.value,
38217
38244
  "columns": mergeColumns || [],
38218
38245
  "size": counter.tableSize.value,
@@ -38240,43 +38267,33 @@ var Table = /* @__PURE__ */ defineComponent({
38240
38267
  default: () => [_tableDom]
38241
38268
  });
38242
38269
  }
38243
- return createVNode(ConfigProvider, {
38244
- "prefixCls": antPrefixCls == null ? void 0 : antPrefixCls.value,
38245
- "getPopupContainer": () => {
38246
- if (counter.hasFullScreen.value && counter.rootDomRef.value) {
38247
- return counter.rootDomRef.value;
38248
- }
38249
- return document.body;
38250
- }
38251
- }, {
38252
- default: () => {
38253
- var _a3, _b3, _c2, _d2;
38254
- return [createVNode("div", mergeProps({
38255
- "ref": counter.rootDomRef
38256
- }, attrs, {
38257
- "class": [`${mergedPrefixCls.value}-wrapper ${props.bordered ? mergedPrefixCls.value + "-wrapper-bordered" : ""} ${"dark" === theme.value ? mergedPrefixCls.value + "-wrapper-dark" : ""} ${pollingLoading.value ? mergedPrefixCls.value + "-wrapper-polling" : ""}`, attrs.class],
38258
- "onKeydown": onKeydown
38259
- }), [props.search !== false && !!((_a3 = formItems.value) == null ? void 0 : _a3.length) && createVNode(FormRender, {
38260
- "prefixCls": mergedPrefixCls.value,
38261
- "items": formItems.value,
38262
- "cardBordered": (_d2 = (_c2 = props.cardBordered) != null ? _c2 : (_b3 = table == null ? void 0 : table.value) == null ? void 0 : _b3.cardBordered) != null ? _d2 : dark == null ? void 0 : dark.value,
38263
- "search": props.search,
38264
- "tableShowCard": props.cardProps !== false,
38265
- "loading": formSubmitLoading.value,
38266
- "beforeSearchSubmit": props.beforeSearchSubmit,
38267
- "manual": props.manual || props.manualRequest,
38268
- "onReset": props.onReset,
38269
- "onSubmit": props.onSubmit,
38270
- "onFormSearchSubmit": onFormSearchSubmit,
38271
- "onSearchTabChange": (newValues) => {
38272
- actions.setFormSearch({
38273
- ...actions.formSearch.value,
38274
- ...newValues
38275
- });
38276
- }
38277
- }, slots), tableDom])];
38278
- }
38279
- });
38270
+ return createVNode("div", mergeProps({
38271
+ "ref": counter.rootDomRef
38272
+ }, attrs, {
38273
+ "class": [`${mergedPrefixCls.value}-wrapper ${props.bordered ? mergedPrefixCls.value + "-wrapper-bordered" : ""} ${"dark" === theme.value ? mergedPrefixCls.value + "-wrapper-dark" : ""} ${pollingLoading.value ? mergedPrefixCls.value + "-wrapper-polling" : ""}`, {
38274
+ [`${mergedPrefixCls.value}-maximize`]: counter.hasFullScreen.value
38275
+ }, attrs.class],
38276
+ "onKeydown": onKeydown
38277
+ }), [props.search !== false && !!((_f = formItems.value) == null ? void 0 : _f.length) && createVNode(FormRender, {
38278
+ "prefixCls": mergedPrefixCls.value,
38279
+ "items": formItems.value,
38280
+ "cardBordered": (_i = (_h = props.cardBordered) != null ? _h : (_g = table == null ? void 0 : table.value) == null ? void 0 : _g.cardBordered) != null ? _i : dark == null ? void 0 : dark.value,
38281
+ "search": props.search,
38282
+ "tableShowCard": props.cardProps !== false,
38283
+ "loading": formSubmitLoading.value,
38284
+ "beforeSearchSubmit": props.beforeSearchSubmit,
38285
+ "manual": props.manual || props.manualRequest,
38286
+ "onReset": props.onReset,
38287
+ "onSubmit": props.onSubmit,
38288
+ "onFormSearchSubmit": onFormSearchSubmit,
38289
+ "onSearchTabChange": (newValues) => {
38290
+ actions.setFormSearch({
38291
+ ...actions.formSearch.value,
38292
+ ...newValues
38293
+ });
38294
+ },
38295
+ "onCollapse": calcTableHeight
38296
+ }, slots), tableDom]);
38280
38297
  };
38281
38298
  }
38282
38299
  });
@@ -2160,24 +2160,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
2160
2160
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & (import("vue").AllowedComponentProps & (import("vue").ComponentCustomProps & import("vue").Plugin<any[], any[]>));
2161
2161
  RenderVNode: import("vue").FunctionalComponent<any, {}, any, {}>;
2162
2162
  RenderSlot: import("vue").FunctionalComponent<any, {}, any, {}>;
2163
- HorizontalScroll: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2164
- onlyAutoShow: {
2165
- type: BooleanConstructor;
2166
- };
2167
- notShowAuto: {
2168
- type: BooleanConstructor;
2169
- };
2170
- }>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
2171
- onlyAutoShow: {
2172
- type: BooleanConstructor;
2173
- };
2174
- notShowAuto: {
2175
- type: BooleanConstructor;
2176
- };
2177
- }>> & Readonly<{}>, {
2178
- onlyAutoShow: boolean;
2179
- notShowAuto: boolean;
2180
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2181
2163
  YScroll: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2182
2164
  onlyAutoShow: {
2183
2165
  type: BooleanConstructor;
@@ -94,9 +94,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
94
94
  onCloseEditor?: ((...args: any[]) => any) | undefined;
95
95
  }>, {
96
96
  record: any;
97
+ autoHeight: boolean;
97
98
  multiple: boolean;
98
99
  column: FinallyColumnType<import("../interface").DefaultRecordType>;
99
- autoHeight: boolean;
100
100
  customEditable: boolean;
101
101
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
102
102
  export default _default;
@@ -38,6 +38,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
38
38
  type: PropType<(params: any) => void>;
39
39
  default: undefined;
40
40
  };
41
+ onCollapse: {
42
+ type: PropType<(val: boolean) => void>;
43
+ default: undefined;
44
+ };
41
45
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
42
46
  prefixCls: StringConstructor;
43
47
  items: {
@@ -75,12 +79,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
75
79
  type: PropType<(params: any) => void>;
76
80
  default: undefined;
77
81
  };
82
+ onCollapse: {
83
+ type: PropType<(val: boolean) => void>;
84
+ default: undefined;
85
+ };
78
86
  }>> & Readonly<{}>, {
79
87
  loading: boolean;
80
88
  search: SearchConfig;
81
89
  onReset: ((formData?: import("pro-design-vue").Entity | undefined) => void) | undefined;
82
90
  onSubmit: ((formData: import("pro-design-vue").Entity) => Promise<boolean | void> | boolean | void) | undefined;
83
91
  items: ProFormItemType[];
92
+ onCollapse: (val: boolean) => void;
84
93
  beforeSearchSubmit: (params: Partial<any>) => any;
85
94
  cardBordered: Bordered;
86
95
  manual: boolean;
@@ -303,6 +303,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
303
303
  }>;
304
304
  default: undefined;
305
305
  };
306
+ autoHeight: {
307
+ type: import("vue").PropType<boolean | ((autoHeight: number) => number)>;
308
+ default: boolean;
309
+ };
306
310
  rangeSelection: {
307
311
  type: import("vue").PropType<boolean | "single">;
308
312
  default: boolean;
@@ -527,6 +531,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
527
531
  measureWidthRef: import("vue").ShallowRef<HTMLDivElement | undefined, HTMLDivElement | undefined>;
528
532
  flattenData: import("vue").Ref<import("./interface").FlatRecord<DefaultRecordType>[], import("./interface").FlatRecord<DefaultRecordType>[]>;
529
533
  rootRef: import("vue").Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
534
+ paginationRef: import("vue").Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
530
535
  mergedSummaryFixed: import("vue").ComputedRef<boolean | "top" | "bottom">;
531
536
  handleResize: (e: CustomEvent) => void;
532
537
  handlePaginationResize: (e: CustomEvent) => void;
@@ -825,6 +830,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
825
830
  }>;
826
831
  default: undefined;
827
832
  };
833
+ autoHeight: {
834
+ type: import("vue").PropType<boolean | ((autoHeight: number) => number)>;
835
+ default: boolean;
836
+ };
828
837
  rangeSelection: {
829
838
  type: import("vue").PropType<boolean | "single">;
830
839
  default: boolean;
@@ -1122,6 +1131,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1122
1131
  onOpenChange: import("vue").PropType<(vis: boolean) => void>;
1123
1132
  'onUpdate:open': import("vue").PropType<(vis: boolean) => void>;
1124
1133
  }>>;
1134
+ autoHeight: boolean | ((autoHeight: number) => number);
1125
1135
  rangeSelection: boolean | "single";
1126
1136
  copyDelimiter: string;
1127
1137
  summaryFixed: import("./interface").SummaryFixed;
@@ -18423,24 +18433,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
18423
18433
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & (import("vue").AllowedComponentProps & (import("vue").ComponentCustomProps & import("vue").Plugin<any[], any[]>));
18424
18434
  RenderVNode: import("vue").FunctionalComponent<any, {}, any, {}>;
18425
18435
  RenderSlot: import("vue").FunctionalComponent<any, {}, any, {}>;
18426
- HorizontalScroll: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
18427
- onlyAutoShow: {
18428
- type: BooleanConstructor;
18429
- };
18430
- notShowAuto: {
18431
- type: BooleanConstructor;
18432
- };
18433
- }>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
18434
- onlyAutoShow: {
18435
- type: BooleanConstructor;
18436
- };
18437
- notShowAuto: {
18438
- type: BooleanConstructor;
18439
- };
18440
- }>> & Readonly<{}>, {
18441
- onlyAutoShow: boolean;
18442
- notShowAuto: boolean;
18443
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
18444
18436
  YScroll: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
18445
18437
  onlyAutoShow: {
18446
18438
  type: BooleanConstructor;
@@ -18462,6 +18454,24 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
18462
18454
  }, {
18463
18455
  resize: import("vue").Directive;
18464
18456
  }, string, import("vue").ComponentProvideOptions, true, {}, any>;
18457
+ HorizontalScroll: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
18458
+ onlyAutoShow: {
18459
+ type: BooleanConstructor;
18460
+ };
18461
+ notShowAuto: {
18462
+ type: BooleanConstructor;
18463
+ };
18464
+ }>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
18465
+ onlyAutoShow: {
18466
+ type: BooleanConstructor;
18467
+ };
18468
+ notShowAuto: {
18469
+ type: BooleanConstructor;
18470
+ };
18471
+ }>> & Readonly<{}>, {
18472
+ onlyAutoShow: boolean;
18473
+ notShowAuto: boolean;
18474
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
18465
18475
  }, {
18466
18476
  resize: import("vue").Directive;
18467
18477
  }, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -346,6 +346,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
346
346
  }>;
347
347
  default: undefined;
348
348
  };
349
+ autoHeight: {
350
+ type: import("vue").PropType<boolean | ((autoHeight: number) => number)>;
351
+ default: boolean;
352
+ };
349
353
  rangeSelection: {
350
354
  type: import("vue").PropType<boolean | "single">;
351
355
  default: boolean;
@@ -837,6 +841,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
837
841
  }>;
838
842
  default: undefined;
839
843
  };
844
+ autoHeight: {
845
+ type: import("vue").PropType<boolean | ((autoHeight: number) => number)>;
846
+ default: boolean;
847
+ };
840
848
  rangeSelection: {
841
849
  type: import("vue").PropType<boolean | "single">;
842
850
  default: boolean;
@@ -1168,6 +1176,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1168
1176
  onOpenChange: import("vue").PropType<(vis: boolean) => void>;
1169
1177
  'onUpdate:open': import("vue").PropType<(vis: boolean) => void>;
1170
1178
  }>>;
1179
+ autoHeight: boolean | ((autoHeight: number) => number);
1171
1180
  rangeSelection: boolean | "single";
1172
1181
  copyDelimiter: string;
1173
1182
  summaryFixed: import("./interface").SummaryFixed;
@@ -4,7 +4,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
4
4
  }>, {
5
5
  h: typeof h;
6
6
  intl: import("pro-design-vue").IntlType;
7
- fullscreen: import("vue").Ref<boolean, boolean>;
7
+ fullscreen: import("vue").ComputedRef<boolean>;
8
8
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
9
9
  prefixCls: StringConstructor;
10
10
  }>> & Readonly<{}>, {}, {}, {
@@ -5408,7 +5408,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
5408
5408
  }>, {
5409
5409
  h: typeof h;
5410
5410
  intl: import("pro-design-vue").IntlType;
5411
- fullscreen: import("vue").Ref<boolean, boolean>;
5411
+ fullscreen: import("vue").ComputedRef<boolean>;
5412
5412
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
5413
5413
  prefixCls: StringConstructor;
5414
5414
  }>> & Readonly<{}>, {}, {}, {