vxe-pc-ui 3.20.7 → 3.20.9

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 (89) hide show
  1. package/es/card/src/card.js +2 -1
  2. package/es/drawer/src/drawer.js +1 -0
  3. package/es/icon/style.css +1 -1
  4. package/es/layout-aside/src/layout-aside.js +2 -1
  5. package/es/layout-body/src/layout-body.js +2 -1
  6. package/es/layout-container/src/layout-container.js +9 -2
  7. package/es/list/src/list.js +78 -47
  8. package/es/menu/src/menu.js +1 -0
  9. package/es/modal/src/modal.js +1 -0
  10. package/es/scrollbar/src/scrollbar.js +8 -0
  11. package/es/style.css +1 -1
  12. package/es/style.min.css +1 -1
  13. package/es/tabs/src/tabs.js +2 -1
  14. package/es/tooltip/src/tooltip.js +14 -6
  15. package/es/tree/src/tree.js +74 -44
  16. package/es/ui/index.js +1 -1
  17. package/es/ui/src/log.js +1 -1
  18. package/lib/card/src/card.js +1 -1
  19. package/lib/card/src/card.min.js +1 -1
  20. package/lib/drawer/src/drawer.js +1 -1
  21. package/lib/drawer/src/drawer.min.js +1 -1
  22. package/lib/icon/style/style.css +1 -1
  23. package/lib/icon/style/style.min.css +1 -1
  24. package/lib/index.umd.js +325 -139
  25. package/lib/index.umd.min.js +1 -1
  26. package/lib/layout-aside/src/layout-aside.js +1 -1
  27. package/lib/layout-aside/src/layout-aside.min.js +1 -1
  28. package/lib/layout-body/src/layout-body.js +1 -1
  29. package/lib/layout-body/src/layout-body.min.js +1 -1
  30. package/lib/layout-container/src/layout-container.js +13 -3
  31. package/lib/layout-container/src/layout-container.min.js +1 -1
  32. package/lib/list/src/list.js +72 -43
  33. package/lib/list/src/list.min.js +1 -1
  34. package/lib/menu/src/menu.js +1 -1
  35. package/lib/menu/src/menu.min.js +1 -1
  36. package/lib/modal/src/modal.js +1 -1
  37. package/lib/modal/src/modal.min.js +1 -1
  38. package/lib/scrollbar/src/scrollbar.js +8 -0
  39. package/lib/style.css +1 -1
  40. package/lib/style.min.css +1 -1
  41. package/lib/tabs/src/tabs.js +1 -1
  42. package/lib/tabs/src/tabs.min.js +1 -1
  43. package/lib/tooltip/src/tooltip.js +10 -6
  44. package/lib/tooltip/src/tooltip.min.js +1 -1
  45. package/lib/tree/src/tree.js +67 -39
  46. package/lib/tree/src/tree.min.js +1 -1
  47. package/lib/ui/index.js +1 -1
  48. package/lib/ui/index.min.js +1 -1
  49. package/lib/ui/src/log.js +1 -1
  50. package/lib/ui/src/log.min.js +1 -1
  51. package/package.json +2 -2
  52. package/packages/card/src/card.ts +4 -2
  53. package/packages/drawer/src/drawer.ts +4 -2
  54. package/packages/layout-aside/src/layout-aside.ts +4 -2
  55. package/packages/layout-body/src/layout-body.ts +4 -2
  56. package/packages/layout-container/src/layout-container.ts +13 -3
  57. package/packages/list/src/list.ts +84 -49
  58. package/packages/menu/src/menu.ts +3 -1
  59. package/packages/modal/src/modal.ts +3 -1
  60. package/packages/scrollbar/src/scrollbar.ts +8 -0
  61. package/packages/tabs/src/tabs.ts +4 -2
  62. package/packages/tooltip/src/tooltip.ts +17 -8
  63. package/packages/tree/src/tree.ts +80 -46
  64. package/types/components/card.d.ts +2 -2
  65. package/types/components/drawer.d.ts +2 -2
  66. package/types/components/grid.d.ts +3 -2
  67. package/types/components/layout-aside.d.ts +2 -2
  68. package/types/components/layout-body.d.ts +2 -2
  69. package/types/components/layout-container.d.ts +3 -1
  70. package/types/components/list.d.ts +2 -2
  71. package/types/components/menu.d.ts +2 -2
  72. package/types/components/modal.d.ts +2 -2
  73. package/types/components/scrollbar.d.ts +10 -0
  74. package/types/components/table.d.ts +9 -5
  75. package/types/components/tabs.d.ts +2 -2
  76. package/types/components/tooltip.d.ts +2 -2
  77. package/types/components/tree.d.ts +2 -2
  78. /package/es/icon/{iconfont.1792080131929.ttf → iconfont.1792139429655.ttf} +0 -0
  79. /package/es/icon/{iconfont.1792080131929.woff → iconfont.1792139429655.woff} +0 -0
  80. /package/es/icon/{iconfont.1792080131929.woff2 → iconfont.1792139429655.woff2} +0 -0
  81. /package/es/{iconfont.1792080131929.ttf → iconfont.1792139429655.ttf} +0 -0
  82. /package/es/{iconfont.1792080131929.woff → iconfont.1792139429655.woff} +0 -0
  83. /package/es/{iconfont.1792080131929.woff2 → iconfont.1792139429655.woff2} +0 -0
  84. /package/lib/icon/style/{iconfont.1792080131929.ttf → iconfont.1792139429655.ttf} +0 -0
  85. /package/lib/icon/style/{iconfont.1792080131929.woff → iconfont.1792139429655.woff} +0 -0
  86. /package/lib/icon/style/{iconfont.1792080131929.woff2 → iconfont.1792139429655.woff2} +0 -0
  87. /package/lib/{iconfont.1792080131929.ttf → iconfont.1792139429655.ttf} +0 -0
  88. /package/lib/{iconfont.1792080131929.woff → iconfont.1792139429655.woff} +0 -0
  89. /package/lib/{iconfont.1792080131929.woff2 → iconfont.1792139429655.woff2} +0 -0
@@ -12,7 +12,7 @@ import { moveRowAnimateToTb, clearRowAnimate } from '../../ui/src/anime'
12
12
  import VxeLoadingComponent from '../../loading'
13
13
  import VxeTooltipComponent from '../../tooltip'
14
14
 
15
- import type { TreeReactData, VxeTreeEmits, VxeTreeConstructor, VxeTreePropTypes, TreeInternalData, VxeTreeDefines, VxeTreePrivateMethods, VxeComponentSizeType, ValueOf, VxeTooltipInstance, VxeComponentStyleType, VxeScrollbarPropTypes } from '../../../types'
15
+ import type { TreeReactData, VxeTreeEmits, VxeTreeConstructor, VxeTreePropTypes, TreeInternalData, VxeTreeDefines, VxeTreePrivateMethods, VxeComponentSizeType, VxeComponentIsVScrollbar, ValueOf, VxeTooltipInstance, VxeComponentStyleType, VxeScrollbarPropTypes } from '../../../types'
16
16
 
17
17
  const { warnLog, errLog } = createComponentLog('tree')
18
18
 
@@ -619,7 +619,8 @@ function createInternalData (): TreeInternalData {
619
619
  export default /* define-vxe-component start */ defineVxeComponent({
620
620
  name: 'VxeTree',
621
621
  mixins: [
622
- globalMixins.sizeMixin
622
+ globalMixins.sizeMixin,
623
+ globalMixins.vScrollbarMixin
623
624
  ],
624
625
  props: {
625
626
  data: Array as PropType<VxeTreePropTypes.Data>,
@@ -772,13 +773,15 @@ export default /* define-vxe-component start */ defineVxeComponent({
772
773
  reactData,
773
774
  crossTreeDragNodeInfo: crossTreeDragNodeGlobal,
774
775
 
775
- reFlag: 0,
776
+ reLayoutFlag: 0,
777
+ reScrollFlag: 0,
776
778
  dataFlag: 0
777
779
  }
778
780
  },
779
781
  computed: {
780
782
  ...({} as {
781
- computeSize(): VxeComponentSizeType
783
+ computeSize(): VxeComponentSizeType,
784
+ computeIsVScrollbar(): VxeComponentIsVScrollbar
782
785
  }),
783
786
  computeTitleField () {
784
787
  const $xeTree = this
@@ -1692,8 +1695,14 @@ export default /* define-vxe-component start */ defineVxeComponent({
1692
1695
  updateScrollbar () {
1693
1696
  const $xeTree = this
1694
1697
 
1695
- $xeTree.updateThumbSize()
1696
- $xeTree.updateThumbOffset()
1698
+ const isVScrollbar = $xeTree.computeIsVScrollbar
1699
+ if (isVScrollbar) {
1700
+ return $xeTree.$nextTick().then(() => {
1701
+ $xeTree.updateThumbSize()
1702
+ $xeTree.updateThumbOffset()
1703
+ })
1704
+ }
1705
+ return Promise.resolve()
1697
1706
  },
1698
1707
  /**
1699
1708
  * 重新计算列表
@@ -1720,11 +1729,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
1720
1729
  const parentPaddingSize = getPaddingTopBottomSize(parentEl)
1721
1730
  reactData.parentHeight = Math.max(headHeight + footHeight + rowHeight, parentEl.clientHeight - parentPaddingSize - headHeight - footHeight)
1722
1731
  }
1723
- $xeTree.updateScrollbar()
1724
1732
  $xeTree.updateHeight()
1725
1733
  return $xeTree.computeScrollLoad().then(() => {
1726
1734
  $xeTree.updateHeight()
1727
1735
  $xeTree.updateYSpace()
1736
+ $xeTree.updateScrollbar()
1728
1737
  })
1729
1738
  }
1730
1739
  return $xeTree.$nextTick()
@@ -1763,7 +1772,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
1763
1772
  const reactData = $xeTree.reactData
1764
1773
  const internalData = $xeTree.internalData
1765
1774
 
1766
- const scrollBodyElem = evnt.target as HTMLDivElement
1775
+ const scrollBodyElem = evnt.currentTarget as HTMLDivElement
1767
1776
  const scrollTop = scrollBodyElem.scrollTop
1768
1777
  const scrollLeft = scrollBodyElem.scrollLeft
1769
1778
  const isX = scrollLeft !== internalData.lastScrollLeft
@@ -3452,6 +3461,29 @@ export default /* define-vxe-component start */ defineVxeComponent({
3452
3461
  },
3453
3462
 
3454
3463
  // 滚动条
3464
+ bindScrollbarResize () {
3465
+ const $xeTree = this
3466
+ const internalData = $xeTree.internalData
3467
+
3468
+ const isVScrollbar = $xeTree.computeIsVScrollbar
3469
+ const { scrollObserver } = internalData
3470
+ if (isVScrollbar) {
3471
+ if (!scrollObserver) {
3472
+ const el = $xeTree.$refs.refElem as HTMLDivElement
3473
+ const viewInnerEl = $xeTree.$refs.refVirtualSpaceElem as HTMLDivElement
3474
+ const scrollObserver = globalResize.create(() => {
3475
+ $xeTree.reScrollFlag++
3476
+ })
3477
+ if (el) {
3478
+ scrollObserver.observe(el)
3479
+ }
3480
+ if (viewInnerEl) {
3481
+ scrollObserver.observe(viewInnerEl)
3482
+ }
3483
+ internalData.scrollObserver = scrollObserver
3484
+ }
3485
+ }
3486
+ },
3455
3487
  updateThumbSize () {
3456
3488
  const $xeTree = this
3457
3489
  const reactData = $xeTree.reactData
@@ -4011,9 +4043,10 @@ export default /* define-vxe-component start */ defineVxeComponent({
4011
4043
  const slots = $xeTree.$scopedSlots
4012
4044
  const reactData = $xeTree.reactData
4013
4045
 
4014
- const { loading, trigger, showLine, useScrollbar } = props
4046
+ const { loading, trigger, showLine } = props
4015
4047
  const { bodyHeight, topSpaceHeight, treeList, tooltipStore, xThumbWidth, yThumbHeight } = reactData
4016
4048
  const vSize = $xeTree.computeSize
4049
+ const isVScrollbar = $xeTree.computeIsVScrollbar
4017
4050
  const radioOpts = $xeTree.computeRadioOpts
4018
4051
  const checkboxOpts = $xeTree.computeCheckboxOpts
4019
4052
  const loadingOpts = $xeTree.computeLoadingOpts
@@ -4046,17 +4079,17 @@ export default /* define-vxe-component start */ defineVxeComponent({
4046
4079
  ref: 'refElem',
4047
4080
  class: [
4048
4081
  'vxe-tree',
4049
- useScrollbar ? `ov-x--${scrollXVisible === false ? 'hidden' : 'visible'}` : '',
4050
- useScrollbar ? `ov-y--${scrollYVisible === false ? 'hidden' : 'visible'}` : '',
4051
- useScrollbar ? `sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}` : '',
4052
- useScrollbar ? `sy-pos--${scrollbarYToLeft ? 'left' : 'right'}` : '',
4082
+ isVScrollbar ? `ov-x--${scrollXVisible === false ? 'hidden' : 'visible'}` : '',
4083
+ isVScrollbar ? `ov-y--${scrollYVisible === false ? 'hidden' : 'visible'}` : '',
4084
+ isVScrollbar ? `sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}` : '',
4085
+ isVScrollbar ? `sy-pos--${scrollbarYToLeft ? 'left' : 'right'}` : '',
4053
4086
  {
4054
4087
  [`size--${vSize}`]: vSize,
4055
4088
  'show--line': showLine,
4056
- 'is--virtual-scrollbar': useScrollbar,
4057
- 'ov-padding': useScrollbar && scrollbarOpts.padding,
4058
- 'ov-x--auto-hide': useScrollbar && scrollXAutoHide,
4059
- 'ov-y--auto-hide': useScrollbar && scrollYAutoHide,
4089
+ 'is--virtual-scrollbar': isVScrollbar,
4090
+ 'ov-padding': isVScrollbar && scrollbarOpts.padding,
4091
+ 'ov-x--auto-hide': isVScrollbar && scrollXAutoHide,
4092
+ 'ov-y--auto-hide': isVScrollbar && scrollYAutoHide,
4060
4093
  'overflow-y': yThumbHeight,
4061
4094
  'overflow-x': xThumbWidth,
4062
4095
  'checkbox--highlight': checkboxOpts.highlight,
@@ -4084,6 +4117,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
4084
4117
  }
4085
4118
  }, [
4086
4119
  h('div', {
4120
+ ref: 'refVirtualSpaceElem',
4087
4121
  class: 'vxe-tree--y-space',
4088
4122
  style: {
4089
4123
  height: bodyHeight ? `${bodyHeight}px` : ''
@@ -4106,7 +4140,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
4106
4140
  /**
4107
4141
  * 滚动条
4108
4142
  */
4109
- useScrollbar
4143
+ isVScrollbar
4110
4144
  ? h('div', {
4111
4145
  class: scrollbarWrapperClss
4112
4146
  }, [
@@ -4252,53 +4286,65 @@ export default /* define-vxe-component start */ defineVxeComponent({
4252
4286
  height () {
4253
4287
  const $xeTree = this
4254
4288
 
4255
- $xeTree.reFlag++
4289
+ $xeTree.reLayoutFlag++
4256
4290
  },
4257
4291
  minHeight () {
4258
4292
  const $xeTree = this
4259
4293
 
4260
- $xeTree.reFlag++
4294
+ $xeTree.reLayoutFlag++
4261
4295
  },
4262
4296
  maxHeight () {
4263
4297
  const $xeTree = this
4264
4298
 
4265
- $xeTree.reFlag++
4299
+ $xeTree.reLayoutFlag++
4266
4300
  },
4267
- useScrollbar () {
4301
+ computeIsVScrollbar () {
4268
4302
  const $xeTree = this
4269
4303
 
4270
- $xeTree.reFlag++
4304
+ $xeTree.$nextTick(() => {
4305
+ $xeTree.bindScrollbarResize()
4306
+ $xeTree.$nextTick(() => {
4307
+ $xeTree.reLayoutFlag++
4308
+ })
4309
+ })
4271
4310
  },
4272
4311
  computeScrollYWidth () {
4273
4312
  const $xeTree = this
4274
4313
 
4275
- $xeTree.reFlag++
4314
+ $xeTree.reLayoutFlag++
4276
4315
  },
4277
4316
  computeScrollXHeight () {
4278
4317
  const $xeTree = this
4279
4318
 
4280
- $xeTree.reFlag++
4319
+ $xeTree.reLayoutFlag++
4281
4320
  },
4282
4321
  computeScrollXVisible () {
4283
4322
  const $xeTree = this
4284
4323
 
4285
4324
  $xeTree.$nextTick(() => {
4286
- $xeTree.reFlag++
4325
+ $xeTree.reLayoutFlag++
4287
4326
  })
4288
4327
  },
4289
4328
  computeScrollYVisible () {
4290
4329
  const $xeTree = this
4291
4330
 
4292
4331
  $xeTree.$nextTick(() => {
4293
- $xeTree.reFlag++
4332
+ $xeTree.reLayoutFlag++
4294
4333
  })
4295
4334
  },
4296
- reFlag () {
4335
+ reLayoutFlag () {
4297
4336
  const $xeTree = this
4298
4337
 
4299
4338
  $xeTree.recalculate().then(() => {
4300
4339
  $xeTree.recalculate()
4301
4340
  })
4341
+ },
4342
+ reScrollFlag () {
4343
+ const $xeTree = this
4344
+
4345
+ $xeTree.updateScrollbar().then(() => {
4346
+ $xeTree.updateScrollbar()
4347
+ })
4302
4348
  }
4303
4349
  },
4304
4350
  created () {
@@ -4316,7 +4362,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
4316
4362
  const props = $xeTree
4317
4363
  const internalData = $xeTree.internalData
4318
4364
 
4319
- const { transform, drag, menuConfig, showOverflow, lazy, loadMethod, autoResize, useScrollbar } = props
4365
+ const { transform, drag, menuConfig, showOverflow, lazy, loadMethod, autoResize } = props
4320
4366
  const dragOpts = $xeTree.computeDragOpts
4321
4367
  if (!showOverflow) {
4322
4368
  errLog('vxe.error.errProp', ['show-overflow=false', 'show-overflow=true'])
@@ -4337,25 +4383,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
4337
4383
  if (menuConfig && !VxeUIContextMenu) {
4338
4384
  errLog('vxe.error.reqComp', ['vxe-context-menu'])
4339
4385
  }
4340
- const el = $xeTree.$refs.refElem as HTMLDivElement
4341
- if (useScrollbar) {
4342
- const viewInnerEl = $xeTree.$refs.refVirtualBody as HTMLDivElement
4343
- const scrollObserver = globalResize.create(() => {
4344
- $xeTree.updateScrollbar()
4345
- })
4346
- if (el) {
4347
- scrollObserver.observe(el)
4348
- }
4349
- if (viewInnerEl) {
4350
- scrollObserver.observe(viewInnerEl)
4351
- }
4352
- internalData.scrollObserver = scrollObserver
4353
- }
4354
4386
  if (autoResize) {
4387
+ const el = $xeTree.$refs.refElem as HTMLDivElement
4355
4388
  const parentEl = $xeTree.getParentElem()
4356
4389
  const resizeObserver = globalResize.create(() => {
4357
4390
  if (props.autoResize) {
4358
- $xeTree.reFlag++
4391
+ $xeTree.reLayoutFlag++
4359
4392
  }
4360
4393
  })
4361
4394
  if (el) {
@@ -4367,9 +4400,10 @@ export default /* define-vxe-component start */ defineVxeComponent({
4367
4400
  internalData.resizeObserver = resizeObserver
4368
4401
  }
4369
4402
 
4370
- $xeTree.reFlag++
4403
+ $xeTree.reLayoutFlag++
4404
+ $xeTree.bindScrollbarResize()
4371
4405
  globalEvents.on($xeTree, 'resize', () => {
4372
- $xeTree.reFlag++
4406
+ $xeTree.reLayoutFlag++
4373
4407
  })
4374
4408
  },
4375
4409
  beforeDestroy () {
@@ -1,4 +1,4 @@
1
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, ValueOf, VxeComponentSizeType } from '@vxe-ui/core'
1
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentIsVScrollbar } from '@vxe-ui/core'
2
2
  import { VxeScrollbarProps } from './scrollbar'
3
3
 
4
4
  /* eslint-disable @typescript-eslint/no-empty-interface,no-use-before-define,@typescript-eslint/ban-types */
@@ -26,7 +26,7 @@ export namespace VxeCardPropTypes {
26
26
  export type Shadow = boolean
27
27
  export type Padding = boolean
28
28
  export type Size = VxeComponentSizeType
29
- export type UseScrollbar = boolean
29
+ export type UseScrollbar = VxeComponentIsVScrollbar
30
30
  export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
31
31
  /**
32
32
  * 滚动条宽度
@@ -1,5 +1,5 @@
1
1
  import { CreateElement } from 'vue'
2
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, VxeComponentSizeType, VxeComponentSlotType, ValueOf } from '@vxe-ui/core'
2
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, VxeComponentSizeType, VxeComponentSlotType, ValueOf, VxeComponentIsVScrollbar } from '@vxe-ui/core'
3
3
  import { VxeScrollbarProps } from './scrollbar'
4
4
 
5
5
  /* eslint-disable @typescript-eslint/no-empty-interface,no-use-before-define,@typescript-eslint/ban-types */
@@ -68,7 +68,7 @@ export namespace VxeDrawerPropTypes {
68
68
  export type Padding = boolean
69
69
  export type BeforeHideMethod = (params: VxeDrawerDefines.DrawerVisibleParams) => Promise<any>
70
70
  export type Slots = VxeDrawerSlots
71
- export type UseScrollbar = boolean
71
+ export type UseScrollbar = VxeComponentIsVScrollbar
72
72
  export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
73
73
  /**
74
74
  * 滚动条宽度
@@ -1,6 +1,6 @@
1
1
  import { CreateElement } from 'vue'
2
2
  import { NormalizedScopedSlot } from 'vue/types/vnode'
3
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, VxeComponentSizeType, VxeComponentSlotType, ValueOf } from '@vxe-ui/core'
3
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, VxeComponentSizeType, VxeComponentIsVScrollbar, VxeComponentSlotType, ValueOf } from '@vxe-ui/core'
4
4
  import { VxeToolbarProps, VxeToolbarPropTypes, VxeToolbarSlotTypes } from './toolbar'
5
5
  import { VxeTableDefines, VxeTableEmits, VxeTableConstructor, VxeTableProps, TableMethods, VxeTableSlotTypes } from './table'
6
6
  import { VxeColumnPropTypes } from './column'
@@ -461,7 +461,8 @@ export interface VxeGridProps<D = any> extends VxeTableProps<D> {
461
461
  }
462
462
 
463
463
  export interface GridPrivateComputed<D = any> {
464
- computeSize: VxeGridPropTypes.Size
464
+ computeSize: VxeComponentSizeType
465
+ computeIsVScrollbar: VxeComponentIsVScrollbar
465
466
  computeProxyOpts: VxeGridPropTypes.ProxyConfig<D>
466
467
  computePagerOpts: VxeGridPropTypes.PagerConfig
467
468
  computeFormOpts: VxeGridPropTypes.FormConfig
@@ -1,4 +1,4 @@
1
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentStyleType } from '@vxe-ui/core'
1
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentStyleType, VxeComponentIsVScrollbar } from '@vxe-ui/core'
2
2
  import { VxeScrollbarProps } from './scrollbar'
3
3
 
4
4
  /* eslint-disable @typescript-eslint/no-empty-interface,no-use-before-define,@typescript-eslint/ban-types */
@@ -29,7 +29,7 @@ export namespace VxeLayoutAsidePropTypes {
29
29
  */
30
30
  animation?: boolean
31
31
  }
32
- export type UseScrollbar = boolean
32
+ export type UseScrollbar = VxeComponentIsVScrollbar
33
33
  export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
34
34
  /**
35
35
  * 滚动条宽度
@@ -1,4 +1,4 @@
1
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, ValueOf, VxeComponentSizeType } from '@vxe-ui/core'
1
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentIsVScrollbar } from '@vxe-ui/core'
2
2
  import { VxeBacktopProps, VxeBacktopSlotTypes } from './backtop'
3
3
  import { VxeScrollbarProps } from './scrollbar'
4
4
 
@@ -24,7 +24,7 @@ export namespace VxeLayoutBodyPropTypes {
24
24
  export type Padding = boolean
25
25
  export type ShowBacktop = boolean
26
26
  export interface BacktopConfig extends Omit<VxeBacktopProps, 'target'> {}
27
- export type UseScrollbar = boolean
27
+ export type UseScrollbar = VxeComponentIsVScrollbar
28
28
  export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
29
29
  /**
30
30
  * 滚动条宽度
@@ -1,4 +1,4 @@
1
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, ValueOf, VxeComponentSizeType } from '@vxe-ui/core'
1
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentIsVScrollbar } from '@vxe-ui/core'
2
2
 
3
3
  /* eslint-disable @typescript-eslint/no-empty-interface,no-use-before-define,@typescript-eslint/ban-types */
4
4
 
@@ -17,11 +17,13 @@ export interface VxeLayoutContainerPrivateRef extends LayoutContainerPrivateRef
17
17
 
18
18
  export namespace VxeLayoutContainerPropTypes {
19
19
  export type Size = VxeComponentSizeType
20
+ export type UseScrollbar = VxeComponentIsVScrollbar
20
21
  export type Vertical = boolean
21
22
  }
22
23
 
23
24
  export interface VxeLayoutContainerProps {
24
25
  size?: VxeLayoutContainerPropTypes.Size
26
+ useScrollbar?: VxeLayoutContainerPropTypes.UseScrollbar
25
27
  vertical?: VxeLayoutContainerPropTypes.Vertical
26
28
  }
27
29
 
@@ -1,4 +1,4 @@
1
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, VxeComponentSizeType, ValueOf } from '@vxe-ui/core'
1
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, VxeComponentSizeType, ValueOf, VxeComponentIsVScrollbar } from '@vxe-ui/core'
2
2
  import { VxeContextMenuPropTypes, VxeContextMenuDefines } from './context-menu'
3
3
  import { VxeScrollbarProps } from './scrollbar'
4
4
 
@@ -219,7 +219,7 @@ export namespace VxeListPropTypes {
219
219
  */
220
220
  enabled?: boolean
221
221
  }
222
- export type UseScrollbar = boolean
222
+ export type UseScrollbar = VxeComponentIsVScrollbar
223
223
  export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible'> {
224
224
  /**
225
225
  * 滚动条宽度
@@ -1,5 +1,5 @@
1
1
  import { CreateElement } from 'vue'
2
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentStyleType, VxeComponentPermissionCodeType, VxeComponentSlotType } from '@vxe-ui/core'
2
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentStyleType, VxeComponentPermissionCodeType, VxeComponentSlotType, VxeComponentIsVScrollbar } from '@vxe-ui/core'
3
3
  import { VxeLinkPropTypes } from './link'
4
4
  import { VxeContextMenuPropTypes, VxeContextMenuDefines } from './context-menu'
5
5
  import { VxeScrollbarProps } from './scrollbar'
@@ -80,7 +80,7 @@ export namespace VxeMenuPropTypes {
80
80
  }): boolean
81
81
  }
82
82
  export type AppendTo = string | HTMLElement | ((params: {}) => string | HTMLElement)
83
- export type UseScrollbar = boolean
83
+ export type UseScrollbar = VxeComponentIsVScrollbar
84
84
  export interface ScrollbarConfig extends VxeScrollbarProps {}
85
85
  }
86
86
 
@@ -1,5 +1,5 @@
1
1
  import { CreateElement } from 'vue'
2
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentSizeType, VxeComponentEventParams, ValueOf, VxeComponentSlotType } from '@vxe-ui/core'
2
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentSizeType, VxeComponentEventParams, ValueOf, VxeComponentSlotType, VxeComponentIsVScrollbar } from '@vxe-ui/core'
3
3
  import { VxeScrollbarProps } from './scrollbar'
4
4
 
5
5
  /* eslint-disable @typescript-eslint/no-empty-interface,no-use-before-define,@typescript-eslint/ban-types */
@@ -121,7 +121,7 @@ export namespace VxeModalPropTypes {
121
121
  type: ModalEventTypes
122
122
  }) => Promise<any>
123
123
  export type Slots = VxeModalSlots
124
- export type UseScrollbar = boolean
124
+ export type UseScrollbar = VxeComponentIsVScrollbar
125
125
  export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
126
126
  /**
127
127
  * 滚动条宽度
@@ -70,7 +70,15 @@ export namespace VxeScrollbarPropTypes {
70
70
  export type ViewStyle = VxeComponentStyleType
71
71
  export type ViewClassName = string
72
72
  export type ViewInnerClassName = string
73
+ /**
74
+ * 已废弃
75
+ * @deprecated
76
+ */
73
77
  export type AutoResize = boolean
78
+ /**
79
+ * 已废弃
80
+ * @deprecated
81
+ */
74
82
  export type SyncResize = boolean
75
83
  }
76
84
 
@@ -161,10 +169,12 @@ export interface VxeScrollbarProps {
161
169
  viewInnerClassName?: VxeScrollbarPropTypes.ViewInnerClassName
162
170
  /**
163
171
  * 自动监听元素的变化去重新计算样式
172
+ * @deprecated
164
173
  */
165
174
  autoResize?: VxeScrollbarPropTypes.AutoResize
166
175
  /**
167
176
  * 自动跟随某个属性的变化去重新计算表格,和手动调用 recalculate 方法是一样的效果(对于通过某个属性来更新内容时可能会用到)
177
+ * @deprecated
168
178
  */
169
179
  syncResize?: VxeScrollbarPropTypes.SyncResize
170
180
  }
@@ -1,6 +1,6 @@
1
1
  import { VNode, CreateElement } from 'vue'
2
2
  import { NormalizedScopedSlot } from 'vue/types/vnode'
3
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, VxeComponentSizeType, ValueOf, VxeGlobalConfig, VxeComponentStyleType, VxeComponentSlotType, VxeGlobalRendererOptions } from '@vxe-ui/core'
3
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, VxeComponentSizeType, ValueOf, VxeGlobalConfig, VxeComponentStyleType, VxeComponentSlotType, VxeGlobalRendererOptions, VxeComponentIsVScrollbar } from '@vxe-ui/core'
4
4
  import { VxeColumnPropTypes, VxeColumnProps, VxeColumnSlotTypes } from './column'
5
5
  import { VxeTableExtendCellAreaDefines, VxeTableExtendCellAreaEmits } from './table-plugins'
6
6
  import { VxeGridConstructor, VxeGridPrivateMethods } from './grid'
@@ -1392,6 +1392,10 @@ export namespace VxeTablePropTypes {
1392
1392
  * 是否显示底部按钮
1393
1393
  */
1394
1394
  showFooter?: boolean
1395
+ /**
1396
+ * 使用虚拟滚动条
1397
+ */
1398
+ useScrollbar?: VxeTooltipPropTypes.UseScrollbar
1395
1399
  }
1396
1400
  export interface FilterOpts<D = VxeTablePropTypes.Row> extends FilterConfig<D> { }
1397
1401
 
@@ -2987,7 +2991,7 @@ export namespace VxeTablePropTypes {
2987
2991
  */
2988
2992
  overscrollBehavior?: 'contain' | 'none' | ''
2989
2993
  }
2990
- export type UseScrollbar = boolean
2994
+ export type UseScrollbar = VxeComponentIsVScrollbar
2991
2995
  /**
2992
2996
  * 滚动条配置项
2993
2997
  */
@@ -3965,7 +3969,8 @@ export interface VxeTableProps<D = any> {
3965
3969
  }
3966
3970
 
3967
3971
  export interface TablePrivateComputed<D = any> {
3968
- computeSize: VxeTablePropTypes.Size
3972
+ computeSize: VxeComponentSizeType
3973
+ computeIsVScrollbar: VxeComponentIsVScrollbar
3969
3974
  computeTableId: string
3970
3975
  computeRowField: string
3971
3976
  computeEditDirtyOpts: VxeTablePropTypes.EditDirtyConfig
@@ -6010,7 +6015,7 @@ export interface TablePrivateMethods<D = any> {
6010
6015
  * 内部方法
6011
6016
  * @private
6012
6017
  */
6013
- updateScrollbar(): void
6018
+ updateScrollbar(): Promise<void>
6014
6019
  /**
6015
6020
  * 内部方法
6016
6021
  * @private
@@ -6359,7 +6364,6 @@ export namespace VxeTableDefines {
6359
6364
  style: any
6360
6365
  column: VxeTableDefines.ColumnInfo | null | undefined
6361
6366
  visible: boolean
6362
- maxHeight: number | string | null
6363
6367
  }
6364
6368
 
6365
6369
  export interface HistoryStackObj<D = any> {
@@ -1,4 +1,4 @@
1
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, ValueOf, VxeComponentSizeType } from '@vxe-ui/core'
1
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentIsVScrollbar } from '@vxe-ui/core'
2
2
  import { VxeTabPaneProps, VxeTabPaneDefines, VxeTabPanePropTypes } from './tab-pane'
3
3
  import { VxeScrollbarProps } from './scrollbar'
4
4
 
@@ -106,7 +106,7 @@ export namespace VxeTabsPropTypes {
106
106
  option: Omit<VxeTabPaneProps, 'slots'>
107
107
  }) => boolean
108
108
  }
109
- export type UseScrollbar = boolean
109
+ export type UseScrollbar = VxeComponentIsVScrollbar
110
110
  export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
111
111
  /**
112
112
  * 滚动条宽度
@@ -1,4 +1,4 @@
1
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, VxeComponentSizeType, VxeComponentStyleType, ValueOf } from '@vxe-ui/core'
1
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, VxeComponentSizeType, VxeComponentStyleType, ValueOf, VxeComponentIsVScrollbar } from '@vxe-ui/core'
2
2
  import { VxeIconPropTypes } from './icon'
3
3
  import { VxeScrollbarProps } from './scrollbar'
4
4
 
@@ -42,7 +42,7 @@ export namespace VxeTooltipPropTypes {
42
42
  export type LeaveMethod = (params: { $event: MouseEvent }) => boolean
43
43
  export type AppendTo = string | HTMLElement | ((params: {}) => string | HTMLElement)
44
44
  export type Transfer = boolean
45
- export type UseScrollbar = boolean
45
+ export type UseScrollbar = VxeComponentIsVScrollbar
46
46
  export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
47
47
  /**
48
48
  * 滚动条宽度
@@ -1,4 +1,4 @@
1
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, VxeComponentSizeType, ValueOf } from '@vxe-ui/core'
1
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, VxeComponentSizeType, ValueOf, VxeComponentIsVScrollbar } from '@vxe-ui/core'
2
2
  import { VxeContextMenuPropTypes, VxeContextMenuDefines } from './context-menu'
3
3
  import { VxeTooltipPropTypes } from './tooltip'
4
4
  import { VxeScrollbarProps } from './scrollbar'
@@ -325,7 +325,7 @@ export namespace VxeTreePropTypes {
325
325
  */
326
326
  enabled?: boolean
327
327
  }
328
- export type UseScrollbar = boolean
328
+ export type UseScrollbar = VxeComponentIsVScrollbar
329
329
  export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible'> {
330
330
  /**
331
331
  * 滚动条宽度