vxe-pc-ui 3.19.8 → 3.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/es/card/src/card.js +18 -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 +22 -11
- package/es/list/src/list.js +409 -21
- package/es/list/style.css +43 -0
- package/es/list/style.min.css +1 -1
- package/es/scrollbar/src/scrollbar.js +69 -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 -3
- package/es/tree/src/tree.js +439 -56
- 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 +18 -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 +956 -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 +8 -8
- package/lib/layout-aside/src/layout-aside.min.js +1 -1
- package/lib/layout-body/src/layout-body.js +26 -19
- package/lib/layout-body/src/layout-body.min.js +1 -1
- package/lib/list/src/list.js +383 -22
- 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 +74 -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 +20 -7
- package/lib/tabs/src/tabs.min.js +1 -1
- package/lib/tree/src/tree.js +416 -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 +19 -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 +26 -14
- package/packages/list/src/list.ts +444 -25
- package/packages/scrollbar/src/scrollbar.ts +79 -17
- package/packages/tabs/src/tabs.ts +20 -7
- package/packages/tree/src/tree.ts +482 -67
- 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 +16 -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.1791862954819.ttf → iconfont.1791950618327.ttf} +0 -0
- /package/es/icon/{iconfont.1791862954819.woff → iconfont.1791950618327.woff} +0 -0
- /package/es/icon/{iconfont.1791862954819.woff2 → iconfont.1791950618327.woff2} +0 -0
- /package/es/{iconfont.1791862954819.ttf → iconfont.1791950618327.ttf} +0 -0
- /package/es/{iconfont.1791862954819.woff → iconfont.1791950618327.woff} +0 -0
- /package/es/{iconfont.1791862954819.woff2 → iconfont.1791950618327.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1791862954819.ttf → iconfont.1791950618327.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1791862954819.woff → iconfont.1791950618327.woff} +0 -0
- /package/lib/icon/style/{iconfont.1791862954819.woff2 → iconfont.1791950618327.woff2} +0 -0
- /package/lib/{iconfont.1791862954819.ttf → iconfont.1791950618327.ttf} +0 -0
- /package/lib/{iconfont.1791862954819.woff → iconfont.1791950618327.woff} +0 -0
- /package/lib/{iconfont.1791862954819.woff2 → iconfont.1791950618327.woff2} +0 -0
|
@@ -4,6 +4,8 @@ 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'
|
|
8
|
+
|
|
7
9
|
import VxeLoadingComponent from '../../loading'
|
|
8
10
|
|
|
9
11
|
import type { ScrollbarReactData, ScrollbarInternalData, VxeScrollbarEmits, ValueOf, VxeScrollbarPropTypes, VxeComponentStyleType } from '../../../types'
|
|
@@ -33,6 +35,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
33
35
|
name: 'VxeScrollbar',
|
|
34
36
|
props: {
|
|
35
37
|
id: [String, Number] as PropType<VxeScrollbarPropTypes.Id>,
|
|
38
|
+
viewId: [String, Number] as PropType<VxeScrollbarPropTypes.ViewId>,
|
|
36
39
|
width: [String, Number] as PropType<VxeScrollbarPropTypes.Width>,
|
|
37
40
|
height: [String, Number] as PropType<VxeScrollbarPropTypes.Height>,
|
|
38
41
|
minWidth: [String, Number] as PropType<VxeScrollbarPropTypes.MinWidth>,
|
|
@@ -48,6 +51,14 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
48
51
|
type: Boolean as PropType<VxeScrollbarPropTypes.Padding>,
|
|
49
52
|
default: () => getConfig().scrollbar.padding
|
|
50
53
|
},
|
|
54
|
+
autoHide: {
|
|
55
|
+
type: Boolean as PropType<VxeScrollbarPropTypes.AutoHide>,
|
|
56
|
+
default: () => getConfig().scrollbar.autoHide
|
|
57
|
+
},
|
|
58
|
+
visible: {
|
|
59
|
+
type: Boolean as PropType<VxeScrollbarPropTypes.Visible>,
|
|
60
|
+
default: () => getConfig().scrollbar.visible
|
|
61
|
+
},
|
|
51
62
|
xConfig: Object as PropType<VxeScrollbarPropTypes.XConfig>,
|
|
52
63
|
yConfig: Object as PropType<VxeScrollbarPropTypes.YConfig>,
|
|
53
64
|
className: {
|
|
@@ -94,6 +105,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
94
105
|
const { width, height, minWidth, minHeight, maxWidth, maxHeight } = props
|
|
95
106
|
const xOpts = $xeScrollbar.computeXOpts
|
|
96
107
|
const yOpts = $xeScrollbar.computeYOpts
|
|
108
|
+
const barWidth = yOpts.width
|
|
109
|
+
const barHeight = xOpts.height
|
|
97
110
|
const stys: VxeComponentStyleType = {}
|
|
98
111
|
if (width) {
|
|
99
112
|
stys.width = toCssUnit(width)
|
|
@@ -113,14 +126,44 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
113
126
|
if (maxHeight) {
|
|
114
127
|
stys.maxHeight = toCssUnit(maxHeight)
|
|
115
128
|
}
|
|
116
|
-
if (
|
|
117
|
-
stys['--vxe-ui-scrollbar-y-width'] = toCssUnit(
|
|
118
|
-
|
|
119
|
-
if (xOpts.height) {
|
|
120
|
-
stys['--vxe-ui-scrollbar-x-height'] = toCssUnit(xOpts.height)
|
|
129
|
+
if (barWidth || barHeight) {
|
|
130
|
+
stys['--vxe-ui-scrollbar-y-width'] = toCssUnit(barWidth || barHeight)
|
|
131
|
+
stys['--vxe-ui-scrollbar-x-height'] = toCssUnit(barHeight || barWidth)
|
|
121
132
|
}
|
|
122
133
|
return stys
|
|
123
134
|
},
|
|
135
|
+
computeXVisible () {
|
|
136
|
+
const $xeScrollbar = this
|
|
137
|
+
const props = $xeScrollbar
|
|
138
|
+
|
|
139
|
+
const { visible } = props
|
|
140
|
+
const xOpts = ($xeScrollbar as any).computeXOpts as VxeScrollbarPropTypes.XConfig
|
|
141
|
+
return getDefaultConfig(xOpts.visible, visible)
|
|
142
|
+
},
|
|
143
|
+
computeYVisible () {
|
|
144
|
+
const $xeScrollbar = this
|
|
145
|
+
const props = $xeScrollbar
|
|
146
|
+
|
|
147
|
+
const { visible } = props
|
|
148
|
+
const yOpts = ($xeScrollbar as any).computeYOpts as VxeScrollbarPropTypes.YConfig
|
|
149
|
+
return getDefaultConfig(yOpts.visible, visible)
|
|
150
|
+
},
|
|
151
|
+
computeXAutoHide () {
|
|
152
|
+
const $xeScrollbar = this
|
|
153
|
+
const props = $xeScrollbar
|
|
154
|
+
|
|
155
|
+
const { autoHide } = props
|
|
156
|
+
const xOpts = ($xeScrollbar as any).computeXOpts as VxeScrollbarPropTypes.XConfig
|
|
157
|
+
return getDefaultConfig(xOpts.autoHide, autoHide)
|
|
158
|
+
},
|
|
159
|
+
computeYAutoHide () {
|
|
160
|
+
const $xeScrollbar = this
|
|
161
|
+
const props = $xeScrollbar
|
|
162
|
+
|
|
163
|
+
const { autoHide } = props
|
|
164
|
+
const yOpts = ($xeScrollbar as any).computeYOpts as VxeScrollbarPropTypes.YConfig
|
|
165
|
+
return getDefaultConfig(yOpts.autoHide, autoHide)
|
|
166
|
+
},
|
|
124
167
|
computeWrapperClss () {
|
|
125
168
|
const $xeScrollbar = this
|
|
126
169
|
const props = $xeScrollbar
|
|
@@ -128,22 +171,24 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
128
171
|
|
|
129
172
|
const { native, className, padding } = props
|
|
130
173
|
const { yThumbHeight, xThumbWidth } = reactData
|
|
131
|
-
const xOpts = ($xeScrollbar as any).computeXOpts as VxeScrollbarPropTypes.XConfig
|
|
132
|
-
const yOpts = ($xeScrollbar as any).computeYOpts as VxeScrollbarPropTypes.YConfig
|
|
133
174
|
const xToTop = ($xeScrollbar as any).computeXToTop as boolean
|
|
134
175
|
const yToLeft = ($xeScrollbar as any).computeYToLeft as boolean
|
|
176
|
+
const xVisible = ($xeScrollbar as any).computeXVisible
|
|
177
|
+
const yVisible = ($xeScrollbar as any).computeYVisible
|
|
178
|
+
const xAutoHide = ($xeScrollbar as any).computeXAutoHide
|
|
179
|
+
const yAutoHide = ($xeScrollbar as any).computeYAutoHide
|
|
135
180
|
return domUtils.buildClass([
|
|
136
181
|
'vxe-scrollbar',
|
|
137
|
-
`ov-x--${
|
|
138
|
-
`ov-y--${
|
|
182
|
+
`ov-x--${xVisible === false ? 'hidden' : 'visible'}`,
|
|
183
|
+
`ov-y--${yVisible === false ? 'hidden' : 'visible'}`,
|
|
139
184
|
`sx-pos--${xToTop ? 'top' : 'bottom'}`,
|
|
140
185
|
`sy-pos--${yToLeft ? 'left' : 'right'}`,
|
|
141
186
|
native ? 'is--native' : 'is--virtual',
|
|
142
187
|
className
|
|
143
188
|
], {
|
|
144
189
|
'is--padding': padding,
|
|
145
|
-
'ov-x--auto-hide':
|
|
146
|
-
'ov-y--auto-hide':
|
|
190
|
+
'ov-x--auto-hide': xAutoHide,
|
|
191
|
+
'ov-y--auto-hide': yAutoHide,
|
|
147
192
|
'overflow-y': yThumbHeight,
|
|
148
193
|
'overflow-x': xThumbWidth
|
|
149
194
|
})
|
|
@@ -540,13 +585,13 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
540
585
|
const props = $xeScrollbar
|
|
541
586
|
const slots = $xeScrollbar.$scopedSlots
|
|
542
587
|
|
|
543
|
-
const { id, native, loading, viewAttrs } = props
|
|
588
|
+
const { id, native, loading, viewId, viewAttrs } = props
|
|
544
589
|
const wrapperStyle = $xeScrollbar.computeWrapperStyle
|
|
545
590
|
const wrapperClss = $xeScrollbar.computeWrapperClss
|
|
546
591
|
const viewClss = $xeScrollbar.computeViewClss
|
|
547
592
|
const viewInnerClss = $xeScrollbar.computeViewInnerClss
|
|
548
|
-
const
|
|
549
|
-
const
|
|
593
|
+
const xVisible = $xeScrollbar.computeXVisible
|
|
594
|
+
const yVisible = $xeScrollbar.computeYVisible
|
|
550
595
|
const defaultSlot = slots.default
|
|
551
596
|
return h('div', {
|
|
552
597
|
ref: 'refElem',
|
|
@@ -559,7 +604,10 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
559
604
|
h('div', {
|
|
560
605
|
ref: 'refViewElem',
|
|
561
606
|
class: viewClss,
|
|
562
|
-
attrs:
|
|
607
|
+
attrs: {
|
|
608
|
+
id: viewId || null,
|
|
609
|
+
...viewAttrs
|
|
610
|
+
},
|
|
563
611
|
on: {
|
|
564
612
|
scroll: $xeScrollbar.scrollEvent
|
|
565
613
|
}
|
|
@@ -570,7 +618,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
570
618
|
class: viewInnerClss
|
|
571
619
|
}, defaultSlot ? defaultSlot({}) : [])
|
|
572
620
|
]),
|
|
573
|
-
native ||
|
|
621
|
+
native || xVisible === false
|
|
574
622
|
? renderEmptyElement($xeScrollbar)
|
|
575
623
|
: h('div', {
|
|
576
624
|
ref: 'refTrackXElem',
|
|
@@ -591,7 +639,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
591
639
|
}
|
|
592
640
|
})
|
|
593
641
|
]),
|
|
594
|
-
native ||
|
|
642
|
+
native || yVisible === false
|
|
595
643
|
? renderEmptyElement($xeScrollbar)
|
|
596
644
|
: h('div', {
|
|
597
645
|
ref: 'refTrackYElem',
|
|
@@ -662,6 +710,20 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
662
710
|
|
|
663
711
|
$xeScrollbar.reFlag++
|
|
664
712
|
},
|
|
713
|
+
computeXVisible () {
|
|
714
|
+
const $xeScrollbar = this
|
|
715
|
+
|
|
716
|
+
$xeScrollbar.$nextTick(() => {
|
|
717
|
+
$xeScrollbar.reFlag++
|
|
718
|
+
})
|
|
719
|
+
},
|
|
720
|
+
computeYVisible () {
|
|
721
|
+
const $xeScrollbar = this
|
|
722
|
+
|
|
723
|
+
$xeScrollbar.$nextTick(() => {
|
|
724
|
+
$xeScrollbar.reFlag++
|
|
725
|
+
})
|
|
726
|
+
},
|
|
665
727
|
reFlag () {
|
|
666
728
|
const $xeScrollbar = this
|
|
667
729
|
|
|
@@ -193,6 +193,24 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
193
193
|
const props = $xeTabs
|
|
194
194
|
|
|
195
195
|
return Object.assign({}, getConfig().tabs.scrollbarConfig, props.scrollbarConfig)
|
|
196
|
+
},
|
|
197
|
+
computeScrollbarProps () {
|
|
198
|
+
const $xeTabs = this
|
|
199
|
+
|
|
200
|
+
const scrollbarOpts = $xeTabs.computeScrollbarOpts as VxeTabsPropTypes.ScrollbarConfig
|
|
201
|
+
const { viewClassName, viewInnerClassName } = scrollbarOpts
|
|
202
|
+
return {
|
|
203
|
+
width: scrollbarOpts.width,
|
|
204
|
+
height: scrollbarOpts.height,
|
|
205
|
+
autoHide: scrollbarOpts.autoHide,
|
|
206
|
+
visible: scrollbarOpts.visible,
|
|
207
|
+
xConfig: scrollbarOpts.xConfig,
|
|
208
|
+
yConfig: scrollbarOpts.yConfig,
|
|
209
|
+
className: scrollbarOpts.className,
|
|
210
|
+
viewAttrs: scrollbarOpts.viewAttrs,
|
|
211
|
+
viewClassName: 'vxe-tabs-pane--scrollbar-item-view' + (viewClassName ? (' ' + viewClassName) : ''),
|
|
212
|
+
viewInnerClassName: 'vxe-tabs-pane--scrollbar-item-inner' + (viewClassName ? (' ' + viewInnerClassName) : '')
|
|
213
|
+
}
|
|
196
214
|
}
|
|
197
215
|
},
|
|
198
216
|
methods: {
|
|
@@ -840,8 +858,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
840
858
|
const { initNames, activeName } = reactData
|
|
841
859
|
const { name, slots } = item
|
|
842
860
|
const defaultSlot = slots ? slots.default : null
|
|
843
|
-
const
|
|
844
|
-
const { viewClassName, viewInnerClassName } = scrollbarOpts
|
|
861
|
+
const scrollbarProps = $xeTabs.computeScrollbarProps
|
|
845
862
|
if (name && initNames.includes(name)) {
|
|
846
863
|
return useScrollbar
|
|
847
864
|
? h(VxeScrollbarComponent, {
|
|
@@ -849,11 +866,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
849
866
|
class: ['vxe-tabs-pane--scrollbar-item', {
|
|
850
867
|
'is--visible': activeName === name
|
|
851
868
|
}],
|
|
852
|
-
props:
|
|
853
|
-
...scrollbarOpts,
|
|
854
|
-
viewClassName: 'vxe-tabs-pane--scrollbar-item-view' + (viewClassName ? (' ' + viewClassName) : ''),
|
|
855
|
-
viewInnerClassName: 'vxe-tabs-pane--scrollbar-item-inner' + (viewClassName ? (' ' + viewInnerClassName) : '')
|
|
856
|
-
},
|
|
869
|
+
props: scrollbarProps,
|
|
857
870
|
scopedSlots: {
|
|
858
871
|
default: () => defaultSlot ? $xeTabs.callSlot(defaultSlot, { name }, h) : []
|
|
859
872
|
}
|