vxe-pc-ui 4.20.7 → 4.20.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all.esm.js +915 -820
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/card/src/card.js +8 -6
- package/es/drawer/src/drawer.js +7 -5
- package/es/icon/style.css +1 -1
- package/es/layout-aside/src/layout-aside.js +6 -4
- package/es/layout-body/src/layout-body.js +6 -4
- package/es/layout-container/src/layout-container.js +11 -3
- package/es/list/src/list.js +79 -50
- package/es/menu/src/menu.js +7 -5
- package/es/modal/src/modal.js +7 -5
- package/es/scrollbar/src/scrollbar.js +8 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tabs/src/tabs.js +5 -4
- package/es/tooltip/src/tooltip.js +15 -7
- package/es/tree/src/tree.js +74 -45
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/card/src/card.js +9 -6
- package/lib/card/src/card.min.js +1 -1
- package/lib/drawer/src/drawer.js +7 -4
- package/lib/drawer/src/drawer.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +371 -163
- package/lib/index.umd.min.js +1 -1
- package/lib/layout-aside/src/layout-aside.js +7 -4
- package/lib/layout-aside/src/layout-aside.min.js +1 -1
- package/lib/layout-body/src/layout-body.js +7 -4
- package/lib/layout-body/src/layout-body.min.js +1 -1
- package/lib/layout-container/src/layout-container.js +20 -4
- package/lib/layout-container/src/layout-container.min.js +1 -1
- package/lib/list/src/list.js +79 -47
- package/lib/list/src/list.min.js +1 -1
- package/lib/menu/src/menu.js +8 -4
- package/lib/menu/src/menu.min.js +1 -1
- package/lib/modal/src/modal.js +7 -4
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/scrollbar/src/scrollbar.js +8 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tabs/src/tabs.js +6 -5
- package/lib/tabs/src/tabs.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +15 -6
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/tree/src/tree.js +74 -43
- 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/package.json +2 -2
- package/packages/card/src/card.ts +8 -6
- package/packages/drawer/src/drawer.ts +7 -5
- package/packages/layout-aside/src/layout-aside.ts +6 -4
- package/packages/layout-body/src/layout-body.ts +6 -4
- package/packages/layout-container/src/layout-container.ts +13 -3
- package/packages/list/src/list.ts +81 -50
- package/packages/menu/src/menu.ts +7 -5
- package/packages/modal/src/modal.ts +7 -5
- package/packages/scrollbar/src/scrollbar.ts +8 -1
- package/packages/tabs/src/tabs.ts +5 -4
- package/packages/tooltip/src/tooltip.ts +15 -7
- package/packages/tree/src/tree.ts +76 -45
- package/types/components/card.d.ts +2 -2
- package/types/components/drawer.d.ts +2 -2
- package/types/components/grid.d.ts +3 -1
- package/types/components/layout-aside.d.ts +2 -2
- package/types/components/layout-body.d.ts +2 -2
- package/types/components/layout-container.d.ts +3 -1
- package/types/components/list.d.ts +2 -2
- package/types/components/menu.d.ts +2 -2
- package/types/components/modal.d.ts +2 -2
- package/types/components/scrollbar.d.ts +10 -0
- package/types/components/table.d.ts +9 -5
- package/types/components/tabs.d.ts +2 -2
- package/types/components/tooltip.d.ts +2 -2
- package/types/components/tree.d.ts +2 -2
- /package/es/icon/{iconfont.1792080138286.ttf → iconfont.1792139440389.ttf} +0 -0
- /package/es/icon/{iconfont.1792080138286.woff → iconfont.1792139440389.woff} +0 -0
- /package/es/icon/{iconfont.1792080138286.woff2 → iconfont.1792139440389.woff2} +0 -0
- /package/es/{iconfont.1792080138286.ttf → iconfont.1792139440389.ttf} +0 -0
- /package/es/{iconfont.1792080138286.woff → iconfont.1792139440389.woff} +0 -0
- /package/es/{iconfont.1792080138286.woff2 → iconfont.1792139440389.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1792080138286.ttf → iconfont.1792139440389.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1792080138286.woff → iconfont.1792139440389.woff} +0 -0
- /package/lib/icon/style/{iconfont.1792080138286.woff2 → iconfont.1792139440389.woff2} +0 -0
- /package/lib/{iconfont.1792080138286.ttf → iconfont.1792139440389.ttf} +0 -0
- /package/lib/{iconfont.1792080138286.woff → iconfont.1792139440389.woff} +0 -0
- /package/lib/{iconfont.1792080138286.woff2 → iconfont.1792139440389.woff2} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, h, reactive, PropType, computed, VNode, watch, onBeforeUnmount, nextTick, onMounted, provide } from 'vue'
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
|
-
import { VxeUI, domUtils, createEvent,
|
|
3
|
+
import { VxeUI, domUtils, createEvent, useFns, globalEvents, globalResize, renderEmptyElement } from '../../ui'
|
|
4
4
|
import { calcTreeLine, getItemCacheObj } from './util'
|
|
5
5
|
import { createComponentLog } from '../../ui/src/log'
|
|
6
6
|
import { getCrossTreeDragNodeInfo } from './store'
|
|
@@ -269,12 +269,14 @@ export default defineVxeComponent({
|
|
|
269
269
|
|
|
270
270
|
const xID = XEUtils.uniqueId()
|
|
271
271
|
|
|
272
|
-
const { computeSize } = useSize(props)
|
|
272
|
+
const { computeSize } = useFns.useSize(props)
|
|
273
|
+
const { computeIsVScrollbar } = useFns.useVScrollbar(props)
|
|
273
274
|
|
|
274
275
|
const refElem = ref<HTMLDivElement>()
|
|
275
276
|
const refHeaderWrapperElem = ref<HTMLDivElement>()
|
|
276
277
|
const refFooterWrapperElem = ref<HTMLDivElement>()
|
|
277
278
|
const refVirtualWrapper = ref<HTMLDivElement>()
|
|
279
|
+
const refVirtualSpaceElem = ref<HTMLDivElement>()
|
|
278
280
|
const refVirtualBody = ref<HTMLDivElement>()
|
|
279
281
|
|
|
280
282
|
const refTrackXElem = ref<HTMLDivElement>()
|
|
@@ -1046,8 +1048,14 @@ export default defineVxeComponent({
|
|
|
1046
1048
|
}
|
|
1047
1049
|
|
|
1048
1050
|
const updateScrollbar = () => {
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
+
const isVScrollbar = computeIsVScrollbar.value
|
|
1052
|
+
if (isVScrollbar) {
|
|
1053
|
+
return nextTick().then(() => {
|
|
1054
|
+
updateThumbSize()
|
|
1055
|
+
updateThumbOffset()
|
|
1056
|
+
})
|
|
1057
|
+
}
|
|
1058
|
+
return Promise.resolve()
|
|
1051
1059
|
}
|
|
1052
1060
|
|
|
1053
1061
|
/**
|
|
@@ -1071,11 +1079,11 @@ export default defineVxeComponent({
|
|
|
1071
1079
|
const parentPaddingSize = getPaddingTopBottomSize(parentEl)
|
|
1072
1080
|
reactData.parentHeight = Math.max(headHeight + footHeight + rowHeight, parentEl.clientHeight - parentPaddingSize - headHeight - footHeight)
|
|
1073
1081
|
}
|
|
1074
|
-
updateScrollbar()
|
|
1075
1082
|
updateHeight()
|
|
1076
1083
|
return computeScrollLoad().then(() => {
|
|
1077
1084
|
updateHeight()
|
|
1078
1085
|
updateYSpace()
|
|
1086
|
+
updateScrollbar()
|
|
1079
1087
|
})
|
|
1080
1088
|
}
|
|
1081
1089
|
return nextTick()
|
|
@@ -1102,7 +1110,7 @@ export default defineVxeComponent({
|
|
|
1102
1110
|
}
|
|
1103
1111
|
|
|
1104
1112
|
const scrollEvent = (evnt: Event) => {
|
|
1105
|
-
const scrollBodyElem = evnt.
|
|
1113
|
+
const scrollBodyElem = evnt.currentTarget as HTMLDivElement
|
|
1106
1114
|
const scrollTop = scrollBodyElem.scrollTop
|
|
1107
1115
|
const scrollLeft = scrollBodyElem.scrollLeft
|
|
1108
1116
|
const isX = scrollLeft !== internalData.lastScrollLeft
|
|
@@ -3113,6 +3121,27 @@ export default defineVxeComponent({
|
|
|
3113
3121
|
}
|
|
3114
3122
|
}
|
|
3115
3123
|
|
|
3124
|
+
const bindScrollbarResize = () => {
|
|
3125
|
+
const isVScrollbar = computeIsVScrollbar.value
|
|
3126
|
+
const { scrollObserver } = internalData
|
|
3127
|
+
if (isVScrollbar) {
|
|
3128
|
+
if (!scrollObserver) {
|
|
3129
|
+
const el = refElem.value
|
|
3130
|
+
const viewInnerEl = refVirtualSpaceElem.value
|
|
3131
|
+
const scrollObserver = globalResize.create(() => {
|
|
3132
|
+
reScrollFlag.value++
|
|
3133
|
+
})
|
|
3134
|
+
if (el) {
|
|
3135
|
+
scrollObserver.observe(el)
|
|
3136
|
+
}
|
|
3137
|
+
if (viewInnerEl) {
|
|
3138
|
+
scrollObserver.observe(viewInnerEl)
|
|
3139
|
+
}
|
|
3140
|
+
internalData.scrollObserver = scrollObserver
|
|
3141
|
+
}
|
|
3142
|
+
}
|
|
3143
|
+
}
|
|
3144
|
+
|
|
3116
3145
|
const updateThumbSize = () => {
|
|
3117
3146
|
const viewEl = refVirtualWrapper.value
|
|
3118
3147
|
if (!viewEl) {
|
|
@@ -3627,9 +3656,10 @@ export default defineVxeComponent({
|
|
|
3627
3656
|
}
|
|
3628
3657
|
|
|
3629
3658
|
const renderVN = () => {
|
|
3630
|
-
const { loading, trigger, showLine
|
|
3659
|
+
const { loading, trigger, showLine } = props
|
|
3631
3660
|
const { bodyHeight, topSpaceHeight, treeList, tooltipStore, xThumbWidth, yThumbHeight } = reactData
|
|
3632
3661
|
const vSize = computeSize.value
|
|
3662
|
+
const isVScrollbar = computeIsVScrollbar.value
|
|
3633
3663
|
const radioOpts = computeRadioOpts.value
|
|
3634
3664
|
const checkboxOpts = computeCheckboxOpts.value
|
|
3635
3665
|
const loadingOpts = computeLoadingOpts.value
|
|
@@ -3661,17 +3691,17 @@ export default defineVxeComponent({
|
|
|
3661
3691
|
ref: refElem,
|
|
3662
3692
|
class: [
|
|
3663
3693
|
'vxe-tree',
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3694
|
+
isVScrollbar ? `ov-x--${scrollXVisible === false ? 'hidden' : 'visible'}` : '',
|
|
3695
|
+
isVScrollbar ? `ov-y--${scrollYVisible === false ? 'hidden' : 'visible'}` : '',
|
|
3696
|
+
isVScrollbar ? `sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}` : '',
|
|
3697
|
+
isVScrollbar ? `sy-pos--${scrollbarYToLeft ? 'left' : 'right'}` : '',
|
|
3668
3698
|
{
|
|
3669
3699
|
[`size--${vSize}`]: vSize,
|
|
3670
3700
|
'show--line': showLine,
|
|
3671
|
-
'is--virtual-scrollbar':
|
|
3672
|
-
'ov-padding':
|
|
3673
|
-
'ov-x--auto-hide':
|
|
3674
|
-
'ov-y--auto-hide':
|
|
3701
|
+
'is--virtual-scrollbar': isVScrollbar,
|
|
3702
|
+
'ov-padding': isVScrollbar && scrollbarOpts.padding,
|
|
3703
|
+
'ov-x--auto-hide': isVScrollbar && scrollXAutoHide,
|
|
3704
|
+
'ov-y--auto-hide': isVScrollbar && scrollYAutoHide,
|
|
3675
3705
|
'overflow-y': yThumbHeight,
|
|
3676
3706
|
'overflow-x': xThumbWidth,
|
|
3677
3707
|
'checkbox--highlight': checkboxOpts.highlight,
|
|
@@ -3697,6 +3727,7 @@ export default defineVxeComponent({
|
|
|
3697
3727
|
onScroll: scrollEvent
|
|
3698
3728
|
}, [
|
|
3699
3729
|
h('div', {
|
|
3730
|
+
ref: refVirtualSpaceElem,
|
|
3700
3731
|
class: 'vxe-tree--y-space',
|
|
3701
3732
|
style: {
|
|
3702
3733
|
height: bodyHeight ? `${bodyHeight}px` : ''
|
|
@@ -3719,7 +3750,7 @@ export default defineVxeComponent({
|
|
|
3719
3750
|
/**
|
|
3720
3751
|
* 滚动条
|
|
3721
3752
|
*/
|
|
3722
|
-
|
|
3753
|
+
isVScrollbar
|
|
3723
3754
|
? h('div', {
|
|
3724
3755
|
class: scrollbarWrapperClss
|
|
3725
3756
|
}, [
|
|
@@ -3847,43 +3878,55 @@ export default defineVxeComponent({
|
|
|
3847
3878
|
triggerSearchEvent(new Event('filter'))
|
|
3848
3879
|
})
|
|
3849
3880
|
|
|
3850
|
-
const
|
|
3881
|
+
const reScrollFlag = ref(0)
|
|
3882
|
+
const reLayoutFlag = ref(0)
|
|
3851
3883
|
watch(() => props.height, () => {
|
|
3852
|
-
|
|
3884
|
+
reLayoutFlag.value++
|
|
3853
3885
|
})
|
|
3854
3886
|
watch(() => props.minHeight, () => {
|
|
3855
|
-
|
|
3887
|
+
reLayoutFlag.value++
|
|
3856
3888
|
})
|
|
3857
3889
|
watch(() => props.maxHeight, () => {
|
|
3858
|
-
|
|
3890
|
+
reLayoutFlag.value++
|
|
3859
3891
|
})
|
|
3860
|
-
watch(
|
|
3861
|
-
|
|
3892
|
+
watch(computeIsVScrollbar, () => {
|
|
3893
|
+
nextTick(() => {
|
|
3894
|
+
bindScrollbarResize()
|
|
3895
|
+
nextTick(() => {
|
|
3896
|
+
reLayoutFlag.value++
|
|
3897
|
+
})
|
|
3898
|
+
})
|
|
3862
3899
|
})
|
|
3863
3900
|
watch(computeScrollYWidth, () => {
|
|
3864
|
-
|
|
3901
|
+
reLayoutFlag.value++
|
|
3865
3902
|
})
|
|
3866
3903
|
watch(computeScrollXHeight, () => {
|
|
3867
|
-
|
|
3904
|
+
reLayoutFlag.value++
|
|
3868
3905
|
})
|
|
3869
3906
|
watch(computeScrollXVisible, () => {
|
|
3870
3907
|
nextTick(() => {
|
|
3871
|
-
|
|
3908
|
+
reLayoutFlag.value++
|
|
3872
3909
|
})
|
|
3873
3910
|
})
|
|
3874
3911
|
watch(computeScrollYVisible, () => {
|
|
3875
3912
|
nextTick(() => {
|
|
3876
|
-
|
|
3913
|
+
reLayoutFlag.value++
|
|
3877
3914
|
})
|
|
3878
3915
|
})
|
|
3879
|
-
watch(
|
|
3916
|
+
watch(reLayoutFlag, () => {
|
|
3880
3917
|
recalculate().then(() => {
|
|
3881
3918
|
recalculate()
|
|
3882
3919
|
})
|
|
3883
3920
|
})
|
|
3884
3921
|
|
|
3922
|
+
watch(reScrollFlag, () => {
|
|
3923
|
+
updateScrollbar().then(() => {
|
|
3924
|
+
updateScrollbar()
|
|
3925
|
+
})
|
|
3926
|
+
})
|
|
3927
|
+
|
|
3885
3928
|
onMounted(() => {
|
|
3886
|
-
const { transform, drag, menuConfig, showOverflow, lazy, loadMethod, autoResize
|
|
3929
|
+
const { transform, drag, menuConfig, showOverflow, lazy, loadMethod, autoResize } = props
|
|
3887
3930
|
const dragOpts = computeDragOpts.value
|
|
3888
3931
|
if (!showOverflow) {
|
|
3889
3932
|
errLog('vxe.error.errProp', ['show-overflow=false', 'show-overflow=true'])
|
|
@@ -3904,25 +3947,12 @@ export default defineVxeComponent({
|
|
|
3904
3947
|
if (menuConfig && !VxeUIContextMenu) {
|
|
3905
3948
|
errLog('vxe.error.reqComp', ['vxe-context-menu'])
|
|
3906
3949
|
}
|
|
3907
|
-
const el = refElem.value
|
|
3908
|
-
if (useScrollbar || autoResize) {
|
|
3909
|
-
const viewInnerEl = refVirtualBody.value
|
|
3910
|
-
const scrollObserver = globalResize.create(() => {
|
|
3911
|
-
updateScrollbar()
|
|
3912
|
-
})
|
|
3913
|
-
if (el) {
|
|
3914
|
-
scrollObserver.observe(el)
|
|
3915
|
-
}
|
|
3916
|
-
if (viewInnerEl) {
|
|
3917
|
-
scrollObserver.observe(viewInnerEl)
|
|
3918
|
-
}
|
|
3919
|
-
internalData.scrollObserver = scrollObserver
|
|
3920
|
-
}
|
|
3921
3950
|
if (autoResize) {
|
|
3951
|
+
const el = refElem.value
|
|
3922
3952
|
const parentEl = getParentElem()
|
|
3923
3953
|
const resizeObserver = globalResize.create(() => {
|
|
3924
3954
|
if (props.autoResize) {
|
|
3925
|
-
|
|
3955
|
+
reLayoutFlag.value++
|
|
3926
3956
|
}
|
|
3927
3957
|
})
|
|
3928
3958
|
if (el) {
|
|
@@ -3934,9 +3964,10 @@ export default defineVxeComponent({
|
|
|
3934
3964
|
internalData.resizeObserver = resizeObserver
|
|
3935
3965
|
}
|
|
3936
3966
|
|
|
3937
|
-
|
|
3967
|
+
reLayoutFlag.value++
|
|
3968
|
+
bindScrollbarResize()
|
|
3938
3969
|
globalEvents.on($xeTree, 'resize', () => {
|
|
3939
|
-
|
|
3970
|
+
reLayoutFlag.value++
|
|
3940
3971
|
})
|
|
3941
3972
|
})
|
|
3942
3973
|
|
|
@@ -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 =
|
|
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 =
|
|
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 { 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,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 =
|
|
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 =
|
|
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 =
|
|
230
|
+
export type UseScrollbar = VxeComponentIsVScrollbar
|
|
231
231
|
export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible'> {
|
|
232
232
|
/**
|
|
233
233
|
* 滚动条宽度
|
|
@@ -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 =
|
|
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 =
|
|
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
|
* 滚动条宽度
|
|
@@ -77,7 +77,15 @@ export namespace VxeScrollbarPropTypes {
|
|
|
77
77
|
export type ViewStyle = VxeComponentStyleType
|
|
78
78
|
export type ViewClassName = string
|
|
79
79
|
export type ViewInnerClassName = string
|
|
80
|
+
/**
|
|
81
|
+
* 已废弃
|
|
82
|
+
* @deprecated
|
|
83
|
+
*/
|
|
80
84
|
export type AutoResize = boolean
|
|
85
|
+
/**
|
|
86
|
+
* 已废弃
|
|
87
|
+
* @deprecated
|
|
88
|
+
*/
|
|
81
89
|
export type SyncResize = boolean
|
|
82
90
|
}
|
|
83
91
|
|
|
@@ -168,10 +176,12 @@ export interface VxeScrollbarProps {
|
|
|
168
176
|
viewInnerClassName?: VxeScrollbarPropTypes.ViewInnerClassName
|
|
169
177
|
/**
|
|
170
178
|
* 自动监听元素的变化去重新计算样式
|
|
179
|
+
* @deprecated
|
|
171
180
|
*/
|
|
172
181
|
autoResize?: VxeScrollbarPropTypes.AutoResize
|
|
173
182
|
/**
|
|
174
183
|
* 自动跟随某个属性的变化去重新计算表格,和手动调用 recalculate 方法是一样的效果(对于通过某个属性来更新内容时可能会用到)
|
|
184
|
+
* @deprecated
|
|
175
185
|
*/
|
|
176
186
|
syncResize?: VxeScrollbarPropTypes.SyncResize
|
|
177
187
|
}
|
|
@@ -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 } 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 =
|
|
3026
|
+
export type UseScrollbar = VxeComponentIsVScrollbar
|
|
3023
3027
|
/**
|
|
3024
3028
|
* 滚动条配置项
|
|
3025
3029
|
*/
|
|
@@ -3994,7 +3998,8 @@ export interface VxeTableProps<D = any> {
|
|
|
3994
3998
|
}
|
|
3995
3999
|
|
|
3996
4000
|
export interface TablePrivateComputed<D = any> {
|
|
3997
|
-
computeSize: ComputedRef<
|
|
4001
|
+
computeSize: ComputedRef<VxeComponentSizeType>
|
|
4002
|
+
computeIsVScrollbar: ComputedRef<VxeComponentIsVScrollbar>
|
|
3998
4003
|
computeTableId: ComputedRef<string>
|
|
3999
4004
|
computeRowField: ComputedRef<string>
|
|
4000
4005
|
computeEditDirtyOpts: ComputedRef<VxeTablePropTypes.EditDirtyConfig>
|
|
@@ -5988,7 +5993,7 @@ export interface TablePrivateMethods<D = any> {
|
|
|
5988
5993
|
* 内部方法
|
|
5989
5994
|
* @private
|
|
5990
5995
|
*/
|
|
5991
|
-
updateScrollbar(): void
|
|
5996
|
+
updateScrollbar(): Promise<void>
|
|
5992
5997
|
/**
|
|
5993
5998
|
* 内部方法
|
|
5994
5999
|
* @private
|
|
@@ -6337,7 +6342,6 @@ export namespace VxeTableDefines {
|
|
|
6337
6342
|
style: any
|
|
6338
6343
|
column: VxeTableDefines.ColumnInfo | null | undefined
|
|
6339
6344
|
visible: boolean
|
|
6340
|
-
maxHeight: number | string | null
|
|
6341
6345
|
}
|
|
6342
6346
|
|
|
6343
6347
|
export interface HistoryStackObj<D = any> {
|
|
@@ -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 { VxeTabPaneProps, VxeTabPaneDefines, VxeTabPanePropTypes } from './tab-pane'
|
|
4
4
|
import { VxeScrollbarProps } from './scrollbar'
|
|
5
5
|
|
|
@@ -113,7 +113,7 @@ export namespace VxeTabsPropTypes {
|
|
|
113
113
|
option: Omit<VxeTabPaneProps, 'slots'>
|
|
114
114
|
}) => boolean
|
|
115
115
|
}
|
|
116
|
-
export type UseScrollbar =
|
|
116
|
+
export type UseScrollbar = VxeComponentIsVScrollbar
|
|
117
117
|
export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
|
|
118
118
|
/**
|
|
119
119
|
* 滚动条宽度
|
|
@@ -1,5 +1,5 @@
|
|
|
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 } from '@vxe-ui/core'
|
|
3
3
|
import { VxeIconPropTypes } from './icon'
|
|
4
4
|
import { VxeScrollbarProps } from './scrollbar'
|
|
5
5
|
|
|
@@ -49,7 +49,7 @@ export namespace VxeTooltipPropTypes {
|
|
|
49
49
|
export type LeaveMethod = (params: { $event: MouseEvent }) => boolean
|
|
50
50
|
export type AppendTo = string | HTMLElement | ((params: {}) => string | HTMLElement)
|
|
51
51
|
export type Transfer = boolean
|
|
52
|
-
export type UseScrollbar =
|
|
52
|
+
export type UseScrollbar = VxeComponentIsVScrollbar
|
|
53
53
|
export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible' | 'className' | 'viewAttrs' | 'viewClassName' | 'viewInnerClassName'> {
|
|
54
54
|
/**
|
|
55
55
|
* 滚动条宽度
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RenderFunction, SetupContext, Ref, ComputedRef } 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 { VxeTooltipPropTypes } from './tooltip'
|
|
5
5
|
import { VxeScrollbarProps } from './scrollbar'
|
|
@@ -332,7 +332,7 @@ export namespace VxeTreePropTypes {
|
|
|
332
332
|
*/
|
|
333
333
|
enabled?: boolean
|
|
334
334
|
}
|
|
335
|
-
export type UseScrollbar =
|
|
335
|
+
export type UseScrollbar = VxeComponentIsVScrollbar
|
|
336
336
|
export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'visible'> {
|
|
337
337
|
/**
|
|
338
338
|
* 滚动条宽度
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|