vxe-pc-ui 3.20.1 → 3.20.5
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 +2 -1
- 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/layout-aside/src/layout-aside.js +2 -1
- package/es/layout-body/src/layout-body.js +2 -1
- package/es/list/src/list.js +57 -25
- 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 +22 -6
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tabs/src/tabs.js +2 -2
- package/es/tree/src/tree.js +50 -27
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-drawer/style.css +13 -6
- package/es/vxe-drawer/style.min.css +1 -1
- package/es/vxe-modal/style.css +4 -0
- package/es/vxe-modal/style.min.css +1 -1
- package/lib/card/src/card.js +2 -1
- 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 +425 -191
- package/lib/index.umd.min.js +1 -1
- package/lib/layout-aside/src/layout-aside.js +2 -1
- package/lib/layout-aside/src/layout-aside.min.js +1 -1
- package/lib/layout-body/src/layout-body.js +2 -1
- package/lib/layout-body/src/layout-body.min.js +1 -1
- package/lib/list/src/list.js +107 -64
- package/lib/list/src/list.min.js +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 +35 -15
- 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 +1 -1
- package/lib/tabs/src/tabs.min.js +1 -1
- package/lib/tree/src/tree.js +64 -36
- package/lib/tree/src/tree.min.js +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/vxe-drawer/style/style.css +13 -6
- package/lib/vxe-drawer/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/package.json +2 -2
- package/packages/card/src/card.ts +2 -1
- package/packages/drawer/src/drawer.ts +80 -16
- package/packages/layout-aside/src/layout-aside.ts +2 -1
- package/packages/layout-body/src/layout-body.ts +2 -1
- package/packages/list/src/list.ts +66 -25
- package/packages/menu/src/menu.ts +2 -2
- package/packages/modal/src/modal.ts +83 -19
- package/packages/scrollbar/src/scrollbar.ts +27 -6
- package/packages/tabs/src/tabs.ts +2 -2
- package/packages/tree/src/tree.ts +60 -31
- package/styles/components/drawer.scss +13 -6
- package/styles/components/modal.scss +4 -0
- package/types/components/drawer.d.ts +20 -0
- package/types/components/gantt-module/gantt-view.d.ts +24 -1
- package/types/components/gantt-plugins/extend-gantt-chart.d.ts +1 -1
- package/types/components/gantt.d.ts +2 -0
- package/types/components/layout-aside.d.ts +15 -0
- package/types/components/layout-body.d.ts +3 -0
- package/types/components/list.d.ts +18 -1
- package/types/components/modal.d.ts +20 -0
- package/types/components/number-input.d.ts +12 -2
- package/types/components/table-plugins/extend-pivot-table.d.ts +1 -1
- package/types/components/table.d.ts +36 -2
- package/types/components/tree.d.ts +15 -1
- package/es/scrollbar/src/util.js +0 -54
- package/lib/scrollbar/src/util.js +0 -63
- package/lib/scrollbar/src/util.min.js +0 -1
- package/packages/scrollbar/src/util.ts +0 -57
- /package/es/icon/{iconfont.1791950618327.ttf → iconfont.1792048654011.ttf} +0 -0
- /package/es/icon/{iconfont.1791950618327.woff → iconfont.1792048654011.woff} +0 -0
- /package/es/icon/{iconfont.1791950618327.woff2 → iconfont.1792048654011.woff2} +0 -0
- /package/es/{iconfont.1791950618327.ttf → iconfont.1792048654011.ttf} +0 -0
- /package/es/{iconfont.1791950618327.woff → iconfont.1792048654011.woff} +0 -0
- /package/es/{iconfont.1791950618327.woff2 → iconfont.1792048654011.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1791950618327.ttf → iconfont.1792048654011.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1791950618327.woff → iconfont.1792048654011.woff} +0 -0
- /package/lib/icon/style/{iconfont.1791950618327.woff2 → iconfont.1792048654011.woff2} +0 -0
- /package/lib/{iconfont.1791950618327.ttf → iconfont.1792048654011.ttf} +0 -0
- /package/lib/{iconfont.1791950618327.woff → iconfont.1792048654011.woff} +0 -0
- /package/lib/{iconfont.1791950618327.woff2 → iconfont.1792048654011.woff2} +0 -0
|
@@ -9,7 +9,6 @@ import { crossTreeDragNodeGlobal, getCrossTreeDragNodeInfo } from './store'
|
|
|
9
9
|
import { toCssUnit, isScale, getPaddingTopBottomSize, addClass, removeClass, getTpImg, hasControlKey, getEventTargetNode, hasClass } from '../../ui/src/dom'
|
|
10
10
|
import { isEnableConf, enModelValue, deModelValue, getText, getDefaultConfig } from '../../ui/src/utils'
|
|
11
11
|
import { moveRowAnimateToTb, clearRowAnimate } from '../../ui/src/anime'
|
|
12
|
-
import { getThumbOffsetSize, getThumbSize, getScrollFromClick, getScrollFromDrag } from '../../scrollbar/src/util'
|
|
13
12
|
import VxeLoadingComponent from '../../loading'
|
|
14
13
|
import VxeTooltipComponent from '../../tooltip'
|
|
15
14
|
|
|
@@ -17,7 +16,9 @@ import type { TreeReactData, VxeTreeEmits, VxeTreeConstructor, VxeTreePropTypes,
|
|
|
17
16
|
|
|
18
17
|
const { warnLog, errLog } = createComponentLog('tree')
|
|
19
18
|
|
|
20
|
-
const { menus, getConfig, getI18n, getIcon } = VxeUI
|
|
19
|
+
const { menus, scrollbarUtils, getConfig, getI18n, getIcon } = VxeUI
|
|
20
|
+
|
|
21
|
+
const { getThumbOffsetSize, getThumbSize, getScrollFromClick, getScrollFromDrag } = scrollbarUtils
|
|
21
22
|
|
|
22
23
|
let crossTreeDragNodeObj: {
|
|
23
24
|
$oldTree: VxeTreeConstructor & VxeTreePrivateMethods
|
|
@@ -584,8 +585,10 @@ function createInternalData (): TreeInternalData {
|
|
|
584
585
|
treeExpandedMaps: {},
|
|
585
586
|
treeExpandLazyLoadedMaps: {},
|
|
586
587
|
|
|
587
|
-
// 滚动条
|
|
588
588
|
// resizeObserver: undefined,
|
|
589
|
+
|
|
590
|
+
// 滚动条
|
|
591
|
+
// scrollObserver: undefined,
|
|
589
592
|
// isThumbDrag: false,
|
|
590
593
|
thumbDragOffset: 0,
|
|
591
594
|
yThumbTop: 0,
|
|
@@ -748,7 +751,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
748
751
|
virtualYConfig: Object as PropType<VxeTreePropTypes.VirtualYConfig>,
|
|
749
752
|
useScrollbar: {
|
|
750
753
|
type: Boolean as PropType<VxeTreePropTypes.UseScrollbar>,
|
|
751
|
-
default: () => getConfig().tree.useScrollbar
|
|
754
|
+
default: () => getDefaultConfig(getConfig().tree.useScrollbar, getConfig().useScrollbar)
|
|
752
755
|
},
|
|
753
756
|
scrollbarConfig: Object as PropType<VxeTreePropTypes.ScrollbarConfig>
|
|
754
757
|
},
|
|
@@ -893,11 +896,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
893
896
|
computeWrapperStyles () {
|
|
894
897
|
const $xeTree = this
|
|
895
898
|
|
|
896
|
-
const
|
|
897
|
-
const
|
|
898
|
-
const scrollbarYOpts = $xeTree.computeScrollbarYOpts
|
|
899
|
-
const barWidth = getDefaultConfig(getDefaultConfig(scrollbarYOpts.width, scrollbarOpts.width), getConfig().scrollbar.width)
|
|
900
|
-
const barHeight = getDefaultConfig(getDefaultConfig(scrollbarXOpts.height, scrollbarOpts.height), getConfig().scrollbar.height)
|
|
899
|
+
const barWidth = $xeTree.computeScrollYWidth
|
|
900
|
+
const barHeight = $xeTree.computeScrollXHeight
|
|
901
901
|
const stys: VxeComponentStyleType = {}
|
|
902
902
|
if (barWidth || barHeight) {
|
|
903
903
|
stys['--vxe-ui-scrollbar-y-width'] = toCssUnit(barWidth || barHeight)
|
|
@@ -944,13 +944,13 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
944
944
|
|
|
945
945
|
return Object.assign({}, getConfig().tree.filterConfig, props.filterConfig)
|
|
946
946
|
},
|
|
947
|
-
computeScrollbarOpts
|
|
947
|
+
computeScrollbarOpts () {
|
|
948
948
|
const $xeTree = this
|
|
949
949
|
const props = $xeTree
|
|
950
950
|
|
|
951
951
|
return Object.assign({}, getConfig().tree.scrollbarConfig, props.scrollbarConfig)
|
|
952
952
|
},
|
|
953
|
-
computeScrollbarXOpts
|
|
953
|
+
computeScrollbarXOpts () {
|
|
954
954
|
const $xeTree = this
|
|
955
955
|
|
|
956
956
|
const scrollbarOpts = $xeTree.computeScrollbarOpts as VxeTreePropTypes.ScrollbarConfig
|
|
@@ -958,12 +958,26 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
958
958
|
visible: false
|
|
959
959
|
})
|
|
960
960
|
},
|
|
961
|
-
computeScrollbarYOpts
|
|
961
|
+
computeScrollbarYOpts () {
|
|
962
962
|
const $xeTree = this
|
|
963
963
|
|
|
964
964
|
const scrollbarOpts = $xeTree.computeScrollbarOpts as VxeTreePropTypes.ScrollbarConfig
|
|
965
965
|
return Object.assign({}, getConfig().scrollbar.yConfig, scrollbarOpts.yConfig)
|
|
966
966
|
},
|
|
967
|
+
computeScrollXHeight () {
|
|
968
|
+
const $xeTree = this
|
|
969
|
+
|
|
970
|
+
const scrollbarOpts = $xeTree.computeScrollbarOpts as VxeTreePropTypes.ScrollbarConfig
|
|
971
|
+
const scrollbarXOpts = $xeTree.computeScrollbarXOpts as VxeScrollbarPropTypes.XConfig
|
|
972
|
+
return getDefaultConfig(getDefaultConfig(scrollbarXOpts.height, scrollbarOpts.height), getConfig().scrollbar.height)
|
|
973
|
+
},
|
|
974
|
+
computeScrollYWidth () {
|
|
975
|
+
const $xeTree = this
|
|
976
|
+
|
|
977
|
+
const scrollbarOpts = $xeTree.computeScrollbarOpts as VxeTreePropTypes.ScrollbarConfig
|
|
978
|
+
const scrollbarYOpts = $xeTree.computeScrollbarYOpts as VxeScrollbarPropTypes.YConfig
|
|
979
|
+
return getDefaultConfig(getDefaultConfig(scrollbarYOpts.width, scrollbarOpts.width), getConfig().scrollbar.width)
|
|
980
|
+
},
|
|
967
981
|
computeScrollXVisible () {
|
|
968
982
|
const $xeTree = this
|
|
969
983
|
|
|
@@ -994,17 +1008,13 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
994
1008
|
},
|
|
995
1009
|
computeScrollbarWrapperClss () {
|
|
996
1010
|
const $xeTree = this
|
|
997
|
-
const reactData = ($xeTree as any).reactData
|
|
1011
|
+
const reactData = ($xeTree as any).reactData as TreeReactData
|
|
998
1012
|
|
|
999
|
-
const scrollbarOpts = $xeTree.computeScrollbarOpts as VxeTreePropTypes.ScrollbarConfig
|
|
1000
|
-
const { padding } = scrollbarOpts
|
|
1001
1013
|
const { yThumbHeight, xThumbWidth } = reactData
|
|
1002
1014
|
const scrollbarXToTop = $xeTree.computeScrollbarXToTop
|
|
1003
1015
|
const scrollbarYToLeft = $xeTree.computeScrollbarYToLeft
|
|
1004
1016
|
const scrollXVisible = $xeTree.computeScrollXVisible
|
|
1005
1017
|
const scrollYVisible = $xeTree.computeScrollYVisible
|
|
1006
|
-
const scrollXAutoHide = $xeTree.computeScrollXAutoHide as boolean
|
|
1007
|
-
const scrollYAutoHide = $xeTree.computeScrollYAutoHide as boolean
|
|
1008
1018
|
return domUtils.buildClass([
|
|
1009
1019
|
'vxe-scrollbar is--virtual',
|
|
1010
1020
|
`ov-x--${scrollXVisible === false ? 'hidden' : 'visible'}`,
|
|
@@ -1012,9 +1022,6 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1012
1022
|
`sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}`,
|
|
1013
1023
|
`sy-pos--${scrollbarYToLeft ? 'left' : 'right'}`
|
|
1014
1024
|
], {
|
|
1015
|
-
'is--padding': padding,
|
|
1016
|
-
'ov-x--auto-hide': scrollXAutoHide,
|
|
1017
|
-
'ov-y--auto-hide': scrollYAutoHide,
|
|
1018
1025
|
'overflow-y': yThumbHeight,
|
|
1019
1026
|
'overflow-x': xThumbWidth
|
|
1020
1027
|
})
|
|
@@ -4262,6 +4269,16 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
4262
4269
|
|
|
4263
4270
|
$xeTree.reFlag++
|
|
4264
4271
|
},
|
|
4272
|
+
computeScrollYWidth () {
|
|
4273
|
+
const $xeTree = this
|
|
4274
|
+
|
|
4275
|
+
$xeTree.reFlag++
|
|
4276
|
+
},
|
|
4277
|
+
computeScrollXHeight () {
|
|
4278
|
+
const $xeTree = this
|
|
4279
|
+
|
|
4280
|
+
$xeTree.reFlag++
|
|
4281
|
+
},
|
|
4265
4282
|
computeScrollXVisible () {
|
|
4266
4283
|
const $xeTree = this
|
|
4267
4284
|
|
|
@@ -4320,23 +4337,32 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
4320
4337
|
if (menuConfig && !VxeUIContextMenu) {
|
|
4321
4338
|
errLog('vxe.error.reqComp', ['vxe-context-menu'])
|
|
4322
4339
|
}
|
|
4323
|
-
|
|
4324
|
-
|
|
4340
|
+
const el = $xeTree.$refs.refElem as HTMLDivElement
|
|
4341
|
+
if (useScrollbar) {
|
|
4325
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
|
+
if (autoResize) {
|
|
4326
4355
|
const parentEl = $xeTree.getParentElem()
|
|
4327
4356
|
const resizeObserver = globalResize.create(() => {
|
|
4328
|
-
|
|
4357
|
+
if (props.autoResize) {
|
|
4358
|
+
$xeTree.reFlag++
|
|
4359
|
+
}
|
|
4329
4360
|
})
|
|
4330
4361
|
if (el) {
|
|
4331
4362
|
resizeObserver.observe(el)
|
|
4332
|
-
if (autoResize) {
|
|
4333
|
-
if (parentEl) {
|
|
4334
|
-
resizeObserver.observe(parentEl)
|
|
4335
|
-
}
|
|
4336
|
-
}
|
|
4337
4363
|
}
|
|
4338
|
-
if (
|
|
4339
|
-
resizeObserver.observe(
|
|
4364
|
+
if (parentEl) {
|
|
4365
|
+
resizeObserver.observe(parentEl)
|
|
4340
4366
|
}
|
|
4341
4367
|
internalData.resizeObserver = resizeObserver
|
|
4342
4368
|
}
|
|
@@ -4351,10 +4377,13 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
4351
4377
|
const reactData = $xeTree.reactData
|
|
4352
4378
|
const internalData = $xeTree.internalData
|
|
4353
4379
|
|
|
4354
|
-
const { resizeObserver } = internalData
|
|
4380
|
+
const { scrollObserver, resizeObserver } = internalData
|
|
4355
4381
|
if (resizeObserver) {
|
|
4356
4382
|
resizeObserver.disconnect()
|
|
4357
4383
|
}
|
|
4384
|
+
if (scrollObserver) {
|
|
4385
|
+
scrollObserver.disconnect()
|
|
4386
|
+
}
|
|
4358
4387
|
globalEvents.off($xeTree, 'resize')
|
|
4359
4388
|
XEUtils.assign(reactData, createReactData())
|
|
4360
4389
|
XEUtils.assign(internalData, createInternalData())
|
|
@@ -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
|
+
}
|
|
@@ -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 {
|
|
@@ -37,7 +37,7 @@ export interface VxeGanttExtendChartPrivateMethods<D = any> {
|
|
|
37
37
|
* 内部方法
|
|
38
38
|
* @private
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
handleTaskBarModnEvent(evnt: MouseEvent, params: {
|
|
41
41
|
$gantt: VxeGanttConstructor<D>
|
|
42
42
|
row: D
|
|
43
43
|
scaleType: VxeGanttDefines.ColumnScaleType
|
|
@@ -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
|
}
|
|
@@ -43,10 +43,25 @@ export namespace VxeLayoutAsidePropTypes {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export interface VxeLayoutAsideProps {
|
|
46
|
+
/**
|
|
47
|
+
* 宽度
|
|
48
|
+
*/
|
|
46
49
|
width?: VxeLayoutAsidePropTypes.Width
|
|
50
|
+
/**
|
|
51
|
+
* 是否折叠
|
|
52
|
+
*/
|
|
47
53
|
collapsed?: VxeLayoutAsidePropTypes.Collapsed
|
|
54
|
+
/**
|
|
55
|
+
* 折叠后宽度
|
|
56
|
+
*/
|
|
48
57
|
collapseWidth?: VxeLayoutAsidePropTypes.CollapseWidth
|
|
58
|
+
/**
|
|
59
|
+
* 加载中
|
|
60
|
+
*/
|
|
49
61
|
loading?: VxeLayoutAsidePropTypes.Loading
|
|
62
|
+
/**
|
|
63
|
+
* 显示内边距
|
|
64
|
+
*/
|
|
50
65
|
padding?: VxeLayoutAsidePropTypes.Padding
|
|
51
66
|
size?: VxeLayoutAsidePropTypes.Size
|
|
52
67
|
collapseConfig?: VxeLayoutAsidePropTypes.CollapseConfig
|
|
@@ -38,6 +38,9 @@ export namespace VxeLayoutBodyPropTypes {
|
|
|
38
38
|
}
|
|
39
39
|
export interface VxeLayoutBodyProps {
|
|
40
40
|
size?: VxeLayoutBodyPropTypes.Size
|
|
41
|
+
/**
|
|
42
|
+
* 加载中
|
|
43
|
+
*/
|
|
41
44
|
loading?: VxeLayoutBodyPropTypes.Loading
|
|
42
45
|
padding?: VxeLayoutBodyPropTypes.Padding
|
|
43
46
|
showBacktop?: VxeLayoutBodyPropTypes.ShowBacktop
|
|
@@ -235,8 +235,17 @@ export namespace VxeListPropTypes {
|
|
|
235
235
|
export interface VxeListProps<D = any> {
|
|
236
236
|
size?: VxeListPropTypes.Size
|
|
237
237
|
data?: D[]
|
|
238
|
+
/**
|
|
239
|
+
* 高度
|
|
240
|
+
*/
|
|
238
241
|
height?: VxeListPropTypes.Height
|
|
242
|
+
/**
|
|
243
|
+
* 最大高度
|
|
244
|
+
*/
|
|
239
245
|
maxHeight?: VxeListPropTypes.MaxHeight
|
|
246
|
+
/**
|
|
247
|
+
* 加载中
|
|
248
|
+
*/
|
|
240
249
|
loading?: VxeListPropTypes.Loading
|
|
241
250
|
autoResize?: VxeListPropTypes.AutoResize
|
|
242
251
|
syncResize?: VxeListPropTypes.SyncResize
|
|
@@ -250,7 +259,13 @@ export interface VxeListProps<D = any> {
|
|
|
250
259
|
checkboxConfig?: VxeListPropTypes.CheckboxConfig
|
|
251
260
|
rowConfig?: VxeListPropTypes.RowConfig
|
|
252
261
|
dragConfig?: VxeListPropTypes.DragConfig
|
|
262
|
+
/**
|
|
263
|
+
* 右键菜单配置项
|
|
264
|
+
*/
|
|
253
265
|
menuConfig?: VxeListPropTypes.MenuConfig
|
|
266
|
+
/**
|
|
267
|
+
* 纵向虚拟滚动配置
|
|
268
|
+
*/
|
|
254
269
|
virtualYConfig?: VxeListPropTypes.VirtualYConfig
|
|
255
270
|
/**
|
|
256
271
|
* 使用虚拟滚动条
|
|
@@ -306,8 +321,10 @@ export interface ListInternalData {
|
|
|
306
321
|
fullKeyMaps: Record<string, any>
|
|
307
322
|
rowMaps: Record<string, VxeListDefines.RowCacheItem>
|
|
308
323
|
|
|
309
|
-
// 滚动条
|
|
310
324
|
resizeObserver?: ResizeObserver
|
|
325
|
+
|
|
326
|
+
// 滚动条
|
|
327
|
+
scrollObserver?: ResizeObserver
|
|
311
328
|
isThumbDrag?: boolean
|
|
312
329
|
thumbDragOffset: number
|
|
313
330
|
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
|
*/
|
|
@@ -32,7 +32,6 @@ export namespace VxeNumberInputPropTypes {
|
|
|
32
32
|
export type FloatContent = string
|
|
33
33
|
export type FloatAlign = VxeComponentAlignType
|
|
34
34
|
export type MaxLength = string | number | null
|
|
35
|
-
export type Multiple = boolean
|
|
36
35
|
export type AutoComplete = string
|
|
37
36
|
export type Align = string
|
|
38
37
|
export type Form = string
|
|
@@ -119,6 +118,9 @@ export namespace VxeNumberInputPropTypes {
|
|
|
119
118
|
}
|
|
120
119
|
|
|
121
120
|
export interface VxeNumberInputProps {
|
|
121
|
+
/**
|
|
122
|
+
* 尺寸大小
|
|
123
|
+
*/
|
|
122
124
|
size?: VxeNumberInputPropTypes.Size
|
|
123
125
|
value?: VxeNumberInputPropTypes.ModelValue
|
|
124
126
|
className?: VxeNumberInputPropTypes.ClassName
|
|
@@ -129,7 +131,13 @@ export interface VxeNumberInputProps {
|
|
|
129
131
|
width?: VxeNumberInputPropTypes.Width
|
|
130
132
|
immediate?: VxeNumberInputPropTypes.Immediate
|
|
131
133
|
name?: VxeNumberInputPropTypes.Name
|
|
134
|
+
/**
|
|
135
|
+
* 控件类型
|
|
136
|
+
*/
|
|
132
137
|
type?: VxeNumberInputPropTypes.Type
|
|
138
|
+
/**
|
|
139
|
+
* 显示清除按钮
|
|
140
|
+
*/
|
|
133
141
|
clearable?: VxeNumberInputPropTypes.Clearable
|
|
134
142
|
readonly?: VxeNumberInputPropTypes.Readonly
|
|
135
143
|
disabled?: VxeNumberInputPropTypes.Disabled
|
|
@@ -137,8 +145,10 @@ export interface VxeNumberInputProps {
|
|
|
137
145
|
floatContent?: VxeNumberInputPropTypes.FloatContent
|
|
138
146
|
floatAlign?: VxeNumberInputPropTypes.FloatAlign
|
|
139
147
|
maxLength?: VxeNumberInputPropTypes.MaxLength
|
|
140
|
-
multiple?: VxeNumberInputPropTypes.Multiple
|
|
141
148
|
autoComplete?: VxeNumberInputPropTypes.AutoComplete
|
|
149
|
+
/**
|
|
150
|
+
* 对齐方式
|
|
151
|
+
*/
|
|
142
152
|
align?: VxeNumberInputPropTypes.Align
|
|
143
153
|
form?: VxeNumberInputPropTypes.Form
|
|
144
154
|
|
|
@@ -45,7 +45,7 @@ export interface VxeTableExtendPivotTablePrivateMethods<D = any> {
|
|
|
45
45
|
* 内部方法
|
|
46
46
|
* @private
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
handlePivotTableAggPanelDragendEvent(evnt: DragEvent): void
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
declare module '../table' {
|
|
@@ -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
|
|
|
@@ -3513,6 +3514,9 @@ export namespace VxeTablePropTypes {
|
|
|
3513
3514
|
}
|
|
3514
3515
|
|
|
3515
3516
|
export interface VxeTableProps<D = any> {
|
|
3517
|
+
/**
|
|
3518
|
+
* 尺寸大小
|
|
3519
|
+
*/
|
|
3516
3520
|
size?: VxeTablePropTypes.Size
|
|
3517
3521
|
/**
|
|
3518
3522
|
* 唯一标识
|
|
@@ -3970,8 +3974,15 @@ export interface TablePrivateComputed<D = any> {
|
|
|
3970
3974
|
computeScrollbarOpts: VxeTablePropTypes.ScrollbarConfig
|
|
3971
3975
|
computeScrollbarXOpts: VxeTablePropTypes.ScrollbarXConfig
|
|
3972
3976
|
computeScrollbarYOpts: VxeTablePropTypes.ScrollbarYConfig
|
|
3977
|
+
computeScrollXHeight: number | undefined
|
|
3978
|
+
computeScrollYWidth: number | undefined
|
|
3979
|
+
computeScrollXVisible: 'auto' | 'visible' | 'hidden' | boolean | undefined
|
|
3980
|
+
computeScrollYVisible: 'auto' | 'visible' | 'hidden' | boolean | undefined
|
|
3981
|
+
computeScrollXAutoHide: VxeScrollbarPropTypes.AutoHide | undefined
|
|
3982
|
+
computeScrollYAutoHide: VxeScrollbarPropTypes.AutoHide | undefined
|
|
3973
3983
|
computeScrollbarXToTop: boolean
|
|
3974
3984
|
computeScrollbarYToLeft: boolean
|
|
3985
|
+
computeScrollbarWrapperClss: string
|
|
3975
3986
|
computeColumnOpts: VxeTablePropTypes.ColumnOpts
|
|
3976
3987
|
computeCurrentColumnOpts: VxeTablePropTypes.CurrentColumnConfig
|
|
3977
3988
|
computeScrollXThreshold: number
|
|
@@ -4138,6 +4149,11 @@ export interface TableReactData<D = any> {
|
|
|
4138
4149
|
scrollbarWidth: number
|
|
4139
4150
|
// 横向滚动条的高度
|
|
4140
4151
|
scrollbarHeight: number
|
|
4152
|
+
|
|
4153
|
+
// 滚动条
|
|
4154
|
+
yThumbHeight: number
|
|
4155
|
+
xThumbWidth: number
|
|
4156
|
+
|
|
4141
4157
|
/**
|
|
4142
4158
|
* 行高
|
|
4143
4159
|
* @deprecated
|
|
@@ -4379,9 +4395,17 @@ export interface TableInternalData<D = any> {
|
|
|
4379
4395
|
currentRow: D | null
|
|
4380
4396
|
currentCol: VxeTableDefines.ColumnInfo | null
|
|
4381
4397
|
|
|
4382
|
-
|
|
4383
|
-
|
|
4398
|
+
resizeObserver?: ResizeObserver
|
|
4399
|
+
|
|
4400
|
+
// 滚动条
|
|
4401
|
+
scrollObserver?: ResizeObserver
|
|
4402
|
+
isThumbDrag?: boolean
|
|
4403
|
+
thumbDragOffset: number
|
|
4404
|
+
yThumbTop: number
|
|
4405
|
+
xThumbLeft: number
|
|
4384
4406
|
lastScrollTop: number
|
|
4407
|
+
lastScrollLeft: number
|
|
4408
|
+
|
|
4385
4409
|
// 单选框属性,已选中保留的行
|
|
4386
4410
|
radioReserveRow: any
|
|
4387
4411
|
// 复选框属性,已选中保留的行
|
|
@@ -5981,6 +6005,16 @@ export interface TablePrivateMethods<D = any> {
|
|
|
5981
6005
|
row: any
|
|
5982
6006
|
column: VxeTableDefines.ColumnInfo
|
|
5983
6007
|
}, cellValue?: any): Promise<any>
|
|
6008
|
+
/**
|
|
6009
|
+
* 内部方法
|
|
6010
|
+
* @private
|
|
6011
|
+
*/
|
|
6012
|
+
updateScrollbar(): void
|
|
6013
|
+
/**
|
|
6014
|
+
* 内部方法
|
|
6015
|
+
* @private
|
|
6016
|
+
*/
|
|
6017
|
+
updateThumbOffset(): void
|
|
5984
6018
|
/**
|
|
5985
6019
|
* 内部方法
|
|
5986
6020
|
* @private
|
|
@@ -339,10 +339,22 @@ export namespace VxeTreePropTypes {
|
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
export interface VxeTreeProps<D = any> {
|
|
342
|
+
/**
|
|
343
|
+
* 数据源
|
|
344
|
+
*/
|
|
342
345
|
data?: VxeTreePropTypes.Data<D>
|
|
343
346
|
autoResize?: VxeTreePropTypes.AutoResize
|
|
347
|
+
/**
|
|
348
|
+
* 高度
|
|
349
|
+
*/
|
|
344
350
|
height?: VxeTreePropTypes.Height
|
|
351
|
+
/**
|
|
352
|
+
* 最小高度
|
|
353
|
+
*/
|
|
345
354
|
minHeight?: VxeTreePropTypes.MinHeight
|
|
355
|
+
/**
|
|
356
|
+
* 最大高度
|
|
357
|
+
*/
|
|
346
358
|
maxHeight?: VxeTreePropTypes.MaxHeight
|
|
347
359
|
loading?: VxeTreePropTypes.Loading
|
|
348
360
|
loadingConfig?: VxeTreePropTypes.LoadingConfig
|
|
@@ -480,8 +492,10 @@ export interface TreeInternalData {
|
|
|
480
492
|
treeExpandedMaps: Record<string, boolean>
|
|
481
493
|
treeExpandLazyLoadedMaps: Record<string, boolean>
|
|
482
494
|
|
|
483
|
-
// 滚动条
|
|
484
495
|
resizeObserver?: ResizeObserver
|
|
496
|
+
|
|
497
|
+
// 滚动条
|
|
498
|
+
scrollObserver?: ResizeObserver
|
|
485
499
|
isThumbDrag?: boolean
|
|
486
500
|
thumbDragOffset: number
|
|
487
501
|
yThumbTop: number
|