vxe-pc-ui 3.20.7 → 3.20.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/card/src/card.js +2 -1
- package/es/drawer/src/drawer.js +1 -0
- 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/layout-container/src/layout-container.js +9 -2
- package/es/list/src/list.js +78 -47
- package/es/menu/src/menu.js +1 -0
- package/es/modal/src/modal.js +1 -0
- 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 +2 -1
- package/es/tooltip/src/tooltip.js +14 -6
- package/es/tree/src/tree.js +74 -44
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/card/src/card.js +1 -1
- package/lib/card/src/card.min.js +1 -1
- package/lib/drawer/src/drawer.js +1 -1
- 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 +325 -139
- package/lib/index.umd.min.js +1 -1
- package/lib/layout-aside/src/layout-aside.js +1 -1
- package/lib/layout-aside/src/layout-aside.min.js +1 -1
- package/lib/layout-body/src/layout-body.js +1 -1
- package/lib/layout-body/src/layout-body.min.js +1 -1
- package/lib/layout-container/src/layout-container.js +13 -3
- package/lib/layout-container/src/layout-container.min.js +1 -1
- package/lib/list/src/list.js +72 -43
- 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 +1 -1
- 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 +1 -1
- package/lib/tabs/src/tabs.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +10 -6
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/tree/src/tree.js +67 -39
- 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 +4 -2
- package/packages/drawer/src/drawer.ts +4 -2
- package/packages/layout-aside/src/layout-aside.ts +4 -2
- package/packages/layout-body/src/layout-body.ts +4 -2
- package/packages/layout-container/src/layout-container.ts +13 -3
- package/packages/list/src/list.ts +84 -49
- package/packages/menu/src/menu.ts +3 -1
- package/packages/modal/src/modal.ts +3 -1
- package/packages/scrollbar/src/scrollbar.ts +8 -0
- package/packages/tabs/src/tabs.ts +4 -2
- package/packages/tooltip/src/tooltip.ts +17 -8
- package/packages/tree/src/tree.ts +80 -46
- package/types/components/card.d.ts +2 -2
- package/types/components/drawer.d.ts +2 -2
- package/types/components/grid.d.ts +3 -2
- 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.1792080131929.ttf → iconfont.1792139429655.ttf} +0 -0
- /package/es/icon/{iconfont.1792080131929.woff → iconfont.1792139429655.woff} +0 -0
- /package/es/icon/{iconfont.1792080131929.woff2 → iconfont.1792139429655.woff2} +0 -0
- /package/es/{iconfont.1792080131929.ttf → iconfont.1792139429655.ttf} +0 -0
- /package/es/{iconfont.1792080131929.woff → iconfont.1792139429655.woff} +0 -0
- /package/es/{iconfont.1792080131929.woff2 → iconfont.1792139429655.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1792080131929.ttf → iconfont.1792139429655.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1792080131929.woff → iconfont.1792139429655.woff} +0 -0
- /package/lib/icon/style/{iconfont.1792080131929.woff2 → iconfont.1792139429655.woff2} +0 -0
- /package/lib/{iconfont.1792080131929.ttf → iconfont.1792139429655.ttf} +0 -0
- /package/lib/{iconfont.1792080131929.woff → iconfont.1792139429655.woff} +0 -0
- /package/lib/{iconfont.1792080131929.woff2 → iconfont.1792139429655.woff2} +0 -0
|
@@ -11,7 +11,7 @@ import { moveRowAnimateToTb, clearRowAnimate } from '../../ui/src/anime'
|
|
|
11
11
|
import { getItemCacheObj } from './util'
|
|
12
12
|
import VxeLoadingComponent from '../../loading'
|
|
13
13
|
|
|
14
|
-
import type { VxeListPropTypes, VxeListEmits, VxeComponentSizeType, ListReactData, VxeListDefines, ValueOf, ListInternalData, VxeListConstructor, VxeListPrivateMethods, VxeComponentStyleType, VxeScrollbarPropTypes } from '../../../types'
|
|
14
|
+
import type { VxeListPropTypes, VxeListEmits, VxeComponentSizeType, ListReactData, VxeListDefines, ValueOf, ListInternalData, VxeListConstructor, VxeListPrivateMethods, VxeComponentStyleType, VxeScrollbarPropTypes, VxeComponentIsVScrollbar } from '../../../types'
|
|
15
15
|
|
|
16
16
|
const { getConfig, getIcon, getI18n, domUtils, scrollbarUtils, menus, globalEvents, globalResize } = VxeUI
|
|
17
17
|
|
|
@@ -106,7 +106,8 @@ function createInternalData (): ListInternalData {
|
|
|
106
106
|
export default /* define-vxe-component start */ defineVxeComponent({
|
|
107
107
|
name: 'VxeList',
|
|
108
108
|
mixins: [
|
|
109
|
-
globalMixins.sizeMixin
|
|
109
|
+
globalMixins.sizeMixin,
|
|
110
|
+
globalMixins.vScrollbarMixin
|
|
110
111
|
],
|
|
111
112
|
props: {
|
|
112
113
|
data: Array as PropType<VxeListPropTypes.Data>,
|
|
@@ -162,12 +163,14 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
162
163
|
reactData,
|
|
163
164
|
crossListDragRowInfo: crossListDragRowGlobal,
|
|
164
165
|
|
|
165
|
-
|
|
166
|
+
reLayoutFlag: 0,
|
|
167
|
+
reScrollFlag: 0
|
|
166
168
|
}
|
|
167
169
|
},
|
|
168
170
|
computed: {
|
|
169
171
|
...({} as {
|
|
170
|
-
computeSize(): VxeComponentSizeType
|
|
172
|
+
computeSize(): VxeComponentSizeType,
|
|
173
|
+
computeIsVScrollbar(): VxeComponentIsVScrollbar
|
|
171
174
|
}),
|
|
172
175
|
computeRowOpts () {
|
|
173
176
|
const $xeList = this
|
|
@@ -702,8 +705,14 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
702
705
|
updateScrollbar () {
|
|
703
706
|
const $xeList = this
|
|
704
707
|
|
|
705
|
-
$xeList.
|
|
706
|
-
|
|
708
|
+
const isVScrollbar = $xeList.computeIsVScrollbar
|
|
709
|
+
if (isVScrollbar) {
|
|
710
|
+
return $xeList.$nextTick().then(() => {
|
|
711
|
+
$xeList.updateThumbSize()
|
|
712
|
+
$xeList.updateThumbOffset()
|
|
713
|
+
})
|
|
714
|
+
}
|
|
715
|
+
return Promise.resolve()
|
|
707
716
|
},
|
|
708
717
|
/**
|
|
709
718
|
* 重新计算列表
|
|
@@ -725,10 +734,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
725
734
|
parentHeight = parentEl.clientHeight - Math.ceil(XEUtils.toNumber(parentStyle.paddingLeft) + XEUtils.toNumber(parentStyle.paddingRight))
|
|
726
735
|
}
|
|
727
736
|
reactData.parentHeight = parentHeight
|
|
728
|
-
$xeList.updateScrollbar()
|
|
729
737
|
$xeList.updateHeight()
|
|
730
738
|
if (el.clientWidth && el.clientHeight) {
|
|
731
|
-
return $xeList.computeScrollLoad()
|
|
739
|
+
return $xeList.computeScrollLoad().then(() => {
|
|
740
|
+
$xeList.updateScrollbar()
|
|
741
|
+
})
|
|
732
742
|
}
|
|
733
743
|
}
|
|
734
744
|
return $xeList.$nextTick()
|
|
@@ -739,7 +749,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
739
749
|
|
|
740
750
|
const { scrollYStore } = internalData
|
|
741
751
|
const { startIndex, endIndex, visibleSize, offsetSize, rowHeight } = scrollYStore
|
|
742
|
-
const scrollBodyElem = evnt.
|
|
752
|
+
const scrollBodyElem = evnt.currentTarget as HTMLDivElement
|
|
743
753
|
const scrollTop = scrollBodyElem.scrollTop
|
|
744
754
|
const toVisibleIndex = Math.floor(scrollTop / rowHeight)
|
|
745
755
|
const offsetStartIndex = Math.max(0, toVisibleIndex - 1 - offsetSize)
|
|
@@ -757,7 +767,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
757
767
|
const reactData = $xeList.reactData
|
|
758
768
|
const internalData = $xeList.internalData
|
|
759
769
|
|
|
760
|
-
const scrollBodyElem = evnt.
|
|
770
|
+
const scrollBodyElem = evnt.currentTarget as HTMLDivElement
|
|
761
771
|
const scrollTop = scrollBodyElem.scrollTop
|
|
762
772
|
const scrollLeft = scrollBodyElem.scrollLeft
|
|
763
773
|
const isX = scrollLeft !== internalData.lastScrollLeft
|
|
@@ -2086,6 +2096,29 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2086
2096
|
$xeList.dispatchEvent('row-menu', { row }, evnt)
|
|
2087
2097
|
},
|
|
2088
2098
|
// 滚动条
|
|
2099
|
+
bindScrollbarResize () {
|
|
2100
|
+
const $xeList = this
|
|
2101
|
+
const internalData = $xeList.internalData
|
|
2102
|
+
|
|
2103
|
+
const { scrollObserver } = internalData
|
|
2104
|
+
const isVScrollbar = $xeList.computeIsVScrollbar
|
|
2105
|
+
if (isVScrollbar) {
|
|
2106
|
+
if (!scrollObserver) {
|
|
2107
|
+
const el = $xeList.$refs.refElem as HTMLDivElement
|
|
2108
|
+
const viewInnerEl = $xeList.$refs.refVirtualSpaceElem as HTMLDivElement
|
|
2109
|
+
const scrollObserver = globalResize.create(() => {
|
|
2110
|
+
$xeList.reScrollFlag++
|
|
2111
|
+
})
|
|
2112
|
+
if (el) {
|
|
2113
|
+
scrollObserver.observe(el)
|
|
2114
|
+
}
|
|
2115
|
+
if (viewInnerEl) {
|
|
2116
|
+
scrollObserver.observe(viewInnerEl)
|
|
2117
|
+
}
|
|
2118
|
+
internalData.scrollObserver = scrollObserver
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
},
|
|
2089
2122
|
updateThumbSize () {
|
|
2090
2123
|
const $xeList = this
|
|
2091
2124
|
const reactData = $xeList.reactData
|
|
@@ -2543,12 +2576,13 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2543
2576
|
const reactData = $xeList.reactData
|
|
2544
2577
|
const slots = $xeList.$scopedSlots
|
|
2545
2578
|
|
|
2546
|
-
const { showCheckbox, className, loading
|
|
2579
|
+
const { showCheckbox, className, loading } = props
|
|
2547
2580
|
const { bodyHeight, topSpaceHeight, rowList, isAllChecked, isAllIndeterminate, xThumbWidth, yThumbHeight } = reactData
|
|
2548
2581
|
const defaultSlot = slots.default
|
|
2549
2582
|
const headerSlot = slots.header
|
|
2550
2583
|
const footerSlot = slots.footer
|
|
2551
2584
|
const vSize = $xeList.computeSize
|
|
2585
|
+
const isVScrollbar = $xeList.computeIsVScrollbar
|
|
2552
2586
|
const wrapperStyles = $xeList.computeWrapperStyles
|
|
2553
2587
|
const virtualStyles = $xeList.computeVirtualStyles
|
|
2554
2588
|
const radioOpts = $xeList.computeRadioOpts
|
|
@@ -2578,17 +2612,17 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2578
2612
|
ref: 'refElem',
|
|
2579
2613
|
class: [
|
|
2580
2614
|
'vxe-list',
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2615
|
+
isVScrollbar ? `ov-x--${scrollXVisible === false ? 'hidden' : 'visible'}` : '',
|
|
2616
|
+
isVScrollbar ? `ov-y--${scrollYVisible === false ? 'hidden' : 'visible'}` : '',
|
|
2617
|
+
isVScrollbar ? `sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}` : '',
|
|
2618
|
+
isVScrollbar ? `sy-pos--${scrollbarYToLeft ? 'left' : 'right'}` : '',
|
|
2585
2619
|
className ? (XEUtils.isFunction(className) ? className({ $list: $xeList }) : className) : '',
|
|
2586
2620
|
{
|
|
2587
2621
|
[`size--${vSize}`]: vSize,
|
|
2588
|
-
'is--virtual-scrollbar':
|
|
2589
|
-
'ov-padding':
|
|
2590
|
-
'ov-x--auto-hide':
|
|
2591
|
-
'ov-y--auto-hide':
|
|
2622
|
+
'is--virtual-scrollbar': isVScrollbar,
|
|
2623
|
+
'ov-padding': isVScrollbar && scrollbarOpts.padding,
|
|
2624
|
+
'ov-x--auto-hide': isVScrollbar && scrollXAutoHide,
|
|
2625
|
+
'ov-y--auto-hide': isVScrollbar && scrollYAutoHide,
|
|
2592
2626
|
'overflow-y': yThumbHeight,
|
|
2593
2627
|
'overflow-x': xThumbWidth,
|
|
2594
2628
|
'is--drag': isDrag,
|
|
@@ -2638,6 +2672,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2638
2672
|
}
|
|
2639
2673
|
}, [
|
|
2640
2674
|
h('div', {
|
|
2675
|
+
ref: 'refVirtualSpaceElem',
|
|
2641
2676
|
class: 'vxe-list--y-space',
|
|
2642
2677
|
style: {
|
|
2643
2678
|
height: bodyHeight ? `${bodyHeight}px` : ''
|
|
@@ -2666,7 +2701,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2666
2701
|
/**
|
|
2667
2702
|
* 滚动条
|
|
2668
2703
|
*/
|
|
2669
|
-
|
|
2704
|
+
isVScrollbar
|
|
2670
2705
|
? h('div', {
|
|
2671
2706
|
class: scrollbarWrapperClss
|
|
2672
2707
|
}, [
|
|
@@ -2740,59 +2775,71 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2740
2775
|
height () {
|
|
2741
2776
|
const $xeList = this
|
|
2742
2777
|
|
|
2743
|
-
$xeList.
|
|
2778
|
+
$xeList.reLayoutFlag++
|
|
2744
2779
|
},
|
|
2745
2780
|
maxHeight () {
|
|
2746
2781
|
const $xeList = this
|
|
2747
2782
|
|
|
2748
|
-
$xeList.
|
|
2783
|
+
$xeList.reLayoutFlag++
|
|
2749
2784
|
},
|
|
2750
2785
|
syncResize () {
|
|
2751
2786
|
const $xeList = this
|
|
2752
2787
|
|
|
2753
|
-
$xeList.
|
|
2788
|
+
$xeList.reLayoutFlag++
|
|
2754
2789
|
},
|
|
2755
|
-
|
|
2790
|
+
computeIsVScrollbar () {
|
|
2756
2791
|
const $xeList = this
|
|
2757
2792
|
|
|
2758
|
-
$xeList
|
|
2793
|
+
$xeList.$nextTick(() => {
|
|
2794
|
+
$xeList.bindScrollbarResize()
|
|
2795
|
+
$xeList.$nextTick(() => {
|
|
2796
|
+
$xeList.reLayoutFlag++
|
|
2797
|
+
})
|
|
2798
|
+
})
|
|
2759
2799
|
},
|
|
2760
2800
|
computeRowHeight () {
|
|
2761
2801
|
const $xeList = this
|
|
2762
2802
|
|
|
2763
|
-
$xeList.
|
|
2803
|
+
$xeList.reLayoutFlag++
|
|
2764
2804
|
},
|
|
2765
2805
|
computeScrollYWidth () {
|
|
2766
2806
|
const $xeList = this
|
|
2767
2807
|
|
|
2768
|
-
$xeList.
|
|
2808
|
+
$xeList.reLayoutFlag++
|
|
2769
2809
|
},
|
|
2770
2810
|
computeScrollXHeight () {
|
|
2771
2811
|
const $xeList = this
|
|
2772
2812
|
|
|
2773
|
-
$xeList.
|
|
2813
|
+
$xeList.reLayoutFlag++
|
|
2774
2814
|
},
|
|
2775
2815
|
computeScrollXVisible () {
|
|
2776
2816
|
const $xeList = this
|
|
2777
2817
|
|
|
2778
2818
|
$xeList.$nextTick(() => {
|
|
2779
|
-
$xeList.
|
|
2819
|
+
$xeList.reLayoutFlag++
|
|
2780
2820
|
})
|
|
2781
2821
|
},
|
|
2782
2822
|
computeScrollYVisible () {
|
|
2783
2823
|
const $xeList = this
|
|
2784
2824
|
|
|
2785
2825
|
$xeList.$nextTick(() => {
|
|
2786
|
-
$xeList.
|
|
2826
|
+
$xeList.reLayoutFlag++
|
|
2787
2827
|
})
|
|
2788
2828
|
},
|
|
2789
|
-
|
|
2829
|
+
reLayoutFlag () {
|
|
2790
2830
|
const $xeList = this
|
|
2791
2831
|
|
|
2792
2832
|
$xeList.recalculate().then(() => {
|
|
2793
2833
|
$xeList.recalculate()
|
|
2794
2834
|
})
|
|
2795
2835
|
},
|
|
2836
|
+
reScrollFlag () {
|
|
2837
|
+
const $xeList = this
|
|
2838
|
+
|
|
2839
|
+
$xeList.updateScrollbar().then(() => {
|
|
2840
|
+
$xeList.updateScrollbar()
|
|
2841
|
+
})
|
|
2842
|
+
},
|
|
2796
2843
|
checkRowKey () {
|
|
2797
2844
|
const $xeList = this
|
|
2798
2845
|
|
|
@@ -2818,7 +2865,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2818
2865
|
const props = $xeList
|
|
2819
2866
|
const internalData = $xeList.internalData
|
|
2820
2867
|
|
|
2821
|
-
const { showSeq, showRadio, showCheckbox, autoResize
|
|
2868
|
+
const { showSeq, showRadio, showCheckbox, autoResize } = props
|
|
2822
2869
|
const rowOpts = $xeList.computeRowOpts
|
|
2823
2870
|
const { useKey, keyField } = rowOpts
|
|
2824
2871
|
const isDrag = $xeList.computeIsDrag
|
|
@@ -2839,25 +2886,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2839
2886
|
if (useKey && !keyField) {
|
|
2840
2887
|
errLog('vxe.error.reqSupportProp', ['row-config.useKey', 'row-config.keyField'])
|
|
2841
2888
|
}
|
|
2842
|
-
const el = $xeList.$refs.refElem as HTMLDivElement
|
|
2843
|
-
if (useScrollbar) {
|
|
2844
|
-
const viewInnerEl = $xeList.$refs.refVirtualBody as HTMLDivElement
|
|
2845
|
-
const scrollObserver = globalResize.create(() => {
|
|
2846
|
-
$xeList.reFlag++
|
|
2847
|
-
})
|
|
2848
|
-
if (el) {
|
|
2849
|
-
scrollObserver.observe(el)
|
|
2850
|
-
}
|
|
2851
|
-
if (viewInnerEl) {
|
|
2852
|
-
scrollObserver.observe(viewInnerEl)
|
|
2853
|
-
}
|
|
2854
|
-
internalData.scrollObserver = scrollObserver
|
|
2855
|
-
}
|
|
2856
2889
|
if (autoResize) {
|
|
2890
|
+
const el = $xeList.$refs.refElem as HTMLDivElement
|
|
2857
2891
|
const parentEl = $xeList.getParentElem()
|
|
2858
2892
|
const resizeObserver = globalResize.create(() => {
|
|
2859
2893
|
if (props.autoResize) {
|
|
2860
|
-
$xeList.
|
|
2894
|
+
$xeList.reLayoutFlag++
|
|
2861
2895
|
}
|
|
2862
2896
|
})
|
|
2863
2897
|
if (el) {
|
|
@@ -2869,9 +2903,10 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2869
2903
|
}
|
|
2870
2904
|
internalData.resizeObserver = resizeObserver
|
|
2871
2905
|
}
|
|
2872
|
-
$xeList.
|
|
2906
|
+
$xeList.reLayoutFlag++
|
|
2907
|
+
$xeList.bindScrollbarResize()
|
|
2873
2908
|
globalEvents.on($xeList, 'resize', () => {
|
|
2874
|
-
$xeList.
|
|
2909
|
+
$xeList.reLayoutFlag++
|
|
2875
2910
|
})
|
|
2876
2911
|
},
|
|
2877
2912
|
activated () {
|
|
@@ -9,7 +9,7 @@ import { createComponentLog } from '../../ui/src/log'
|
|
|
9
9
|
import VxeLoadingComponent from '../../loading'
|
|
10
10
|
import VxeScrollbarComponent from '../../scrollbar'
|
|
11
11
|
|
|
12
|
-
import type { VxeMenuDefines, MenuInternalData, MenuReactData, VxeMenuPropTypes, VxeLayoutAsideConstructor, VxeMenuEmits, VxeLayoutAsidePropTypes, VxeComponentPermissionInfo, VxeComponentSizeType, ValueOf, VxeScrollbarInstance } from '../../../types'
|
|
12
|
+
import type { VxeMenuDefines, MenuInternalData, MenuReactData, VxeMenuPropTypes, VxeLayoutAsideConstructor, VxeMenuEmits, VxeLayoutAsidePropTypes, VxeComponentPermissionInfo, VxeComponentSizeType, ValueOf, VxeScrollbarInstance, VxeComponentIsVScrollbar } from '../../../types'
|
|
13
13
|
|
|
14
14
|
const { errLog } = createComponentLog('menu')
|
|
15
15
|
|
|
@@ -43,6 +43,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
43
43
|
name: 'VxeMenu',
|
|
44
44
|
mixins: [
|
|
45
45
|
globalMixins.sizeMixin,
|
|
46
|
+
globalMixins.vScrollbarMixin,
|
|
46
47
|
globalMixins.permissionMixin
|
|
47
48
|
],
|
|
48
49
|
props: {
|
|
@@ -105,6 +106,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
105
106
|
...({} as {
|
|
106
107
|
computePermissionInfo(): VxeComponentPermissionInfo
|
|
107
108
|
computeSize(): VxeComponentSizeType
|
|
109
|
+
computeIsVScrollbar(): VxeComponentIsVScrollbar
|
|
108
110
|
$xeLayoutAside(): VxeLayoutAsideConstructor | null
|
|
109
111
|
}),
|
|
110
112
|
computePropsOpts () {
|
|
@@ -11,7 +11,7 @@ import VxeButtonComponent from '../../button'
|
|
|
11
11
|
import VxeLoadingComponent from '../../loading'
|
|
12
12
|
import VxeScrollbarComponent from '../../scrollbar'
|
|
13
13
|
|
|
14
|
-
import type { VxeModalConstructor, VxeModalPropTypes, ModalReactData, ModalInternalData, VxeModalMethods, ModalEventTypes, VxeModalEmits, VxeComponentSizeType, VxeComponentPermissionInfo, ValueOf, VxeButtonConstructor, VxeDrawerConstructor, VxeDrawerMethods, VxeFormConstructor, VxeFormPrivateMethods } from '../../../types'
|
|
14
|
+
import type { VxeModalConstructor, VxeModalPropTypes, ModalReactData, ModalInternalData, VxeModalMethods, ModalEventTypes, VxeModalEmits, VxeComponentSizeType, VxeComponentPermissionInfo, ValueOf, VxeButtonConstructor, VxeDrawerConstructor, VxeDrawerMethods, VxeFormConstructor, VxeFormPrivateMethods, VxeComponentIsVScrollbar } from '../../../types'
|
|
15
15
|
import type { VxeTableConstructor, VxeTablePrivateMethods } from '../../../types/components/table'
|
|
16
16
|
|
|
17
17
|
const { warnLog, errLog } = createComponentLog('modal')
|
|
@@ -49,6 +49,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
49
49
|
name: 'VxeModal',
|
|
50
50
|
mixins: [
|
|
51
51
|
globalMixins.sizeMixin,
|
|
52
|
+
globalMixins.vScrollbarMixin,
|
|
52
53
|
globalMixins.permissionMixin
|
|
53
54
|
],
|
|
54
55
|
props: {
|
|
@@ -284,6 +285,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
284
285
|
...({} as {
|
|
285
286
|
computePermissionInfo(): VxeComponentPermissionInfo
|
|
286
287
|
computeSize(): VxeComponentSizeType
|
|
288
|
+
computeIsVScrollbar(): VxeComponentIsVScrollbar
|
|
287
289
|
$xeParentModal(): (VxeModalConstructor & VxeModalMethods) | null
|
|
288
290
|
$xeDrawer(): (VxeDrawerConstructor & VxeDrawerMethods) | null
|
|
289
291
|
$xeTable(): (VxeTableConstructor & VxeTablePrivateMethods) | null
|
|
@@ -86,10 +86,18 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
86
86
|
type: String as PropType<VxeScrollbarPropTypes.ViewInnerClassName>,
|
|
87
87
|
default: () => getConfig().scrollbar.viewInnerClassName
|
|
88
88
|
},
|
|
89
|
+
/**
|
|
90
|
+
* 已废弃
|
|
91
|
+
* @deprecated
|
|
92
|
+
*/
|
|
89
93
|
autoResize: {
|
|
90
94
|
type: Boolean as PropType<VxeScrollbarPropTypes.AutoResize>,
|
|
91
95
|
default: () => getConfig().scrollbar.autoResize
|
|
92
96
|
},
|
|
97
|
+
/**
|
|
98
|
+
* 已废弃
|
|
99
|
+
* @deprecated
|
|
100
|
+
*/
|
|
93
101
|
syncResize: [Boolean, String, Number] as PropType<VxeScrollbarPropTypes.SyncResize>
|
|
94
102
|
},
|
|
95
103
|
data () {
|
|
@@ -9,7 +9,7 @@ import { createComponentLog } from '../../ui/src/log'
|
|
|
9
9
|
import VxeLoadingComponent from '../../loading'
|
|
10
10
|
import VxeScrollbarComponent from '../../scrollbar'
|
|
11
11
|
|
|
12
|
-
import type { VxeTabsPropTypes, VxeTabPaneProps, VxeTabsEmits, TabsInternalData, TabsReactData, VxeComponentSizeType, VxeTabsConstructor, VxeTabsPrivateMethods, VxeTabPaneDefines, ValueOf, VxeComponentStyleType } from '../../../types'
|
|
12
|
+
import type { VxeTabsPropTypes, VxeTabPaneProps, VxeTabsEmits, TabsInternalData, TabsReactData, VxeComponentSizeType, VxeTabsConstructor, VxeTabsPrivateMethods, VxeTabPaneDefines, ValueOf, VxeComponentStyleType, VxeComponentIsVScrollbar } from '../../../types'
|
|
13
13
|
|
|
14
14
|
const { baseUtils, createEvent, getConfig, getIcon, globalEvents, permission, renderEmptyElement } = VxeUI
|
|
15
15
|
const { getDefVal } = baseUtils
|
|
@@ -21,7 +21,8 @@ const scrollbarOffsetSize = 20
|
|
|
21
21
|
export default /* define-vxe-component start */ defineVxeComponent({
|
|
22
22
|
name: 'VxeTabs',
|
|
23
23
|
mixins: [
|
|
24
|
-
globalMixins.sizeMixin
|
|
24
|
+
globalMixins.sizeMixin,
|
|
25
|
+
globalMixins.vScrollbarMixin
|
|
25
26
|
],
|
|
26
27
|
props: {
|
|
27
28
|
value: [String, Number, Boolean] as PropType<VxeTabsPropTypes.ModelValue>,
|
|
@@ -107,6 +108,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
107
108
|
computed: {
|
|
108
109
|
...({} as {
|
|
109
110
|
computeSize(): VxeComponentSizeType
|
|
111
|
+
computeIsVScrollbar(): VxeComponentIsVScrollbar
|
|
110
112
|
$xeParentTabs():(VxeTabsConstructor & VxeTabsPrivateMethods) | null
|
|
111
113
|
}),
|
|
112
114
|
computeParentTabsResizeFlag () {
|
|
@@ -7,7 +7,7 @@ import { getPopupAppendElement, toCssUnit, updatePanelPlacement } from '../../ui
|
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
8
|
import VxeScrollbarComponent from '../../scrollbar'
|
|
9
9
|
|
|
10
|
-
import type { VxeTooltipPropTypes, VxeTooltipEmits, TooltipReactData, TooltipInternalData, VxeComponentSizeType, ValueOf, VxeScrollbarInstance, VxeComponentStyleType } from '../../../types'
|
|
10
|
+
import type { VxeTooltipPropTypes, VxeTooltipEmits, TooltipReactData, TooltipInternalData, VxeComponentSizeType, VxeComponentIsVScrollbar, ValueOf, VxeScrollbarInstance, VxeComponentStyleType } from '../../../types'
|
|
11
11
|
|
|
12
12
|
const { baseUtils, getConfig, createEvent, globalEvents } = VxeUI
|
|
13
13
|
const { getDefVal } = baseUtils
|
|
@@ -40,7 +40,8 @@ function createInternalData (): TooltipInternalData {
|
|
|
40
40
|
export default /* define-vxe-component start */ defineVxeComponent({
|
|
41
41
|
name: 'VxeTooltip',
|
|
42
42
|
mixins: [
|
|
43
|
-
globalMixins.sizeMixin
|
|
43
|
+
globalMixins.sizeMixin,
|
|
44
|
+
globalMixins.vScrollbarMixin
|
|
44
45
|
],
|
|
45
46
|
props: {
|
|
46
47
|
value: Boolean,
|
|
@@ -143,7 +144,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
143
144
|
},
|
|
144
145
|
computed: {
|
|
145
146
|
...({} as {
|
|
146
|
-
computeSize(): VxeComponentSizeType
|
|
147
|
+
computeSize(): VxeComponentSizeType,
|
|
148
|
+
computeIsVScrollbar(): VxeComponentIsVScrollbar
|
|
147
149
|
}),
|
|
148
150
|
computeWrapperStyle () {
|
|
149
151
|
const $xeTooltip = this
|
|
@@ -248,7 +250,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
248
250
|
const { tipTarget: targetElem, tipStore, tipPos, tipZindex } = reactData
|
|
249
251
|
const panelElem = $xeTooltip.$refs.refElem as HTMLElement
|
|
250
252
|
if (!targetElem || !panelElem) {
|
|
251
|
-
return
|
|
253
|
+
return $xeTooltip.$nextTick()
|
|
252
254
|
}
|
|
253
255
|
const targetRect = targetElem.getBoundingClientRect()
|
|
254
256
|
|
|
@@ -288,12 +290,18 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
288
290
|
tipStore.placement = ppObj.placement
|
|
289
291
|
tipStore.style = panelStyle
|
|
290
292
|
tipStore.arrowStyle.left = ppObj.arrowLeft ? `${ppObj.arrowLeft}px` : ''
|
|
293
|
+
return $xeTooltip.$nextTick()
|
|
291
294
|
},
|
|
292
295
|
updatePlacement () {
|
|
293
296
|
const $xeTooltip = this
|
|
294
297
|
|
|
295
|
-
$xeTooltip.updateTipStyle()
|
|
296
|
-
|
|
298
|
+
return $xeTooltip.updateTipStyle().then(() => {
|
|
299
|
+
return $xeTooltip.updateTipStyle()
|
|
300
|
+
}).then(() => {
|
|
301
|
+
setTimeout(() => {
|
|
302
|
+
return $xeTooltip.updateTipStyle()
|
|
303
|
+
}, 15)
|
|
304
|
+
})
|
|
297
305
|
},
|
|
298
306
|
isActived () {
|
|
299
307
|
const $xeTooltip = this
|
|
@@ -495,8 +503,9 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
495
503
|
const slots = $xeTooltip.$scopedSlots
|
|
496
504
|
const reactData = $xeTooltip.reactData
|
|
497
505
|
|
|
498
|
-
const { useHtml, theme,
|
|
506
|
+
const { useHtml, theme, useHTML } = props
|
|
499
507
|
const { tipContent } = reactData
|
|
508
|
+
const isVScrollbar = $xeTooltip.computeIsVScrollbar
|
|
500
509
|
const wrapperStyle = $xeTooltip.computeWrapperStyle
|
|
501
510
|
const contentSlot = slots.content
|
|
502
511
|
const contVNs: VNode[] = []
|
|
@@ -520,7 +529,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
520
529
|
key: 'cd'
|
|
521
530
|
}, `${tipContent}`))
|
|
522
531
|
}
|
|
523
|
-
if (
|
|
532
|
+
if (isVScrollbar) {
|
|
524
533
|
return h(VxeScrollbarComponent, {
|
|
525
534
|
key: 5,
|
|
526
535
|
ref: 'contentScrollbar',
|