vxe-pc-ui 4.19.8 → 4.20.1
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 +878 -115
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/card/src/card.js +17 -3
- package/es/icon/style.css +1 -1
- package/es/language/fr-FR.js +29 -29
- package/es/layout-aside/src/layout-aside.js +8 -5
- package/es/layout-body/src/layout-body.js +19 -11
- package/es/list/src/list.js +364 -21
- package/es/list/style.css +43 -0
- package/es/list/style.min.css +1 -1
- package/es/scrollbar/src/scrollbar.js +59 -17
- package/es/scrollbar/style.css +1 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tabs/src/tabs.js +19 -4
- package/es/tree/src/tree.js +393 -55
- package/es/tree/style.css +43 -0
- package/es/tree/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.js +12 -0
- package/es/vxe-list/style.css +43 -0
- package/es/vxe-list/style.min.css +1 -1
- package/es/vxe-scrollbar/style.css +1 -0
- package/es/vxe-tree/style.css +43 -0
- package/es/vxe-tree/style.min.css +1 -1
- package/lib/card/src/card.js +17 -3
- package/lib/card/src/card.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 +914 -126
- package/lib/index.umd.min.js +1 -1
- package/lib/language/fr-FR.js +29 -29
- package/lib/language/fr-FR.min.js +1 -1
- package/lib/language/fr-FR.umd.js +29 -29
- package/lib/layout-aside/src/layout-aside.js +7 -7
- package/lib/layout-aside/src/layout-aside.min.js +1 -1
- package/lib/layout-body/src/layout-body.js +27 -21
- package/lib/layout-body/src/layout-body.min.js +1 -1
- package/lib/list/src/list.js +368 -21
- package/lib/list/src/list.min.js +1 -1
- package/lib/list/style/style.css +43 -0
- package/lib/list/style/style.min.css +1 -1
- package/lib/scrollbar/src/scrollbar.js +67 -15
- package/lib/scrollbar/src/scrollbar.min.js +1 -1
- package/lib/scrollbar/style/style.css +1 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tabs/src/tabs.js +22 -10
- package/lib/tabs/src/tabs.min.js +1 -1
- package/lib/tree/src/tree.js +397 -53
- package/lib/tree/src/tree.min.js +1 -1
- package/lib/tree/style/style.css +43 -0
- package/lib/tree/style/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/ui/src/utils.js +14 -0
- package/lib/ui/src/utils.min.js +1 -1
- package/lib/vxe-list/style/style.css +43 -0
- package/lib/vxe-list/style/style.min.css +1 -1
- package/lib/vxe-scrollbar/style/style.css +1 -0
- package/lib/vxe-tree/style/style.css +43 -0
- package/lib/vxe-tree/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/card/src/card.ts +18 -3
- package/packages/language/fr-FR.ts +903 -903
- package/packages/layout-aside/src/layout-aside.ts +8 -5
- package/packages/layout-body/src/layout-body.ts +23 -14
- package/packages/list/src/list.ts +397 -24
- package/packages/scrollbar/src/scrollbar.ts +63 -16
- package/packages/tabs/src/tabs.ts +19 -5
- package/packages/tree/src/tree.ts +432 -64
- package/packages/ui/src/utils.ts +14 -0
- package/styles/components/list.scss +76 -0
- package/styles/components/scrollbar.scss +3 -0
- package/styles/components/tree.scss +76 -0
- package/types/components/card.d.ts +10 -1
- package/types/components/layout-aside.d.ts +10 -1
- package/types/components/layout-body.d.ts +10 -1
- package/types/components/list.d.ts +33 -2
- package/types/components/scrollbar.d.ts +17 -2
- package/types/components/table-plugins/extend-cell-area.d.ts +1 -1
- package/types/components/table.d.ts +71 -4
- package/types/components/tabs.d.ts +10 -1
- package/types/components/tree.d.ts +33 -2
- /package/es/icon/{iconfont.1791862962954.ttf → iconfont.1791950625324.ttf} +0 -0
- /package/es/icon/{iconfont.1791862962954.woff → iconfont.1791950625324.woff} +0 -0
- /package/es/icon/{iconfont.1791862962954.woff2 → iconfont.1791950625324.woff2} +0 -0
- /package/es/{iconfont.1791862962954.ttf → iconfont.1791950625324.ttf} +0 -0
- /package/es/{iconfont.1791862962954.woff → iconfont.1791950625324.woff} +0 -0
- /package/es/{iconfont.1791862962954.woff2 → iconfont.1791950625324.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1791862962954.ttf → iconfont.1791950625324.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1791862962954.woff → iconfont.1791950625324.woff} +0 -0
- /package/lib/icon/style/{iconfont.1791862962954.woff2 → iconfont.1791950625324.woff2} +0 -0
- /package/lib/{iconfont.1791862962954.ttf → iconfont.1791950625324.ttf} +0 -0
- /package/lib/{iconfont.1791862962954.woff → iconfont.1791950625324.woff} +0 -0
- /package/lib/{iconfont.1791862962954.woff2 → iconfont.1791950625324.woff2} +0 -0
|
@@ -4,6 +4,7 @@ import XEUtils from 'xe-utils'
|
|
|
4
4
|
import { VxeUI } from '../../ui'
|
|
5
5
|
import { toCssUnit } from '../../ui/src/dom'
|
|
6
6
|
import { getThumbOffsetSize, getThumbSize, getScrollFromClick, getScrollFromDrag } from './util'
|
|
7
|
+
import { getDefaultConfig } from '../../ui/src/utils'
|
|
7
8
|
import VxeLoadingComponent from '../../loading'
|
|
8
9
|
|
|
9
10
|
import type { ScrollbarReactData, ScrollbarInternalData, VxeScrollbarEmits, ScrollbarMethods, ScrollbarPrivateMethods, VxeScrollbarPropTypes, ValueOf, ScrollbarPrivateRef, VxeScrollbarPrivateComputed, VxeScrollbarConstructor, VxeScrollbarPrivateMethods, VxeComponentStyleType } from '../../../types'
|
|
@@ -33,6 +34,7 @@ export default defineVxeComponent({
|
|
|
33
34
|
name: 'VxeScrollbar',
|
|
34
35
|
props: {
|
|
35
36
|
id: [String, Number] as PropType<VxeScrollbarPropTypes.Id>,
|
|
37
|
+
viewId: [String, Number] as PropType<VxeScrollbarPropTypes.ViewId>,
|
|
36
38
|
width: [String, Number] as PropType<VxeScrollbarPropTypes.Width>,
|
|
37
39
|
height: [String, Number] as PropType<VxeScrollbarPropTypes.Height>,
|
|
38
40
|
minWidth: [String, Number] as PropType<VxeScrollbarPropTypes.MinWidth>,
|
|
@@ -48,6 +50,14 @@ export default defineVxeComponent({
|
|
|
48
50
|
type: Boolean as PropType<VxeScrollbarPropTypes.Padding>,
|
|
49
51
|
default: () => getConfig().scrollbar.padding
|
|
50
52
|
},
|
|
53
|
+
autoHide: {
|
|
54
|
+
type: Boolean as PropType<VxeScrollbarPropTypes.AutoHide>,
|
|
55
|
+
default: () => getConfig().scrollbar.autoHide
|
|
56
|
+
},
|
|
57
|
+
visible: {
|
|
58
|
+
type: Boolean as PropType<VxeScrollbarPropTypes.Visible>,
|
|
59
|
+
default: () => getConfig().scrollbar.visible
|
|
60
|
+
},
|
|
51
61
|
xConfig: Object as PropType<VxeScrollbarPropTypes.XConfig>,
|
|
52
62
|
yConfig: Object as PropType<VxeScrollbarPropTypes.YConfig>,
|
|
53
63
|
className: {
|
|
@@ -97,6 +107,8 @@ export default defineVxeComponent({
|
|
|
97
107
|
const { width, height, minWidth, minHeight, maxWidth, maxHeight } = props
|
|
98
108
|
const xOpts = computeXOpts.value
|
|
99
109
|
const yOpts = computeYOpts.value
|
|
110
|
+
const barWidth = yOpts.width
|
|
111
|
+
const barHeight = xOpts.height
|
|
100
112
|
const stys: VxeComponentStyleType = {}
|
|
101
113
|
if (width) {
|
|
102
114
|
stys.width = toCssUnit(width)
|
|
@@ -116,34 +128,58 @@ export default defineVxeComponent({
|
|
|
116
128
|
if (maxHeight) {
|
|
117
129
|
stys.maxHeight = toCssUnit(maxHeight)
|
|
118
130
|
}
|
|
119
|
-
if (
|
|
120
|
-
stys['--vxe-ui-scrollbar-y-width'] = toCssUnit(
|
|
121
|
-
|
|
122
|
-
if (xOpts.height) {
|
|
123
|
-
stys['--vxe-ui-scrollbar-x-height'] = toCssUnit(xOpts.height)
|
|
131
|
+
if (barWidth || barHeight) {
|
|
132
|
+
stys['--vxe-ui-scrollbar-y-width'] = toCssUnit(barWidth || barHeight)
|
|
133
|
+
stys['--vxe-ui-scrollbar-x-height'] = toCssUnit(barHeight || barWidth)
|
|
124
134
|
}
|
|
125
135
|
return stys
|
|
126
136
|
})
|
|
127
137
|
|
|
138
|
+
const computeXVisible = computed(() => {
|
|
139
|
+
const { visible } = props
|
|
140
|
+
const xOpts = computeXOpts.value
|
|
141
|
+
return getDefaultConfig(xOpts.visible, visible)
|
|
142
|
+
})
|
|
143
|
+
|
|
144
|
+
const computeYVisible = computed(() => {
|
|
145
|
+
const { visible } = props
|
|
146
|
+
const yOpts = computeYOpts.value
|
|
147
|
+
return getDefaultConfig(yOpts.visible, visible)
|
|
148
|
+
})
|
|
149
|
+
|
|
150
|
+
const computeXAutoHide = computed(() => {
|
|
151
|
+
const { autoHide } = props
|
|
152
|
+
const xOpts = computeXOpts.value
|
|
153
|
+
return getDefaultConfig(xOpts.autoHide, autoHide)
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
const computeYAutoHide = computed(() => {
|
|
157
|
+
const { autoHide } = props
|
|
158
|
+
const yOpts = computeYOpts.value
|
|
159
|
+
return getDefaultConfig(yOpts.autoHide, autoHide)
|
|
160
|
+
})
|
|
161
|
+
|
|
128
162
|
const computeWrapperClss = computed(() => {
|
|
129
163
|
const { native, className, padding } = props
|
|
130
164
|
const { yThumbHeight, xThumbWidth } = reactData
|
|
131
|
-
const xOpts = computeXOpts.value
|
|
132
|
-
const yOpts = computeYOpts.value
|
|
133
165
|
const xToTop = computeXToTop.value
|
|
134
166
|
const yToLeft = computeYToLeft.value
|
|
167
|
+
const xVisible = computeXVisible.value
|
|
168
|
+
const yVisible = computeYVisible.value
|
|
169
|
+
const xAutoHide = computeXAutoHide.value
|
|
170
|
+
const yAutoHide = computeYAutoHide.value
|
|
135
171
|
return domUtils.buildClass([
|
|
136
172
|
'vxe-scrollbar',
|
|
137
|
-
`ov-x--${
|
|
138
|
-
`ov-y--${
|
|
173
|
+
`ov-x--${xVisible === false ? 'hidden' : 'visible'}`,
|
|
174
|
+
`ov-y--${yVisible === false ? 'hidden' : 'visible'}`,
|
|
139
175
|
`sx-pos--${xToTop ? 'top' : 'bottom'}`,
|
|
140
176
|
`sy-pos--${yToLeft ? 'left' : 'right'}`,
|
|
141
177
|
native ? 'is--native' : 'is--virtual',
|
|
142
178
|
className
|
|
143
179
|
], {
|
|
144
180
|
'is--padding': padding,
|
|
145
|
-
'ov-x--auto-hide':
|
|
146
|
-
'ov-y--auto-hide':
|
|
181
|
+
'ov-x--auto-hide': xAutoHide,
|
|
182
|
+
'ov-y--auto-hide': yAutoHide,
|
|
147
183
|
'overflow-y': yThumbHeight,
|
|
148
184
|
'overflow-x': xThumbWidth
|
|
149
185
|
})
|
|
@@ -512,13 +548,13 @@ export default defineVxeComponent({
|
|
|
512
548
|
Object.assign($xeScrollbar, scrollbarMethods, scrollbarPrivateMethods)
|
|
513
549
|
|
|
514
550
|
const renderVN = () => {
|
|
515
|
-
const { id, native, loading, viewAttrs } = props
|
|
551
|
+
const { id, native, loading, viewId, viewAttrs } = props
|
|
516
552
|
const wrapperStyle = computeWrapperStyle.value
|
|
517
553
|
const wrapperClss = computeWrapperClss.value
|
|
518
554
|
const viewClss = computeViewClss.value
|
|
519
555
|
const viewInnerClss = computeViewInnerClss.value
|
|
520
|
-
const
|
|
521
|
-
const
|
|
556
|
+
const xVisible = computeXVisible.value
|
|
557
|
+
const yVisible = computeYVisible.value
|
|
522
558
|
const defaultSlot = slots.default
|
|
523
559
|
return h('div', {
|
|
524
560
|
ref: refElem,
|
|
@@ -530,6 +566,7 @@ export default defineVxeComponent({
|
|
|
530
566
|
ref: refViewElem,
|
|
531
567
|
class: viewClss,
|
|
532
568
|
onScroll: scrollEvent,
|
|
569
|
+
id: viewId || null,
|
|
533
570
|
...viewAttrs
|
|
534
571
|
}, [
|
|
535
572
|
h('div', {
|
|
@@ -538,7 +575,7 @@ export default defineVxeComponent({
|
|
|
538
575
|
class: viewInnerClss
|
|
539
576
|
}, defaultSlot ? defaultSlot({}) : [])
|
|
540
577
|
]),
|
|
541
|
-
native ||
|
|
578
|
+
native || xVisible === false
|
|
542
579
|
? renderEmptyElement($xeScrollbar)
|
|
543
580
|
: h('div', {
|
|
544
581
|
ref: refTrackXElem,
|
|
@@ -555,7 +592,7 @@ export default defineVxeComponent({
|
|
|
555
592
|
onLostpointercapture: cleatPointerThumbEvent
|
|
556
593
|
})
|
|
557
594
|
]),
|
|
558
|
-
native ||
|
|
595
|
+
native || yVisible === false
|
|
559
596
|
? renderEmptyElement($xeScrollbar)
|
|
560
597
|
: h('div', {
|
|
561
598
|
ref: refTrackYElem,
|
|
@@ -605,6 +642,16 @@ export default defineVxeComponent({
|
|
|
605
642
|
watch(() => props.syncResize, () => {
|
|
606
643
|
reFlag.value++
|
|
607
644
|
})
|
|
645
|
+
watch(computeXVisible, () => {
|
|
646
|
+
nextTick(() => {
|
|
647
|
+
reFlag.value++
|
|
648
|
+
})
|
|
649
|
+
})
|
|
650
|
+
watch(computeYVisible, () => {
|
|
651
|
+
nextTick(() => {
|
|
652
|
+
reFlag.value++
|
|
653
|
+
})
|
|
654
|
+
})
|
|
608
655
|
watch(reFlag, () => {
|
|
609
656
|
$xeScrollbar.recalculate().then(() => {
|
|
610
657
|
$xeScrollbar.recalculate()
|
|
@@ -175,6 +175,23 @@ export default defineVxeComponent({
|
|
|
175
175
|
return Object.assign({}, getConfig().tabs.scrollbarConfig, props.scrollbarConfig)
|
|
176
176
|
})
|
|
177
177
|
|
|
178
|
+
const computeScrollbarProps = computed(() => {
|
|
179
|
+
const scrollbarOpts = computeScrollbarOpts.value
|
|
180
|
+
const { viewClassName, viewInnerClassName } = scrollbarOpts
|
|
181
|
+
return {
|
|
182
|
+
width: scrollbarOpts.width,
|
|
183
|
+
height: scrollbarOpts.height,
|
|
184
|
+
autoHide: scrollbarOpts.autoHide,
|
|
185
|
+
visible: scrollbarOpts.visible,
|
|
186
|
+
xConfig: scrollbarOpts.xConfig,
|
|
187
|
+
yConfig: scrollbarOpts.yConfig,
|
|
188
|
+
className: scrollbarOpts.className,
|
|
189
|
+
viewAttrs: scrollbarOpts.viewAttrs,
|
|
190
|
+
viewClassName: 'vxe-tabs-pane--scrollbar-item-view' + (viewClassName ? (' ' + viewClassName) : ''),
|
|
191
|
+
viewInnerClassName: 'vxe-tabs-pane--scrollbar-item-inner' + (viewClassName ? (' ' + viewInnerClassName) : '')
|
|
192
|
+
}
|
|
193
|
+
})
|
|
194
|
+
|
|
178
195
|
const computeMaps: VxeTabsPrivateComputed = {
|
|
179
196
|
}
|
|
180
197
|
|
|
@@ -775,8 +792,7 @@ export default defineVxeComponent({
|
|
|
775
792
|
const { initNames, activeName } = reactData
|
|
776
793
|
const { name, slots } = item
|
|
777
794
|
const defaultSlot = slots ? slots.default : null
|
|
778
|
-
const
|
|
779
|
-
const { viewClassName, viewInnerClassName } = scrollbarOpts
|
|
795
|
+
const scrollbarProps = computeScrollbarProps.value
|
|
780
796
|
if (name && initNames.includes(name)) {
|
|
781
797
|
return useScrollbar
|
|
782
798
|
? h(VxeScrollbarComponent, {
|
|
@@ -784,9 +800,7 @@ export default defineVxeComponent({
|
|
|
784
800
|
class: ['vxe-tabs-pane--scrollbar-item', {
|
|
785
801
|
'is--visible': activeName === name
|
|
786
802
|
}],
|
|
787
|
-
...
|
|
788
|
-
viewClassName: 'vxe-tabs-pane--scrollbar-item-view' + (viewClassName ? (' ' + viewClassName) : ''),
|
|
789
|
-
viewInnerClassName: 'vxe-tabs-pane--scrollbar-item-inner' + (viewClassName ? (' ' + viewInnerClassName) : '')
|
|
803
|
+
...scrollbarProps
|
|
790
804
|
}, {
|
|
791
805
|
default: () => defaultSlot ? callSlot(defaultSlot, { name }) : []
|
|
792
806
|
})
|