vxe-pc-ui 3.20.0 → 3.20.2
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.
- package/es/card/src/card.js +20 -4
- package/es/drawer/src/drawer.js +75 -16
- package/es/drawer/style.css +13 -6
- package/es/drawer/style.min.css +1 -1
- package/es/icon/style.css +1 -1
- package/es/language/fr-FR.js +29 -29
- package/es/layout-aside/src/layout-aside.js +10 -6
- package/es/layout-body/src/layout-body.js +24 -12
- package/es/list/src/list.js +131 -49
- package/es/list/style.css +25 -8
- package/es/list/style.min.css +1 -1
- package/es/menu/src/menu.js +2 -2
- package/es/modal/src/modal.js +73 -14
- package/es/modal/style.css +4 -0
- package/es/modal/style.min.css +1 -1
- package/es/scrollbar/src/scrollbar.js +87 -19
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tabs/src/tabs.js +21 -5
- package/es/tree/src/tree.js +460 -54
- package/es/tree/style.css +43 -0
- package/es/tree/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.js +3 -0
- package/es/vxe-drawer/style.css +13 -6
- package/es/vxe-drawer/style.min.css +1 -1
- package/es/vxe-list/style.css +25 -8
- package/es/vxe-list/style.min.css +1 -1
- package/es/vxe-modal/style.css +4 -0
- package/es/vxe-modal/style.min.css +1 -1
- package/es/vxe-tree/style.css +43 -0
- package/es/vxe-tree/style.min.css +1 -1
- package/lib/card/src/card.js +20 -4
- package/lib/card/src/card.min.js +1 -1
- package/lib/drawer/src/drawer.js +76 -12
- package/lib/drawer/src/drawer.min.js +1 -1
- package/lib/drawer/style/style.css +13 -6
- package/lib/drawer/style/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +956 -185
- package/lib/index.umd.min.js +1 -1
- package/lib/language/fr-FR.js +29 -29
- package/lib/language/fr-FR.min.js +1 -1
- package/lib/language/fr-FR.umd.js +29 -29
- package/lib/layout-aside/src/layout-aside.js +10 -9
- package/lib/layout-aside/src/layout-aside.min.js +1 -1
- package/lib/layout-body/src/layout-body.js +28 -20
- package/lib/layout-body/src/layout-body.min.js +1 -1
- package/lib/list/src/list.js +119 -46
- package/lib/list/src/list.min.js +1 -1
- package/lib/list/style/style.css +25 -8
- package/lib/list/style/style.min.css +1 -1
- package/lib/menu/src/menu.js +1 -1
- package/lib/menu/src/menu.min.js +1 -1
- package/lib/modal/src/modal.js +74 -12
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/modal/style/style.css +4 -0
- package/lib/modal/style/style.min.css +1 -1
- package/lib/scrollbar/src/scrollbar.js +92 -17
- package/lib/scrollbar/src/scrollbar.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tabs/src/tabs.js +21 -8
- package/lib/tabs/src/tabs.min.js +1 -1
- package/lib/tree/src/tree.js +438 -51
- package/lib/tree/src/tree.min.js +1 -1
- package/lib/tree/style/style.css +43 -0
- package/lib/tree/style/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/ui/src/utils.js +4 -0
- package/lib/ui/src/utils.min.js +1 -1
- package/lib/vxe-drawer/style/style.css +13 -6
- package/lib/vxe-drawer/style/style.min.css +1 -1
- package/lib/vxe-list/style/style.css +25 -8
- package/lib/vxe-list/style/style.min.css +1 -1
- package/lib/vxe-modal/style/style.css +4 -0
- package/lib/vxe-modal/style/style.min.css +1 -1
- package/lib/vxe-tree/style/style.css +43 -0
- package/lib/vxe-tree/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/card/src/card.ts +21 -4
- package/packages/drawer/src/drawer.ts +80 -16
- package/packages/language/fr-FR.ts +903 -903
- package/packages/layout-aside/src/layout-aside.ts +10 -6
- package/packages/layout-body/src/layout-body.ts +28 -15
- package/packages/list/src/list.ts +149 -55
- package/packages/menu/src/menu.ts +2 -2
- package/packages/modal/src/modal.ts +83 -19
- package/packages/scrollbar/src/scrollbar.ts +101 -19
- package/packages/tabs/src/tabs.ts +22 -9
- package/packages/tree/src/tree.ts +508 -65
- package/packages/ui/src/utils.ts +4 -0
- package/styles/components/drawer.scss +13 -6
- package/styles/components/list.scss +35 -10
- package/styles/components/modal.scss +4 -0
- package/styles/components/tree.scss +76 -0
- package/types/components/card.d.ts +10 -1
- package/types/components/drawer.d.ts +20 -0
- package/types/components/gantt-module/gantt-view.d.ts +24 -1
- package/types/components/gantt.d.ts +2 -0
- package/types/components/layout-aside.d.ts +10 -1
- package/types/components/layout-body.d.ts +10 -1
- package/types/components/list.d.ts +13 -2
- package/types/components/modal.d.ts +20 -0
- package/types/components/scrollbar.d.ts +16 -2
- package/types/components/table.d.ts +80 -6
- package/types/components/tabs.d.ts +10 -1
- package/types/components/tree.d.ts +35 -2
- /package/es/icon/{iconfont.1791880407207.ttf → iconfont.1792034961185.ttf} +0 -0
- /package/es/icon/{iconfont.1791880407207.woff → iconfont.1792034961185.woff} +0 -0
- /package/es/icon/{iconfont.1791880407207.woff2 → iconfont.1792034961185.woff2} +0 -0
- /package/es/{iconfont.1791880407207.ttf → iconfont.1792034961185.ttf} +0 -0
- /package/es/{iconfont.1791880407207.woff → iconfont.1792034961185.woff} +0 -0
- /package/es/{iconfont.1791880407207.woff2 → iconfont.1792034961185.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1791880407207.ttf → iconfont.1792034961185.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1791880407207.woff → iconfont.1792034961185.woff} +0 -0
- /package/lib/icon/style/{iconfont.1791880407207.woff2 → iconfont.1792034961185.woff2} +0 -0
- /package/lib/{iconfont.1791880407207.ttf → iconfont.1792034961185.ttf} +0 -0
- /package/lib/{iconfont.1791880407207.woff → iconfont.1792034961185.woff} +0 -0
- /package/lib/{iconfont.1791880407207.woff2 → iconfont.1792034961185.woff2} +0 -0
package/packages/ui/src/utils.ts
CHANGED
|
@@ -72,3 +72,7 @@ export function enModelValue (nodeid: string | number | null | undefined) {
|
|
|
72
72
|
export function deModelValue (nodeid: string | number | null) {
|
|
73
73
|
return nodeid ? decodeURIComponent(`${nodeid}`) : nodeid
|
|
74
74
|
}
|
|
75
|
+
|
|
76
|
+
export function getDefaultConfig <T = any, D = any> (val1: T, def1: D): (T | D) {
|
|
77
|
+
return XEUtils.eqNull(val1) ? def1 : val1
|
|
78
|
+
}
|
|
@@ -181,8 +181,8 @@
|
|
|
181
181
|
&.is--drag {
|
|
182
182
|
cursor: move;
|
|
183
183
|
transition: none;
|
|
184
|
-
.vxe-
|
|
185
|
-
.vxe-
|
|
184
|
+
.vxe-drawer--body,
|
|
185
|
+
.vxe-drawer--footer {
|
|
186
186
|
&:after {
|
|
187
187
|
content: "";
|
|
188
188
|
position: absolute;
|
|
@@ -192,9 +192,10 @@
|
|
|
192
192
|
height: 100%;
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
.vxe-
|
|
195
|
+
.vxe-drawer--body {
|
|
196
196
|
overflow: hidden;
|
|
197
|
-
.vxe-
|
|
197
|
+
.vxe-drawer--content,
|
|
198
|
+
.vxe-drawer--scrollbar-content {
|
|
198
199
|
overflow: hidden;
|
|
199
200
|
}
|
|
200
201
|
}
|
|
@@ -213,7 +214,8 @@
|
|
|
213
214
|
overflow: auto;
|
|
214
215
|
outline: 0;
|
|
215
216
|
}
|
|
216
|
-
.vxe-drawer--content
|
|
217
|
+
.vxe-drawer--content,
|
|
218
|
+
.vxe-drawer--scrollbar-content {
|
|
217
219
|
flex-grow: 1;
|
|
218
220
|
white-space: pre-line;
|
|
219
221
|
}
|
|
@@ -227,7 +229,8 @@
|
|
|
227
229
|
flex-grow: 1;
|
|
228
230
|
overflow: auto;
|
|
229
231
|
outline: 0;
|
|
230
|
-
.vxe-drawer--content
|
|
232
|
+
.vxe-drawer--content,
|
|
233
|
+
.vxe-drawer--scrollbar-content {
|
|
231
234
|
overflow: auto;
|
|
232
235
|
}
|
|
233
236
|
}
|
|
@@ -349,3 +352,7 @@
|
|
|
349
352
|
overflow: hidden;
|
|
350
353
|
}
|
|
351
354
|
}
|
|
355
|
+
|
|
356
|
+
.vxe-drawer--scrollbar-content {
|
|
357
|
+
width: 100%;
|
|
358
|
+
}
|
|
@@ -290,21 +290,34 @@
|
|
|
290
290
|
|
|
291
291
|
// 滚动条
|
|
292
292
|
.vxe-list {
|
|
293
|
-
|
|
294
|
-
|
|
293
|
+
&.ov-padding {
|
|
294
|
+
&.overflow-x {
|
|
295
|
+
&.sx-pos--top {
|
|
296
|
+
padding-top: var(--vxe-ui-scrollbar-x-height);
|
|
297
|
+
}
|
|
298
|
+
&.sx-pos--bottom {
|
|
299
|
+
padding-bottom: var(--vxe-ui-scrollbar-x-height);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
&.overflow-y {
|
|
303
|
+
&.sy-pos--left {
|
|
304
|
+
padding-left: var(--vxe-ui-scrollbar-y-width);
|
|
305
|
+
}
|
|
306
|
+
&.sy-pos--right {
|
|
307
|
+
padding-right: var(--vxe-ui-scrollbar-y-width);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
295
310
|
}
|
|
296
|
-
&.
|
|
311
|
+
&.ov-x--hidden {
|
|
297
312
|
& > .vxe-list--virtual-wrapper {
|
|
298
|
-
|
|
299
|
-
-ms-overflow-style: none;
|
|
313
|
+
overflow-x: hidden;
|
|
300
314
|
}
|
|
301
|
-
|
|
302
|
-
|
|
315
|
+
}
|
|
316
|
+
&.ov-y--hidden {
|
|
317
|
+
& > .vxe-list--virtual-wrapper {
|
|
318
|
+
overflow-y: hidden;
|
|
303
319
|
}
|
|
304
320
|
}
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
.vxe-list {
|
|
308
321
|
&.is--virtual-scrollbar {
|
|
309
322
|
&.ov-x--auto-hide {
|
|
310
323
|
&:hover {
|
|
@@ -337,4 +350,16 @@
|
|
|
337
350
|
}
|
|
338
351
|
}
|
|
339
352
|
}
|
|
353
|
+
& > .vxe-scrollbar {
|
|
354
|
+
position: unset;
|
|
355
|
+
}
|
|
356
|
+
&.is--virtual-scrollbar {
|
|
357
|
+
& > .vxe-list--virtual-wrapper {
|
|
358
|
+
scrollbar-width: none;
|
|
359
|
+
-ms-overflow-style: none;
|
|
360
|
+
}
|
|
361
|
+
& > .vxe-list--virtual-wrapper::-webkit-scrollbar {
|
|
362
|
+
display: none;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
340
365
|
}
|
|
@@ -308,3 +308,79 @@
|
|
|
308
308
|
width: 0;
|
|
309
309
|
float: left;
|
|
310
310
|
}
|
|
311
|
+
|
|
312
|
+
// 滚动条
|
|
313
|
+
.vxe-tree {
|
|
314
|
+
&.ov-padding {
|
|
315
|
+
&.overflow-x {
|
|
316
|
+
&.sx-pos--top {
|
|
317
|
+
padding-top: var(--vxe-ui-scrollbar-x-height);
|
|
318
|
+
}
|
|
319
|
+
&.sx-pos--bottom {
|
|
320
|
+
padding-bottom: var(--vxe-ui-scrollbar-x-height);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
&.overflow-y {
|
|
324
|
+
&.sy-pos--left {
|
|
325
|
+
padding-left: var(--vxe-ui-scrollbar-y-width);
|
|
326
|
+
}
|
|
327
|
+
&.sy-pos--right {
|
|
328
|
+
padding-right: var(--vxe-ui-scrollbar-y-width);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
&.ov-x--hidden {
|
|
333
|
+
& > .vxe-tree--node-list-wrapper {
|
|
334
|
+
overflow-x: hidden;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
&.ov-y--hidden {
|
|
338
|
+
& > .vxe-tree--node-list-wrapper {
|
|
339
|
+
overflow-y: hidden;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
&.is--virtual-scrollbar {
|
|
343
|
+
&.ov-x--auto-hide {
|
|
344
|
+
&:hover {
|
|
345
|
+
& > .vxe-scrollbar {
|
|
346
|
+
& > .vxe-scrollbar--track-x {
|
|
347
|
+
opacity: 1;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
& > .vxe-scrollbar {
|
|
352
|
+
& > .vxe-scrollbar--track-x {
|
|
353
|
+
opacity: 0;
|
|
354
|
+
@include baseMixin.createAnimationTransition(opacity, 0.8s);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
&.ov-y--auto-hide {
|
|
359
|
+
&:hover {
|
|
360
|
+
& > .vxe-scrollbar {
|
|
361
|
+
& > .vxe-scrollbar--track-y {
|
|
362
|
+
opacity: 1;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
& > .vxe-scrollbar {
|
|
367
|
+
& > .vxe-scrollbar--track-y {
|
|
368
|
+
opacity: 0;
|
|
369
|
+
@include baseMixin.createAnimationTransition(opacity, 0.8s);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
& > .vxe-scrollbar {
|
|
375
|
+
position: unset;
|
|
376
|
+
}
|
|
377
|
+
&.is--virtual-scrollbar {
|
|
378
|
+
& > .vxe-tree--node-list-wrapper {
|
|
379
|
+
scrollbar-width: none;
|
|
380
|
+
-ms-overflow-style: none;
|
|
381
|
+
}
|
|
382
|
+
& > .vxe-tree--node-list-wrapper::-webkit-scrollbar {
|
|
383
|
+
display: none;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
@@ -27,7 +27,16 @@ export namespace VxeCardPropTypes {
|
|
|
27
27
|
export type Padding = boolean
|
|
28
28
|
export type Size = VxeComponentSizeType
|
|
29
29
|
export type UseScrollbar = boolean
|
|
30
|
-
export interface ScrollbarConfig extends Pick<VxeScrollbarProps, '
|
|
30
|
+
export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
|
|
31
|
+
/**
|
|
32
|
+
* 滚动条宽度
|
|
33
|
+
*/
|
|
34
|
+
width?: number | string
|
|
35
|
+
/**
|
|
36
|
+
* 滚动条高度
|
|
37
|
+
*/
|
|
38
|
+
height?: number | string
|
|
39
|
+
}
|
|
31
40
|
}
|
|
32
41
|
|
|
33
42
|
export type VxeCardProps = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CreateElement } from 'vue'
|
|
2
2
|
import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, VxeComponentSizeType, VxeComponentSlotType, ValueOf } from '@vxe-ui/core'
|
|
3
|
+
import { VxeScrollbarProps } from './scrollbar'
|
|
3
4
|
|
|
4
5
|
/* eslint-disable @typescript-eslint/no-empty-interface,no-use-before-define,@typescript-eslint/ban-types */
|
|
5
6
|
|
|
@@ -67,6 +68,17 @@ export namespace VxeDrawerPropTypes {
|
|
|
67
68
|
export type Padding = boolean
|
|
68
69
|
export type BeforeHideMethod = (params: VxeDrawerDefines.DrawerVisibleParams) => Promise<any>
|
|
69
70
|
export type Slots = VxeDrawerSlots
|
|
71
|
+
export type UseScrollbar = boolean
|
|
72
|
+
export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
|
|
73
|
+
/**
|
|
74
|
+
* 滚动条宽度
|
|
75
|
+
*/
|
|
76
|
+
width?: number | string
|
|
77
|
+
/**
|
|
78
|
+
* 滚动条高度
|
|
79
|
+
*/
|
|
80
|
+
height?: number | string
|
|
81
|
+
}
|
|
70
82
|
}
|
|
71
83
|
|
|
72
84
|
export interface VxeDrawerProps {
|
|
@@ -119,6 +131,14 @@ export interface VxeDrawerProps {
|
|
|
119
131
|
padding?: VxeDrawerPropTypes.Padding
|
|
120
132
|
beforeHideMethod?: VxeDrawerPropTypes.BeforeHideMethod
|
|
121
133
|
slots?: VxeDrawerPropTypes.Slots
|
|
134
|
+
/**
|
|
135
|
+
* 使用虚拟滚动条
|
|
136
|
+
*/
|
|
137
|
+
useScrollbar?: VxeDrawerPropTypes.UseScrollbar
|
|
138
|
+
/**
|
|
139
|
+
* 滚动条配置项
|
|
140
|
+
*/
|
|
141
|
+
scrollbarConfig?: VxeDrawerPropTypes.ScrollbarConfig
|
|
122
142
|
}
|
|
123
143
|
|
|
124
144
|
export interface DrawerPrivateComputed {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DefineVxeComponentInstance } from '@vxe-ui/core'
|
|
2
2
|
import { VxeTableConstructor, VxeTableMethods, VxeTablePrivateMethods } from '../table'
|
|
3
3
|
import { VxeGanttDefines, VxeGanttConstructor } from '../gantt'
|
|
4
|
+
import { VxeScrollbarPropTypes } from '../scrollbar'
|
|
4
5
|
|
|
5
6
|
/* eslint-disable no-use-before-define */
|
|
6
7
|
|
|
@@ -34,6 +35,10 @@ export interface GanttViewReactData {
|
|
|
34
35
|
lastScrollTime: number
|
|
35
36
|
lazScrollLoading: boolean
|
|
36
37
|
|
|
38
|
+
// 滚动条
|
|
39
|
+
yThumbHeight: number
|
|
40
|
+
xThumbWidth: number
|
|
41
|
+
|
|
37
42
|
scrollVMLoading: boolean
|
|
38
43
|
scrollYHeight: number
|
|
39
44
|
scrollYTop: number
|
|
@@ -72,7 +77,13 @@ export interface GanttViewInternalData {
|
|
|
72
77
|
startIndex: number
|
|
73
78
|
endIndex: number
|
|
74
79
|
}
|
|
75
|
-
|
|
80
|
+
|
|
81
|
+
// 滚动条
|
|
82
|
+
scrollObserver?: ResizeObserver
|
|
83
|
+
isThumbDrag?: boolean
|
|
84
|
+
thumbDragOffset: number
|
|
85
|
+
yThumbTop: number
|
|
86
|
+
xThumbLeft: number
|
|
76
87
|
lastScrollLeft: number
|
|
77
88
|
lastScrollTop: number
|
|
78
89
|
|
|
@@ -105,6 +116,14 @@ export interface GanttViewPrivateRef {
|
|
|
105
116
|
}
|
|
106
117
|
|
|
107
118
|
export interface GanttViewPrivateComputed {
|
|
119
|
+
computeScrollXHeight: number | undefined
|
|
120
|
+
computeScrollYWidth: number | undefined
|
|
121
|
+
computeScrollXVisible: 'auto' | 'visible' | 'hidden' | boolean | undefined
|
|
122
|
+
computeScrollYVisible: 'auto' | 'visible' | 'hidden' | boolean | undefined
|
|
123
|
+
computeScrollXAutoHide: VxeScrollbarPropTypes.AutoHide | undefined
|
|
124
|
+
computeScrollYAutoHide: VxeScrollbarPropTypes.AutoHide | undefined
|
|
125
|
+
computeScrollbarXToTop: boolean
|
|
126
|
+
computeScrollbarYToLeft: boolean
|
|
108
127
|
computeScaleDateList: Date[]
|
|
109
128
|
computeNowLineLeft: number
|
|
110
129
|
}
|
|
@@ -158,6 +177,10 @@ export interface VxeGanttViewPrivateMethods {
|
|
|
158
177
|
* @private
|
|
159
178
|
*/
|
|
160
179
|
handleUpdateSYStatus(scrollYLoad: boolean): void
|
|
180
|
+
/**
|
|
181
|
+
* @private
|
|
182
|
+
*/
|
|
183
|
+
updateScrollbar(): void
|
|
161
184
|
}
|
|
162
185
|
|
|
163
186
|
export interface VxeGanttViewMethods {
|
|
@@ -723,6 +723,8 @@ export interface GanttPrivateComputed<D = any> extends GridPrivateComputed<D> {
|
|
|
723
723
|
computeTypeField: string
|
|
724
724
|
computeProgressField: string
|
|
725
725
|
computeScrollbarOpts: VxeTablePropTypes.ScrollbarConfig
|
|
726
|
+
computeScrollbarXOpts: VxeTablePropTypes.ScrollbarXConfig
|
|
727
|
+
computeScrollbarYOpts: VxeTablePropTypes.ScrollbarYConfig
|
|
726
728
|
computeScrollbarXToTop: boolean
|
|
727
729
|
computeScrollbarYToLeft: boolean
|
|
728
730
|
}
|
|
@@ -30,7 +30,16 @@ export namespace VxeLayoutAsidePropTypes {
|
|
|
30
30
|
animation?: boolean
|
|
31
31
|
}
|
|
32
32
|
export type UseScrollbar = boolean
|
|
33
|
-
export interface ScrollbarConfig extends Pick<VxeScrollbarProps, '
|
|
33
|
+
export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
|
|
34
|
+
/**
|
|
35
|
+
* 滚动条宽度
|
|
36
|
+
*/
|
|
37
|
+
width?: number | string
|
|
38
|
+
/**
|
|
39
|
+
* 滚动条高度
|
|
40
|
+
*/
|
|
41
|
+
height?: number | string
|
|
42
|
+
}
|
|
34
43
|
}
|
|
35
44
|
|
|
36
45
|
export interface VxeLayoutAsideProps {
|
|
@@ -25,7 +25,16 @@ export namespace VxeLayoutBodyPropTypes {
|
|
|
25
25
|
export type ShowBacktop = boolean
|
|
26
26
|
export interface BacktopConfig extends Omit<VxeBacktopProps, 'target'> {}
|
|
27
27
|
export type UseScrollbar = boolean
|
|
28
|
-
export interface ScrollbarConfig extends Pick<VxeScrollbarProps, '
|
|
28
|
+
export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
|
|
29
|
+
/**
|
|
30
|
+
* 滚动条宽度
|
|
31
|
+
*/
|
|
32
|
+
width?: number | string
|
|
33
|
+
/**
|
|
34
|
+
* 滚动条高度
|
|
35
|
+
*/
|
|
36
|
+
height?: number | string
|
|
37
|
+
}
|
|
29
38
|
}
|
|
30
39
|
export interface VxeLayoutBodyProps {
|
|
31
40
|
size?: VxeLayoutBodyPropTypes.Size
|
|
@@ -220,7 +220,16 @@ export namespace VxeListPropTypes {
|
|
|
220
220
|
enabled?: boolean
|
|
221
221
|
}
|
|
222
222
|
export type UseScrollbar = boolean
|
|
223
|
-
export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding'> {
|
|
223
|
+
export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible'> {
|
|
224
|
+
/**
|
|
225
|
+
* 滚动条宽度
|
|
226
|
+
*/
|
|
227
|
+
width?: number | string
|
|
228
|
+
/**
|
|
229
|
+
* 滚动条高度
|
|
230
|
+
*/
|
|
231
|
+
height?: number | string
|
|
232
|
+
}
|
|
224
233
|
}
|
|
225
234
|
|
|
226
235
|
export interface VxeListProps<D = any> {
|
|
@@ -297,8 +306,10 @@ export interface ListInternalData {
|
|
|
297
306
|
fullKeyMaps: Record<string, any>
|
|
298
307
|
rowMaps: Record<string, VxeListDefines.RowCacheItem>
|
|
299
308
|
|
|
300
|
-
// 滚动条
|
|
301
309
|
resizeObserver?: ResizeObserver
|
|
310
|
+
|
|
311
|
+
// 滚动条
|
|
312
|
+
scrollObserver?: ResizeObserver
|
|
302
313
|
isThumbDrag?: boolean
|
|
303
314
|
thumbDragOffset: number
|
|
304
315
|
yThumbTop: number
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CreateElement } from 'vue'
|
|
2
2
|
import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentSizeType, VxeComponentEventParams, ValueOf, VxeComponentSlotType } from '@vxe-ui/core'
|
|
3
|
+
import { VxeScrollbarProps } from './scrollbar'
|
|
3
4
|
|
|
4
5
|
/* eslint-disable @typescript-eslint/no-empty-interface,no-use-before-define,@typescript-eslint/ban-types */
|
|
5
6
|
|
|
@@ -120,6 +121,17 @@ export namespace VxeModalPropTypes {
|
|
|
120
121
|
type: ModalEventTypes
|
|
121
122
|
}) => Promise<any>
|
|
122
123
|
export type Slots = VxeModalSlots
|
|
124
|
+
export type UseScrollbar = boolean
|
|
125
|
+
export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
|
|
126
|
+
/**
|
|
127
|
+
* 滚动条宽度
|
|
128
|
+
*/
|
|
129
|
+
width?: number | string
|
|
130
|
+
/**
|
|
131
|
+
* 滚动条高度
|
|
132
|
+
*/
|
|
133
|
+
height?: number | string
|
|
134
|
+
}
|
|
123
135
|
}
|
|
124
136
|
|
|
125
137
|
export interface VxeModalProps {
|
|
@@ -189,6 +201,14 @@ export interface VxeModalProps {
|
|
|
189
201
|
padding?: VxeModalPropTypes.Padding
|
|
190
202
|
beforeHideMethod?: VxeModalPropTypes.BeforeHideMethod
|
|
191
203
|
slots?: VxeModalPropTypes.Slots
|
|
204
|
+
/**
|
|
205
|
+
* 使用虚拟滚动条
|
|
206
|
+
*/
|
|
207
|
+
useScrollbar?: VxeModalPropTypes.UseScrollbar
|
|
208
|
+
/**
|
|
209
|
+
* 滚动条配置项
|
|
210
|
+
*/
|
|
211
|
+
scrollbarConfig?: VxeModalPropTypes.ScrollbarConfig
|
|
192
212
|
/**
|
|
193
213
|
* @deprecated 已废弃,请使用 content
|
|
194
214
|
*/
|
|
@@ -28,6 +28,8 @@ export namespace VxeScrollbarPropTypes {
|
|
|
28
28
|
export type Loading = boolean
|
|
29
29
|
export type Native = boolean
|
|
30
30
|
export type Padding = boolean
|
|
31
|
+
export type AutoHide = boolean
|
|
32
|
+
export type Visible = boolean
|
|
31
33
|
export interface XConfig {
|
|
32
34
|
height?: number | string
|
|
33
35
|
// showArrows?: boolean
|
|
@@ -39,7 +41,7 @@ export namespace VxeScrollbarPropTypes {
|
|
|
39
41
|
* 滚动条显示位置
|
|
40
42
|
*/
|
|
41
43
|
position?: 'top' | 'bottom' | ''
|
|
42
|
-
visible?:
|
|
44
|
+
visible?: boolean
|
|
43
45
|
/**
|
|
44
46
|
* 滚动到边界触发的阈值会触发 scroll-boundary 事件
|
|
45
47
|
*/
|
|
@@ -56,7 +58,7 @@ export namespace VxeScrollbarPropTypes {
|
|
|
56
58
|
* 滚动条显示位置
|
|
57
59
|
*/
|
|
58
60
|
position?: 'left' | 'right' | ''
|
|
59
|
-
visible?:
|
|
61
|
+
visible?: boolean
|
|
60
62
|
/**
|
|
61
63
|
* 滚动到边界触发的阈值会触发 scroll-boundary 事件
|
|
62
64
|
*/
|
|
@@ -75,6 +77,10 @@ export interface VxeScrollbarProps {
|
|
|
75
77
|
* ID
|
|
76
78
|
*/
|
|
77
79
|
id?: VxeScrollbarPropTypes.Id
|
|
80
|
+
/**
|
|
81
|
+
* View ID
|
|
82
|
+
*/
|
|
83
|
+
viewId?: VxeScrollbarPropTypes.ViewId
|
|
78
84
|
/**
|
|
79
85
|
* 容器宽度
|
|
80
86
|
*/
|
|
@@ -111,6 +117,14 @@ export interface VxeScrollbarProps {
|
|
|
111
117
|
* 滚动条是否需要边距
|
|
112
118
|
*/
|
|
113
119
|
padding?: VxeScrollbarPropTypes.Padding
|
|
120
|
+
/**
|
|
121
|
+
* 是否自动隐藏
|
|
122
|
+
*/
|
|
123
|
+
autoHide?: VxeScrollbarPropTypes.AutoHide
|
|
124
|
+
/**
|
|
125
|
+
* 是否显示
|
|
126
|
+
*/
|
|
127
|
+
visible?: VxeScrollbarPropTypes.Visible
|
|
114
128
|
/**
|
|
115
129
|
* 纵向滚动条宽度
|
|
116
130
|
*/
|
|
@@ -12,6 +12,7 @@ import { VxeTabsConstructor, VxeTabsPrivateMethods } from './tabs'
|
|
|
12
12
|
import { VxeSplitterConstructor, VxeSplitterMethods } from './splitter'
|
|
13
13
|
import { VxeGanttConstructor, VxeGanttPrivateMethods } from './gantt'
|
|
14
14
|
import { VxeGanttViewConstructor, VxeGanttViewInstance, VxeGanttViewPrivateMethods } from './gantt-module/gantt-view'
|
|
15
|
+
import { VxeScrollbarPropTypes } from './scrollbar'
|
|
15
16
|
|
|
16
17
|
/* eslint-disable @typescript-eslint/no-empty-interface,no-use-before-define,@typescript-eslint/ban-types,@typescript-eslint/no-unused-vars */
|
|
17
18
|
|
|
@@ -2940,33 +2941,52 @@ export namespace VxeTablePropTypes {
|
|
|
2940
2941
|
}
|
|
2941
2942
|
|
|
2942
2943
|
export interface ScrollbarXConfig {
|
|
2944
|
+
/**
|
|
2945
|
+
* 滚动条高度
|
|
2946
|
+
*/
|
|
2947
|
+
height?: number
|
|
2943
2948
|
/**
|
|
2944
2949
|
* 滚动条显示位置
|
|
2945
2950
|
*/
|
|
2946
2951
|
position?: 'top' | 'bottom' | ''
|
|
2947
2952
|
/**
|
|
2948
|
-
*
|
|
2953
|
+
* 是否显示
|
|
2949
2954
|
*/
|
|
2950
2955
|
visible?: 'auto' | 'visible' | 'hidden' | boolean
|
|
2956
|
+
/**
|
|
2957
|
+
* 是否自动隐藏滚动条
|
|
2958
|
+
*/
|
|
2959
|
+
autoHide?: boolean
|
|
2951
2960
|
/**
|
|
2952
2961
|
* 滚动行为
|
|
2962
|
+
* @deprecated
|
|
2953
2963
|
*/
|
|
2954
2964
|
overscrollBehavior?: 'contain' | 'none' | ''
|
|
2955
2965
|
}
|
|
2956
2966
|
export interface ScrollbarYConfig {
|
|
2967
|
+
/**
|
|
2968
|
+
* 滚动条宽度
|
|
2969
|
+
*/
|
|
2970
|
+
width?: number
|
|
2957
2971
|
/**
|
|
2958
2972
|
* 滚动条显示位置
|
|
2959
2973
|
*/
|
|
2960
2974
|
position?: 'left' | 'right' | ''
|
|
2961
2975
|
/**
|
|
2962
|
-
*
|
|
2976
|
+
* 是否显示
|
|
2963
2977
|
*/
|
|
2964
2978
|
visible?: 'auto' | 'visible' | 'hidden' | boolean
|
|
2979
|
+
/**
|
|
2980
|
+
* 是否自动隐藏滚动条
|
|
2981
|
+
*/
|
|
2982
|
+
autoHide?: boolean
|
|
2965
2983
|
/**
|
|
2966
2984
|
* 滚动行为
|
|
2985
|
+
* @deprecated
|
|
2967
2986
|
*/
|
|
2968
2987
|
overscrollBehavior?: 'contain' | 'none' | ''
|
|
2969
2988
|
}
|
|
2989
|
+
export type UseScrollbar = boolean
|
|
2970
2990
|
/**
|
|
2971
2991
|
* 滚动条配置项
|
|
2972
2992
|
*/
|
|
@@ -2979,18 +2999,38 @@ export namespace VxeTablePropTypes {
|
|
|
2979
2999
|
* 滚动条高度
|
|
2980
3000
|
*/
|
|
2981
3001
|
height?: number
|
|
3002
|
+
padding?: boolean
|
|
3003
|
+
/**
|
|
3004
|
+
* 是否自动隐藏滚动条
|
|
3005
|
+
*/
|
|
3006
|
+
autoHide?: boolean
|
|
3007
|
+
/**
|
|
3008
|
+
* 是否显示
|
|
3009
|
+
*/
|
|
3010
|
+
visible?: boolean
|
|
2982
3011
|
/**
|
|
2983
3012
|
* 滚动行为
|
|
3013
|
+
* @deprecated
|
|
2984
3014
|
*/
|
|
2985
3015
|
overscrollBehavior?: 'contain' | 'none' | ''
|
|
2986
3016
|
/**
|
|
2987
|
-
*
|
|
3017
|
+
* 已废弃,请使用 xConfig
|
|
3018
|
+
* @deprecated
|
|
2988
3019
|
*/
|
|
2989
3020
|
x?: ScrollbarXConfig
|
|
2990
3021
|
/**
|
|
2991
|
-
*
|
|
3022
|
+
* 横向滚动条
|
|
3023
|
+
*/
|
|
3024
|
+
xConfig?: ScrollbarXConfig
|
|
3025
|
+
/**
|
|
3026
|
+
* 已废弃,请使用 yConfig
|
|
3027
|
+
* @deprecated
|
|
2992
3028
|
*/
|
|
2993
3029
|
y?: ScrollbarYConfig
|
|
3030
|
+
/**
|
|
3031
|
+
* 纵向滚动条
|
|
3032
|
+
*/
|
|
3033
|
+
yConfig?: ScrollbarYConfig
|
|
2994
3034
|
}
|
|
2995
3035
|
|
|
2996
3036
|
/**
|
|
@@ -3839,6 +3879,10 @@ export interface VxeTableProps<D = any> {
|
|
|
3839
3879
|
* 纵向虚拟滚动配置
|
|
3840
3880
|
*/
|
|
3841
3881
|
virtualYConfig?: VxeTablePropTypes.VirtualYConfig
|
|
3882
|
+
/**
|
|
3883
|
+
* 使用虚拟滚动条
|
|
3884
|
+
*/
|
|
3885
|
+
useScrollbar?: VxeTablePropTypes.UseScrollbar
|
|
3842
3886
|
/**
|
|
3843
3887
|
* 滚动条配置项
|
|
3844
3888
|
*/
|
|
@@ -3927,8 +3971,15 @@ export interface TablePrivateComputed<D = any> {
|
|
|
3927
3971
|
computeScrollbarOpts: VxeTablePropTypes.ScrollbarConfig
|
|
3928
3972
|
computeScrollbarXOpts: VxeTablePropTypes.ScrollbarXConfig
|
|
3929
3973
|
computeScrollbarYOpts: VxeTablePropTypes.ScrollbarYConfig
|
|
3974
|
+
computeScrollXHeight: number | undefined
|
|
3975
|
+
computeScrollYWidth: number | undefined
|
|
3976
|
+
computeScrollXVisible: 'auto' | 'visible' | 'hidden' | boolean | undefined
|
|
3977
|
+
computeScrollYVisible: 'auto' | 'visible' | 'hidden' | boolean | undefined
|
|
3978
|
+
computeScrollXAutoHide: VxeScrollbarPropTypes.AutoHide | undefined
|
|
3979
|
+
computeScrollYAutoHide: VxeScrollbarPropTypes.AutoHide | undefined
|
|
3930
3980
|
computeScrollbarXToTop: boolean
|
|
3931
3981
|
computeScrollbarYToLeft: boolean
|
|
3982
|
+
computeScrollbarWrapperClss: string
|
|
3932
3983
|
computeColumnOpts: VxeTablePropTypes.ColumnOpts
|
|
3933
3984
|
computeCurrentColumnOpts: VxeTablePropTypes.CurrentColumnConfig
|
|
3934
3985
|
computeScrollXThreshold: number
|
|
@@ -4095,6 +4146,11 @@ export interface TableReactData<D = any> {
|
|
|
4095
4146
|
scrollbarWidth: number
|
|
4096
4147
|
// 横向滚动条的高度
|
|
4097
4148
|
scrollbarHeight: number
|
|
4149
|
+
|
|
4150
|
+
// 滚动条
|
|
4151
|
+
yThumbHeight: number
|
|
4152
|
+
xThumbWidth: number
|
|
4153
|
+
|
|
4098
4154
|
/**
|
|
4099
4155
|
* 行高
|
|
4100
4156
|
* @deprecated
|
|
@@ -4336,9 +4392,17 @@ export interface TableInternalData<D = any> {
|
|
|
4336
4392
|
currentRow: D | null
|
|
4337
4393
|
currentCol: VxeTableDefines.ColumnInfo | null
|
|
4338
4394
|
|
|
4339
|
-
|
|
4340
|
-
|
|
4395
|
+
resizeObserver?: ResizeObserver
|
|
4396
|
+
|
|
4397
|
+
// 滚动条
|
|
4398
|
+
scrollObserver?: ResizeObserver
|
|
4399
|
+
isThumbDrag?: boolean
|
|
4400
|
+
thumbDragOffset: number
|
|
4401
|
+
yThumbTop: number
|
|
4402
|
+
xThumbLeft: number
|
|
4341
4403
|
lastScrollTop: number
|
|
4404
|
+
lastScrollLeft: number
|
|
4405
|
+
|
|
4342
4406
|
// 单选框属性,已选中保留的行
|
|
4343
4407
|
radioReserveRow: any
|
|
4344
4408
|
// 复选框属性,已选中保留的行
|
|
@@ -5938,6 +6002,16 @@ export interface TablePrivateMethods<D = any> {
|
|
|
5938
6002
|
row: any
|
|
5939
6003
|
column: VxeTableDefines.ColumnInfo
|
|
5940
6004
|
}, cellValue?: any): Promise<any>
|
|
6005
|
+
/**
|
|
6006
|
+
* 内部方法
|
|
6007
|
+
* @private
|
|
6008
|
+
*/
|
|
6009
|
+
updateScrollbar(): void
|
|
6010
|
+
/**
|
|
6011
|
+
* 内部方法
|
|
6012
|
+
* @private
|
|
6013
|
+
*/
|
|
6014
|
+
updateThumbOffset(): void
|
|
5941
6015
|
/**
|
|
5942
6016
|
* 内部方法
|
|
5943
6017
|
* @private
|