vxe-pc-ui 4.20.8 → 4.20.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 (144) hide show
  1. package/dist/all.esm.js +2041 -2125
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/card/src/card.js +8 -6
  5. package/es/date-panel/src/date-panel.js +58 -36
  6. package/es/date-panel/style.css +22 -20
  7. package/es/date-panel/style.min.css +1 -1
  8. package/es/drawer/src/drawer.js +7 -5
  9. package/es/icon/style.css +1 -1
  10. package/es/icon-picker/src/icon-picker.js +74 -38
  11. package/es/icon-picker/style.css +9 -3
  12. package/es/icon-picker/style.min.css +1 -1
  13. package/es/layout-aside/src/layout-aside.js +6 -4
  14. package/es/layout-body/src/layout-body.js +6 -4
  15. package/es/layout-container/src/layout-container.js +11 -3
  16. package/es/list/src/list.js +81 -208
  17. package/es/menu/src/menu.js +7 -5
  18. package/es/modal/src/modal.js +7 -5
  19. package/es/scrollbar/src/scrollbar.js +28 -173
  20. package/es/select/src/select.js +243 -8
  21. package/es/select/style.css +44 -0
  22. package/es/select/style.min.css +1 -1
  23. package/es/style.css +1 -1
  24. package/es/style.min.css +1 -1
  25. package/es/tabs/src/tabs.js +5 -4
  26. package/es/tooltip/src/tooltip.js +7 -5
  27. package/es/tooltip/style.css +2 -0
  28. package/es/tooltip/style.min.css +1 -1
  29. package/es/tree/src/tree.js +86 -212
  30. package/es/ui/index.js +1 -1
  31. package/es/ui/src/log.js +1 -1
  32. package/es/vxe-date-panel/style.css +22 -20
  33. package/es/vxe-date-panel/style.min.css +1 -1
  34. package/es/vxe-icon-picker/style.css +9 -3
  35. package/es/vxe-icon-picker/style.min.css +1 -1
  36. package/es/vxe-select/style.css +44 -0
  37. package/es/vxe-select/style.min.css +1 -1
  38. package/es/vxe-tooltip/style.css +2 -0
  39. package/es/vxe-tooltip/style.min.css +1 -1
  40. package/lib/card/src/card.js +9 -6
  41. package/lib/card/src/card.min.js +1 -1
  42. package/lib/date-panel/src/date-panel.js +56 -34
  43. package/lib/date-panel/src/date-panel.min.js +1 -1
  44. package/lib/date-panel/style/style.css +22 -20
  45. package/lib/date-panel/style/style.min.css +1 -1
  46. package/lib/drawer/src/drawer.js +7 -4
  47. package/lib/drawer/src/drawer.min.js +1 -1
  48. package/lib/icon/style/style.css +1 -1
  49. package/lib/icon/style/style.min.css +1 -1
  50. package/lib/icon-picker/src/icon-picker.js +101 -45
  51. package/lib/icon-picker/src/icon-picker.min.js +1 -1
  52. package/lib/icon-picker/style/style.css +9 -3
  53. package/lib/icon-picker/style/style.min.css +1 -1
  54. package/lib/index.umd.js +1049 -859
  55. package/lib/index.umd.min.js +1 -1
  56. package/lib/layout-aside/src/layout-aside.js +7 -4
  57. package/lib/layout-aside/src/layout-aside.min.js +1 -1
  58. package/lib/layout-body/src/layout-body.js +7 -4
  59. package/lib/layout-body/src/layout-body.min.js +1 -1
  60. package/lib/layout-container/src/layout-container.js +20 -4
  61. package/lib/layout-container/src/layout-container.min.js +1 -1
  62. package/lib/list/src/list.js +95 -232
  63. package/lib/list/src/list.min.js +1 -1
  64. package/lib/menu/src/menu.js +8 -4
  65. package/lib/menu/src/menu.min.js +1 -1
  66. package/lib/modal/src/modal.js +7 -4
  67. package/lib/modal/src/modal.min.js +1 -1
  68. package/lib/scrollbar/src/scrollbar.js +42 -199
  69. package/lib/scrollbar/src/scrollbar.min.js +1 -1
  70. package/lib/select/src/select.js +315 -68
  71. package/lib/select/src/select.min.js +1 -1
  72. package/lib/select/style/style.css +44 -0
  73. package/lib/select/style/style.min.css +1 -1
  74. package/lib/style.css +1 -1
  75. package/lib/style.min.css +1 -1
  76. package/lib/tabs/src/tabs.js +6 -5
  77. package/lib/tabs/src/tabs.min.js +1 -1
  78. package/lib/tooltip/src/tooltip.js +7 -4
  79. package/lib/tooltip/src/tooltip.min.js +1 -1
  80. package/lib/tooltip/style/style.css +2 -0
  81. package/lib/tooltip/style/style.min.css +1 -1
  82. package/lib/tree/src/tree.js +101 -235
  83. package/lib/tree/src/tree.min.js +1 -1
  84. package/lib/ui/index.js +1 -1
  85. package/lib/ui/index.min.js +1 -1
  86. package/lib/ui/src/log.js +1 -1
  87. package/lib/ui/src/log.min.js +1 -1
  88. package/lib/vxe-date-panel/style/style.css +22 -20
  89. package/lib/vxe-date-panel/style/style.min.css +1 -1
  90. package/lib/vxe-icon-picker/style/style.css +9 -3
  91. package/lib/vxe-icon-picker/style/style.min.css +1 -1
  92. package/lib/vxe-select/style/style.css +44 -0
  93. package/lib/vxe-select/style/style.min.css +1 -1
  94. package/lib/vxe-tooltip/style/style.css +2 -0
  95. package/lib/vxe-tooltip/style/style.min.css +1 -1
  96. package/package.json +2 -2
  97. package/packages/card/src/card.ts +8 -6
  98. package/packages/date-panel/src/date-panel.ts +58 -36
  99. package/packages/drawer/src/drawer.ts +7 -5
  100. package/packages/icon-picker/src/icon-picker.ts +80 -38
  101. package/packages/layout-aside/src/layout-aside.ts +6 -4
  102. package/packages/layout-body/src/layout-body.ts +6 -4
  103. package/packages/layout-container/src/layout-container.ts +13 -3
  104. package/packages/list/src/list.ts +98 -224
  105. package/packages/menu/src/menu.ts +7 -5
  106. package/packages/modal/src/modal.ts +7 -5
  107. package/packages/scrollbar/src/scrollbar.ts +44 -189
  108. package/packages/select/src/select.ts +278 -8
  109. package/packages/tabs/src/tabs.ts +5 -4
  110. package/packages/tooltip/src/tooltip.ts +7 -5
  111. package/packages/tree/src/tree.ts +103 -228
  112. package/styles/components/date-panel.scss +31 -29
  113. package/styles/components/icon-picker.scss +9 -3
  114. package/styles/components/select.scss +77 -0
  115. package/styles/components/tooltip.scss +1 -0
  116. package/types/components/card.d.ts +2 -2
  117. package/types/components/drawer.d.ts +2 -2
  118. package/types/components/gantt-module/gantt-view.d.ts +7 -16
  119. package/types/components/grid.d.ts +3 -1
  120. package/types/components/icon-picker.d.ts +21 -1
  121. package/types/components/layout-aside.d.ts +2 -2
  122. package/types/components/layout-body.d.ts +2 -2
  123. package/types/components/layout-container.d.ts +3 -1
  124. package/types/components/list.d.ts +6 -2
  125. package/types/components/menu.d.ts +2 -2
  126. package/types/components/modal.d.ts +2 -2
  127. package/types/components/scrollbar.d.ts +17 -14
  128. package/types/components/select.d.ts +28 -3
  129. package/types/components/table.d.ts +28 -22
  130. package/types/components/tabs.d.ts +2 -2
  131. package/types/components/tooltip.d.ts +2 -2
  132. package/types/components/tree.d.ts +8 -17
  133. /package/es/icon/{iconfont.1792115566662.ttf → iconfont.1792219842406.ttf} +0 -0
  134. /package/es/icon/{iconfont.1792115566662.woff → iconfont.1792219842406.woff} +0 -0
  135. /package/es/icon/{iconfont.1792115566662.woff2 → iconfont.1792219842406.woff2} +0 -0
  136. /package/es/{iconfont.1792115566662.ttf → iconfont.1792219842406.ttf} +0 -0
  137. /package/es/{iconfont.1792115566662.woff → iconfont.1792219842406.woff} +0 -0
  138. /package/es/{iconfont.1792115566662.woff2 → iconfont.1792219842406.woff2} +0 -0
  139. /package/lib/icon/style/{iconfont.1792115566662.ttf → iconfont.1792219842406.ttf} +0 -0
  140. /package/lib/icon/style/{iconfont.1792115566662.woff → iconfont.1792219842406.woff} +0 -0
  141. /package/lib/icon/style/{iconfont.1792115566662.woff2 → iconfont.1792219842406.woff2} +0 -0
  142. /package/lib/{iconfont.1792115566662.ttf → iconfont.1792219842406.ttf} +0 -0
  143. /package/lib/{iconfont.1792115566662.woff → iconfont.1792219842406.woff} +0 -0
  144. /package/lib/{iconfont.1792115566662.woff2 → iconfont.1792219842406.woff2} +0 -0
@@ -112,6 +112,7 @@
112
112
  }
113
113
 
114
114
  .vxe-select--panel-body {
115
+ position: relative;
115
116
  display: flex;
116
117
  flex-direction: row;
117
118
  flex-grow: 1;
@@ -259,3 +260,79 @@
259
260
  .vxe-select--empty-placeholder {
260
261
  line-height: var(--vxe-ui-select-current-option-height);
261
262
  }
263
+
264
+ // 滚动条
265
+ .vxe-select--panel-body {
266
+ &.ov-padding {
267
+ &.overflow-x {
268
+ &.sx-pos--top {
269
+ padding-top: var(--vxe-ui-scrollbar-x-height);
270
+ }
271
+ &.sx-pos--bottom {
272
+ padding-bottom: var(--vxe-ui-scrollbar-x-height);
273
+ }
274
+ }
275
+ &.overflow-y {
276
+ &.sy-pos--left {
277
+ padding-left: var(--vxe-ui-scrollbar-y-width);
278
+ }
279
+ &.sy-pos--right {
280
+ padding-right: var(--vxe-ui-scrollbar-y-width);
281
+ }
282
+ }
283
+ }
284
+ &.ov-x--hidden {
285
+ & > .vxe-select-option--wrapper {
286
+ overflow-x: hidden;
287
+ }
288
+ }
289
+ &.ov-y--hidden {
290
+ & > .vxe-select-option--wrapper {
291
+ overflow-y: hidden;
292
+ }
293
+ }
294
+ &.is--virtual-scrollbar {
295
+ &.ov-x--auto-hide {
296
+ &:hover {
297
+ & > .vxe-scrollbar {
298
+ & > .vxe-scrollbar--track-x {
299
+ opacity: 1;
300
+ }
301
+ }
302
+ }
303
+ & > .vxe-scrollbar {
304
+ & > .vxe-scrollbar--track-x {
305
+ opacity: 0;
306
+ @include baseMixin.createAnimationTransition(opacity, 0.8s);
307
+ }
308
+ }
309
+ }
310
+ &.ov-y--auto-hide {
311
+ &:hover {
312
+ & > .vxe-scrollbar {
313
+ & > .vxe-scrollbar--track-y {
314
+ opacity: 1;
315
+ }
316
+ }
317
+ }
318
+ & > .vxe-scrollbar {
319
+ & > .vxe-scrollbar--track-y {
320
+ opacity: 0;
321
+ @include baseMixin.createAnimationTransition(opacity, 0.8s);
322
+ }
323
+ }
324
+ }
325
+ }
326
+ & > .vxe-scrollbar {
327
+ position: unset;
328
+ }
329
+ &.is--virtual-scrollbar {
330
+ & > .vxe-select-option--wrapper {
331
+ scrollbar-width: none;
332
+ -ms-overflow-style: none;
333
+ }
334
+ & > .vxe-select-option--wrapper::-webkit-scrollbar {
335
+ display: none;
336
+ }
337
+ }
338
+ }
@@ -31,6 +31,7 @@
31
31
  .vxe-tooltip--content,
32
32
  .vxe-tooltip--scrollbar-content-view {
33
33
  padding: 8px 12px;
34
+ width: max-content;
34
35
  max-width: 600px;
35
36
  max-height: 800px;
36
37
  white-space: pre-line;
@@ -1,5 +1,5 @@
1
1
  import { RenderFunction, SetupContext, Ref } from 'vue'
2
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSizeType } from '@vxe-ui/core'
2
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentIsVScrollbar } from '@vxe-ui/core'
3
3
  import { VxeScrollbarProps } from './scrollbar'
4
4
 
5
5
  /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
@@ -33,7 +33,7 @@ export namespace VxeCardPropTypes {
33
33
  export type Shadow = boolean
34
34
  export type Padding = boolean
35
35
  export type Size = VxeComponentSizeType
36
- export type UseScrollbar = boolean
36
+ export type UseScrollbar = VxeComponentIsVScrollbar
37
37
  export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
38
38
  /**
39
39
  * 滚动条宽度
@@ -1,5 +1,5 @@
1
1
  import { RenderFunction, SetupContext, Ref } from 'vue'
2
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, VxeComponentSlotType, ValueOf } from '@vxe-ui/core'
2
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, VxeComponentSlotType, ValueOf, VxeComponentIsVScrollbar } from '@vxe-ui/core'
3
3
  import { VxeScrollbarProps } from './scrollbar'
4
4
 
5
5
  /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
@@ -74,7 +74,7 @@ export namespace VxeDrawerPropTypes {
74
74
  export type Padding = boolean
75
75
  export type BeforeHideMethod = (params: VxeDrawerDefines.DrawerVisibleParams) => Promise<any>
76
76
  export type Slots = VxeDrawerSlots
77
- export type UseScrollbar = boolean
77
+ export type UseScrollbar = VxeComponentIsVScrollbar
78
78
  export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
79
79
  /**
80
80
  * 滚动条宽度
@@ -1,5 +1,5 @@
1
1
  import { RenderFunction, SetupContext, Ref, ComputedRef } from 'vue'
2
- import { VxeComponentBaseOptions, DefineVxeComponentInstance } from '@vxe-ui/core'
2
+ import { VxeComponentBaseOptions, DefineVxeComponentInstance, VxeUseInitVScrollbarReactData, VxeUseInitVScrollbarInternalData } from '@vxe-ui/core'
3
3
  import { VxeTableConstructor, VxeTableMethods, VxeTablePrivateMethods } from '../table'
4
4
  import { VxeGanttDefines } from '../gantt'
5
5
  import { VxeScrollbarPropTypes } from '../scrollbar'
@@ -20,7 +20,7 @@ export type VxeGanttViewInstance = DefineVxeComponentInstance<VxeGanttViewProps,
20
20
  interface VxeGanttViewProps {
21
21
  }
22
22
 
23
- export interface GanttViewReactData {
23
+ export interface GanttViewReactData extends VxeUseInitVScrollbarReactData {
24
24
  // 是否启用了横向 X 可视渲染方式加载
25
25
  scrollXLoad: boolean
26
26
  // 是否启用了纵向 Y 可视渲染方式加载
@@ -38,10 +38,6 @@ export interface GanttViewReactData {
38
38
  lastScrollTime: number
39
39
  lazScrollLoading: boolean
40
40
 
41
- // 滚动条
42
- yThumbHeight: number
43
- xThumbWidth: number
44
-
45
41
  scrollVMLoading: boolean
46
42
  scrollYHeight: number
47
43
  scrollYTop: number
@@ -59,7 +55,7 @@ export interface GanttViewReactData {
59
55
  viewCellWidth: number
60
56
  }
61
57
 
62
- export interface GanttViewInternalData {
58
+ export interface GanttViewInternalData extends VxeUseInitVScrollbarInternalData {
63
59
  xeTable: (VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods) | null
64
60
  // 渲染所有列
65
61
  visibleColumn: VxeGanttDefines.ViewColumn[]
@@ -81,15 +77,6 @@ export interface GanttViewInternalData {
81
77
  endIndex: number
82
78
  }
83
79
 
84
- // 滚动条
85
- scrollObserver?: ResizeObserver
86
- isThumbDrag?: boolean
87
- thumbDragOffset: number
88
- yThumbTop: number
89
- xThumbLeft: number
90
- lastScrollLeft: number
91
- lastScrollTop: number
92
-
93
80
  // 刷新布局
94
81
  rceTimeout?: undefined | number
95
82
  rceRunTime?: undefined | number
@@ -190,6 +177,10 @@ export interface VxeGanttViewPrivateMethods {
190
177
  }
191
178
 
192
179
  export interface VxeGanttViewMethods {
180
+ /**
181
+ * 获取滚动视图元素
182
+ */
183
+ getScrollViewElem(): HTMLElement | null | undefined
193
184
  refreshData(): Promise<void>
194
185
  updateViewData(force?: boolean): Promise<void>
195
186
  connectUpdate(params: {
@@ -1,5 +1,5 @@
1
1
  import { RenderFunction, SetupContext, Ref, ComputedRef } from 'vue'
2
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, VxeComponentSlotType, ValueOf } from '@vxe-ui/core'
2
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, VxeComponentIsVScrollbar, VxeComponentSlotType, ValueOf } from '@vxe-ui/core'
3
3
  import { VxeToolbarInstance, VxeToolbarProps, VxeToolbarPropTypes, VxeToolbarSlotTypes } from './toolbar'
4
4
  import { VxeTableDefines, VxeTablePrivateMethods, VxeTableEmits, VxeTableConstructor, VxeTableProps, TableMethods, VxeTableSlotTypes } from './table'
5
5
  import { VxeColumnPropTypes } from './column'
@@ -469,6 +469,8 @@ export interface VxeGridProps<D = any> extends VxeTableProps<D> {
469
469
  }
470
470
 
471
471
  export interface GridPrivateComputed<D = any> {
472
+ computeSize: ComputedRef<VxeComponentSizeType>
473
+ computeIsVScrollbar: ComputedRef<VxeComponentIsVScrollbar>
472
474
  computeProxyOpts: ComputedRef<VxeGridPropTypes.ProxyConfig<D>>
473
475
  computePagerOpts: ComputedRef<VxeGridPropTypes.PagerOpts>
474
476
  computeFormOpts: ComputedRef<VxeGridPropTypes.FormOpts>
@@ -1,6 +1,7 @@
1
1
  import { RenderFunction, SetupContext, Ref } from 'vue'
2
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentStyleType, VxeComponentSizeType } from '@vxe-ui/core'
2
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentIsVScrollbar, VxeComponentEventParams, ValueOf, VxeComponentStyleType, VxeComponentSizeType } from '@vxe-ui/core'
3
3
  import { VxeIconPropTypes } from './icon'
4
+ import { VxeScrollbarProps } from './scrollbar'
4
5
 
5
6
  /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
6
7
 
@@ -93,6 +94,17 @@ export namespace VxeIconPickerPropTypes {
93
94
  className?: string | ((params: { $iconPicker: VxeIconPickerConstructor }) => string)
94
95
  }
95
96
  export type Transfer = boolean
97
+ export type UseScrollbar = VxeComponentIsVScrollbar
98
+ export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
99
+ /**
100
+ * 滚动条宽度
101
+ */
102
+ width?: number | string
103
+ /**
104
+ * 滚动条高度
105
+ */
106
+ height?: number | string
107
+ }
96
108
  }
97
109
 
98
110
  export type VxeIconPickerProps = {
@@ -119,6 +131,14 @@ export type VxeIconPickerProps = {
119
131
  placement?: VxeIconPickerPropTypes.Placement
120
132
  popupConfig?: VxeIconPickerPropTypes.PopupConfig
121
133
  transfer?: VxeIconPickerPropTypes.Transfer
134
+ /**
135
+ * 使用虚拟滚动条
136
+ */
137
+ useScrollbar?: VxeIconPickerPropTypes.UseScrollbar
138
+ /**
139
+ * 滚动条配置项
140
+ */
141
+ scrollbarConfig?: VxeIconPickerPropTypes.ScrollbarConfig
122
142
  }
123
143
 
124
144
  export interface IconPickerPrivateComputed {
@@ -1,5 +1,5 @@
1
1
  import { RenderFunction, ComputedRef, SetupContext, Ref } from 'vue'
2
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentStyleType } from '@vxe-ui/core'
2
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentStyleType,VxeComponentIsVScrollbar } from '@vxe-ui/core'
3
3
  import { VxeScrollbarProps } from './scrollbar'
4
4
 
5
5
  /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
@@ -36,7 +36,7 @@ export namespace VxeLayoutAsidePropTypes {
36
36
  */
37
37
  animation?: boolean
38
38
  }
39
- export type UseScrollbar = boolean
39
+ export type UseScrollbar = VxeComponentIsVScrollbar
40
40
  export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
41
41
  /**
42
42
  * 滚动条宽度
@@ -1,5 +1,5 @@
1
1
  import { RenderFunction, SetupContext, Ref } from 'vue'
2
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSizeType } from '@vxe-ui/core'
2
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentIsVScrollbar } from '@vxe-ui/core'
3
3
  import { VxeBacktopProps, VxeBacktopSlotTypes } from './backtop'
4
4
  import { VxeScrollbarProps } from './scrollbar'
5
5
 
@@ -31,7 +31,7 @@ export namespace VxeLayoutBodyPropTypes {
31
31
  export type Padding = boolean
32
32
  export type ShowBacktop = boolean
33
33
  export interface BacktopConfig extends Omit<VxeBacktopProps, 'target'> {}
34
- export type UseScrollbar = boolean
34
+ export type UseScrollbar = VxeComponentIsVScrollbar
35
35
  export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
36
36
  /**
37
37
  * 滚动条宽度
@@ -1,5 +1,5 @@
1
1
  import { RenderFunction, SetupContext, Ref } from 'vue'
2
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSizeType } from '@vxe-ui/core'
2
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentIsVScrollbar } from '@vxe-ui/core'
3
3
 
4
4
  /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
5
5
 
@@ -24,11 +24,13 @@ export interface VxeLayoutContainerPrivateRef extends LayoutContainerPrivateRef
24
24
 
25
25
  export namespace VxeLayoutContainerPropTypes {
26
26
  export type Size = VxeComponentSizeType
27
+ export type UseScrollbar = VxeComponentIsVScrollbar
27
28
  export type Vertical = boolean
28
29
  }
29
30
 
30
31
  export interface VxeLayoutContainerProps {
31
32
  size?: VxeLayoutContainerPropTypes.Size
33
+ useScrollbar?: VxeLayoutContainerPropTypes.UseScrollbar
32
34
  vertical?: VxeLayoutContainerPropTypes.Vertical
33
35
  }
34
36
 
@@ -1,5 +1,5 @@
1
1
  import { RenderFunction, SetupContext, Ref } from 'vue'
2
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, ValueOf } from '@vxe-ui/core'
2
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, ValueOf, VxeComponentIsVScrollbar } from '@vxe-ui/core'
3
3
  import { VxeContextMenuPropTypes, VxeContextMenuDefines } from './context-menu'
4
4
  import { VxeScrollbarProps } from './scrollbar'
5
5
 
@@ -227,7 +227,7 @@ export namespace VxeListPropTypes {
227
227
  */
228
228
  enabled?: boolean
229
229
  }
230
- export type UseScrollbar = boolean
230
+ export type UseScrollbar = VxeComponentIsVScrollbar
231
231
  export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible'> {
232
232
  /**
233
233
  * 滚动条宽度
@@ -359,6 +359,10 @@ export interface ListInternalData {
359
359
 
360
360
  export interface ListMethods<D = any> {
361
361
  dispatchEvent(type: ValueOf<VxeListEmits>, params: Record<string, any>, evnt: Event | null): void
362
+ /**
363
+ * 获取滚动视图元素
364
+ */
365
+ getScrollViewElem(): HTMLElement | null | undefined
362
366
  /**
363
367
  * 加载数据
364
368
  * @param data 列表数据
@@ -1,5 +1,5 @@
1
1
  import { RenderFunction, SetupContext, Ref } from 'vue'
2
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentSlotType, VxeComponentStyleType, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentPermissionCodeType } from '@vxe-ui/core'
2
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentSlotType, VxeComponentStyleType, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentPermissionCodeType, 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'
@@ -86,7 +86,7 @@ export namespace VxeMenuPropTypes {
86
86
  }): boolean
87
87
  }
88
88
  export type AppendTo = string | HTMLElement | ((params: {}) => string | HTMLElement)
89
- export type UseScrollbar = boolean
89
+ export type UseScrollbar = VxeComponentIsVScrollbar
90
90
  export interface ScrollbarConfig extends VxeScrollbarProps {}
91
91
  }
92
92
 
@@ -1,5 +1,5 @@
1
1
  import { RenderFunction, SetupContext, Ref, ComputedRef } from 'vue'
2
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentSizeType, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSlotType } from '@vxe-ui/core'
2
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentSizeType, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSlotType, VxeComponentIsVScrollbar } from '@vxe-ui/core'
3
3
  import { VxeScrollbarProps } from './scrollbar'
4
4
 
5
5
  /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
@@ -127,7 +127,7 @@ export namespace VxeModalPropTypes {
127
127
  type: ModalEventTypes
128
128
  }) => Promise<any>
129
129
  export type Slots = VxeModalSlots
130
- export type UseScrollbar = boolean
130
+ export type UseScrollbar = VxeComponentIsVScrollbar
131
131
  export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
132
132
  /**
133
133
  * 滚动条宽度
@@ -1,5 +1,5 @@
1
1
  import { RenderFunction, SetupContext, Ref } from 'vue'
2
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentStyleType } from '@vxe-ui/core'
2
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSizeType, VxeComponentStyleType, VxeUseInitVScrollbarReactData, VxeUseInitVScrollbarInternalData } from '@vxe-ui/core'
3
3
 
4
4
  /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
5
5
 
@@ -24,6 +24,7 @@ export interface ScrollbarPrivateRef {
24
24
  export interface VxeScrollbarPrivateRef extends ScrollbarPrivateRef { }
25
25
 
26
26
  export namespace VxeScrollbarPropTypes {
27
+ export type Size = VxeComponentSizeType
27
28
  export type Id = number | string
28
29
  export type ViewId = number | string
29
30
  export type Theme = '' | 'light' | 'dark'
@@ -77,11 +78,20 @@ export namespace VxeScrollbarPropTypes {
77
78
  export type ViewStyle = VxeComponentStyleType
78
79
  export type ViewClassName = string
79
80
  export type ViewInnerClassName = string
81
+ /**
82
+ * 已废弃
83
+ * @deprecated
84
+ */
80
85
  export type AutoResize = boolean
86
+ /**
87
+ * 已废弃
88
+ * @deprecated
89
+ */
81
90
  export type SyncResize = boolean
82
91
  }
83
92
 
84
93
  export interface VxeScrollbarProps {
94
+ size?: VxeScrollbarPropTypes.Size
85
95
  /**
86
96
  * ID
87
97
  */
@@ -168,10 +178,12 @@ export interface VxeScrollbarProps {
168
178
  viewInnerClassName?: VxeScrollbarPropTypes.ViewInnerClassName
169
179
  /**
170
180
  * 自动监听元素的变化去重新计算样式
181
+ * @deprecated
171
182
  */
172
183
  autoResize?: VxeScrollbarPropTypes.AutoResize
173
184
  /**
174
185
  * 自动跟随某个属性的变化去重新计算表格,和手动调用 recalculate 方法是一样的效果(对于通过某个属性来更新内容时可能会用到)
186
+ * @deprecated
175
187
  */
176
188
  syncResize?: VxeScrollbarPropTypes.SyncResize
177
189
  }
@@ -180,18 +192,9 @@ export interface ScrollbarPrivateComputed {
180
192
  }
181
193
  export interface VxeScrollbarPrivateComputed extends ScrollbarPrivateComputed { }
182
194
 
183
- export interface ScrollbarReactData {
184
- yThumbHeight: number
185
- xThumbWidth: number
195
+ export interface ScrollbarReactData extends VxeUseInitVScrollbarReactData {
186
196
  }
187
- export interface ScrollbarInternalData {
188
- resizeObserver?: ResizeObserver
189
- isThumbDrag?: boolean
190
- thumbDragOffset: number
191
- yThumbTop: number
192
- xThumbLeft: number
193
- lastScrollTop: number
194
- lastScrollLeft: number
197
+ export interface ScrollbarInternalData extends VxeUseInitVScrollbarInternalData {
195
198
  }
196
199
 
197
200
  export interface ScrollbarMethods {
@@ -228,11 +231,11 @@ export interface ScrollbarMethods {
228
231
  /**
229
232
  * 获取滚动视图元素
230
233
  */
231
- getViewElem(): HTMLElement | null
234
+ getScrollViewElem(): HTMLElement | null | undefined
232
235
  /**
233
236
  * 获取滚动视图内容包裹元素
234
237
  */
235
- getViewInnerElem(): HTMLElement | null
238
+ getScrollViewInnerElem(): HTMLElement | null | undefined
236
239
  /**
237
240
  * 重新计算样式
238
241
  * 对于某些特殊场景可能会用到,比如更新内容
@@ -1,7 +1,8 @@
1
1
  import { RenderFunction, SetupContext, Ref } from 'vue'
2
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, VxeComponentStyleType, ValueOf } from '@vxe-ui/core'
2
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, VxeComponentStyleType, ValueOf, VxeComponentIsVScrollbar, VxeUseInitVScrollbarReactData, VxeUseInitVScrollbarInternalData } from '@vxe-ui/core'
3
3
  import { VxeOptgroupProps } from './optgroup'
4
4
  import { VxeOptionProps, VxeOptionPropTypes } from './option'
5
+ import { VxeScrollbarProps } from './scrollbar'
5
6
 
6
7
  /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
7
8
 
@@ -14,6 +15,7 @@ export interface VxeSelectConstructor extends VxeComponentBaseOptions, VxeSelect
14
15
  props: VxeSelectProps
15
16
  context: SetupContext<VxeSelectEmits>
16
17
  reactData: SelectReactData
18
+ internalData: SelectInternalData
17
19
  getRefMaps(): SelectPrivateRef
18
20
  getComputeMaps(): SelectPrivateComputed
19
21
  renderVN: RenderFunction
@@ -200,6 +202,17 @@ export namespace VxeSelectPropTypes {
200
202
  * @deprecated
201
203
  */
202
204
  export interface ScrollY extends VirtualYConfig {}
205
+ export type UseScrollbar = VxeComponentIsVScrollbar
206
+ export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
207
+ /**
208
+ * 滚动条宽度
209
+ */
210
+ width?: number | string
211
+ /**
212
+ * 滚动条高度
213
+ */
214
+ height?: number | string
215
+ }
203
216
  }
204
217
 
205
218
  export interface VxeSelectProps {
@@ -280,6 +293,14 @@ export interface VxeSelectProps {
280
293
  * 纵向虚拟滚动配置项
281
294
  */
282
295
  virtualYConfig?: VxeSelectPropTypes.VirtualYConfig
296
+ /**
297
+ * 使用虚拟滚动条
298
+ */
299
+ useScrollbar?: VxeSelectPropTypes.UseScrollbar
300
+ /**
301
+ * 滚动条配置项
302
+ */
303
+ scrollbarConfig?: VxeSelectPropTypes.ScrollbarConfig
283
304
 
284
305
  /**
285
306
  * 已废弃,被 remote-config.queryMethod 替换
@@ -307,7 +328,7 @@ export interface SelectPrivateComputed {
307
328
  }
308
329
  export interface VxeSelectPrivateComputed extends SelectPrivateComputed { }
309
330
 
310
- export interface SelectReactData {
331
+ export interface SelectReactData extends VxeUseInitVScrollbarReactData {
311
332
  initialized: boolean
312
333
  scrollYLoad: boolean
313
334
  bodyHeight: number
@@ -329,7 +350,7 @@ export interface SelectReactData {
329
350
  isActivated: boolean
330
351
  }
331
352
 
332
- export interface SelectInternalData {
353
+ export interface SelectInternalData extends VxeUseInitVScrollbarInternalData {
333
354
  isLoaded?: boolean
334
355
  synchData: any[]
335
356
  fullData: any[]
@@ -353,6 +374,10 @@ export interface SelectInternalData {
353
374
 
354
375
  export interface SelectMethods {
355
376
  dispatchEvent(type: ValueOf<VxeSelectEmits>, params: Record<string, any>, evnt: Event | null): void
377
+ /**
378
+ * 获取滚动视图元素
379
+ */
380
+ getScrollViewElem(): HTMLElement | null | undefined
356
381
  /**
357
382
  * 加载数据
358
383
  * @param data 列表数据
@@ -1,5 +1,5 @@
1
1
  import { RenderFunction, SetupContext, Ref, ComputedRef, ComponentPublicInstance, VNode } from 'vue'
2
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, ValueOf, VxeGlobalConfig, VxeComponentStyleType, VxeComponentSlotType, VxeComponentAlignType, VxeGlobalRendererOptions } from '@vxe-ui/core'
2
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, ValueOf, VxeGlobalConfig, VxeComponentStyleType, VxeComponentSlotType, VxeComponentAlignType, VxeGlobalRendererOptions, VxeComponentIsVScrollbar, VxeUseSizeResult, VxeUseVScrollbarResult, VxeUseInitVScrollbarResult, VxeUseInitVScrollbarReactData, VxeUseInitVScrollbarInternalData } from '@vxe-ui/core'
3
3
  import { VxeColumnPropTypes, VxeColumnProps, VxeColumnSlotTypes } from './column'
4
4
  import { VxeTableExtendCellAreaDefines, VxeTableExtendCellAreaEmits } from './table-plugins'
5
5
  import { VxeGridConstructor } from './grid'
@@ -1426,6 +1426,10 @@ export namespace VxeTablePropTypes {
1426
1426
  * 是否显示底部按钮
1427
1427
  */
1428
1428
  showFooter?: boolean
1429
+ /**
1430
+ * 使用虚拟滚动条
1431
+ */
1432
+ useScrollbar?: VxeTooltipPropTypes.UseScrollbar
1429
1433
  }
1430
1434
  export interface FilterOpts<D = VxeTablePropTypes.Row> extends FilterConfig<D> { }
1431
1435
 
@@ -3019,7 +3023,7 @@ export namespace VxeTablePropTypes {
3019
3023
  */
3020
3024
  overscrollBehavior?: 'contain' | 'none' | ''
3021
3025
  }
3022
- export type UseScrollbar = boolean
3026
+ export type UseScrollbar = VxeComponentIsVScrollbar
3023
3027
  /**
3024
3028
  * 滚动条配置项
3025
3029
  */
@@ -3994,8 +3998,10 @@ export interface VxeTableProps<D = any> {
3994
3998
  }
3995
3999
 
3996
4000
  export interface TablePrivateComputed<D = any> {
3997
- computeSize: ComputedRef<VxeTablePropTypes.Size>
4001
+ computeSize: ComputedRef<VxeComponentSizeType>
4002
+ computeIsVScrollbar: ComputedRef<VxeComponentIsVScrollbar>
3998
4003
  computeTableId: ComputedRef<string>
4004
+ computeTableStyle: ComputedRef<VxeComponentStyleType>
3999
4005
  computeRowField: ComputedRef<string>
4000
4006
  computeEditDirtyOpts: ComputedRef<VxeTablePropTypes.EditDirtyConfig>
4001
4007
  computeValidOpts: ComputedRef<VxeTablePropTypes.ValidOpts<D>>
@@ -4107,9 +4113,9 @@ export interface TablePrivateComputed<D = any> {
4107
4113
  */
4108
4114
  computeSYOpts: ComputedRef<VxeTablePropTypes.VirtualYConfig & { gt: number }>
4109
4115
  }
4110
- export interface VxeTablePrivateComputed extends TablePrivateComputed { }
4116
+ export interface VxeTablePrivateComputed extends TablePrivateComputed, VxeUseSizeResult, VxeUseVScrollbarResult { }
4111
4117
 
4112
- export interface TableReactData<D = any> {
4118
+ export interface TableReactData<D = any> extends VxeUseInitVScrollbarReactData {
4113
4119
  updateColFlag: number
4114
4120
  // 低性能的静态列
4115
4121
  staticColumns: any[]
@@ -4132,10 +4138,6 @@ export interface TableReactData<D = any> {
4132
4138
  // 横向滚动条的高度
4133
4139
  scrollbarHeight: number
4134
4140
 
4135
- // 滚动条
4136
- yThumbHeight: number
4137
- xThumbWidth: number
4138
-
4139
4141
  /**
4140
4142
  * 行高
4141
4143
  * @deprecated
@@ -4334,7 +4336,7 @@ export interface TableReactData<D = any> {
4334
4336
  currColFlag: number
4335
4337
  }
4336
4338
 
4337
- export interface TableInternalData<D = any> {
4339
+ export interface TableInternalData<D = any> extends VxeUseInitVScrollbarInternalData {
4338
4340
  tZindex: number
4339
4341
  currKeyField: string
4340
4342
  isCurrDeepKey: boolean
@@ -4379,15 +4381,6 @@ export interface TableInternalData<D = any> {
4379
4381
 
4380
4382
  resizeObserver?: ResizeObserver
4381
4383
 
4382
- // 滚动条
4383
- scrollObserver?: ResizeObserver
4384
- isThumbDrag?: boolean
4385
- thumbDragOffset: number
4386
- yThumbTop: number
4387
- xThumbLeft: number
4388
- lastScrollTop: number
4389
- lastScrollLeft: number
4390
-
4391
4384
  // 单选框属性,已选中保留的行
4392
4385
  radioReserveRow: any
4393
4386
  // 复选框属性,已选中保留的行
@@ -4576,6 +4569,10 @@ export interface TableMethods<DT = any> {
4576
4569
  * 获取根元素
4577
4570
  */
4578
4571
  getEl(): HTMLDivElement
4572
+ /**
4573
+ * 获取滚动视图元素
4574
+ */
4575
+ getScrollViewElem(): HTMLElement | null | undefined
4579
4576
  /**
4580
4577
  * 手动清除表格所有条件,还原到初始状态
4581
4578
  * 对于增删改查的场景中可能会用到,比如在数据保存之后清除表格缓存
@@ -5588,9 +5585,19 @@ export interface TableMethods<DT = any> {
5588
5585
  */
5589
5586
  getCustomStoreData(): VxeTableDefines.CustomStoreData
5590
5587
  }
5591
- export interface VxeTableMethods<D = any> extends TableMethods<D> { }
5588
+ export interface VxeTableMethods<D = any> extends TableMethods<D>, VxeUseInitVScrollbarResult { }
5592
5589
 
5593
5590
  export interface TablePrivateMethods<D = any> {
5591
+ /**
5592
+ * 内部方法
5593
+ * @private
5594
+ */
5595
+ getInternalData(): TableInternalData<D>
5596
+ /**
5597
+ * 内部方法
5598
+ * @private
5599
+ */
5600
+ getReactData(): TableReactData<D>
5594
5601
  /**
5595
5602
  * 内部方法
5596
5603
  * @deprecated
@@ -5988,7 +5995,7 @@ export interface TablePrivateMethods<D = any> {
5988
5995
  * 内部方法
5989
5996
  * @private
5990
5997
  */
5991
- updateScrollbar(): void
5998
+ updateScrollbar(): Promise<void>
5992
5999
  /**
5993
6000
  * 内部方法
5994
6001
  * @private
@@ -6337,7 +6344,6 @@ export namespace VxeTableDefines {
6337
6344
  style: any
6338
6345
  column: VxeTableDefines.ColumnInfo | null | undefined
6339
6346
  visible: boolean
6340
- maxHeight: number | string | null
6341
6347
  }
6342
6348
 
6343
6349
  export interface HistoryStackObj<D = any> {