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
|
const { getConfig, createEvent, domUtils, globalResize, globalEvents, renderEmptyElement } = VxeUI;
|
|
9
10
|
function createReactData() {
|
|
@@ -27,6 +28,7 @@ export default defineVxeComponent({
|
|
|
27
28
|
name: 'VxeScrollbar',
|
|
28
29
|
props: {
|
|
29
30
|
id: [String, Number],
|
|
31
|
+
viewId: [String, Number],
|
|
30
32
|
width: [String, Number],
|
|
31
33
|
height: [String, Number],
|
|
32
34
|
minWidth: [String, Number],
|
|
@@ -42,6 +44,14 @@ export default defineVxeComponent({
|
|
|
42
44
|
type: Boolean,
|
|
43
45
|
default: () => getConfig().scrollbar.padding
|
|
44
46
|
},
|
|
47
|
+
autoHide: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: () => getConfig().scrollbar.autoHide
|
|
50
|
+
},
|
|
51
|
+
visible: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: () => getConfig().scrollbar.visible
|
|
54
|
+
},
|
|
45
55
|
xConfig: Object,
|
|
46
56
|
yConfig: Object,
|
|
47
57
|
className: {
|
|
@@ -86,6 +96,8 @@ export default defineVxeComponent({
|
|
|
86
96
|
const { width, height, minWidth, minHeight, maxWidth, maxHeight } = props;
|
|
87
97
|
const xOpts = computeXOpts.value;
|
|
88
98
|
const yOpts = computeYOpts.value;
|
|
99
|
+
const barWidth = yOpts.width;
|
|
100
|
+
const barHeight = xOpts.height;
|
|
89
101
|
const stys = {};
|
|
90
102
|
if (width) {
|
|
91
103
|
stys.width = toCssUnit(width);
|
|
@@ -105,33 +117,53 @@ export default defineVxeComponent({
|
|
|
105
117
|
if (maxHeight) {
|
|
106
118
|
stys.maxHeight = toCssUnit(maxHeight);
|
|
107
119
|
}
|
|
108
|
-
if (
|
|
109
|
-
stys['--vxe-ui-scrollbar-y-width'] = toCssUnit(
|
|
110
|
-
|
|
111
|
-
if (xOpts.height) {
|
|
112
|
-
stys['--vxe-ui-scrollbar-x-height'] = toCssUnit(xOpts.height);
|
|
120
|
+
if (barWidth || barHeight) {
|
|
121
|
+
stys['--vxe-ui-scrollbar-y-width'] = toCssUnit(barWidth || barHeight);
|
|
122
|
+
stys['--vxe-ui-scrollbar-x-height'] = toCssUnit(barHeight || barWidth);
|
|
113
123
|
}
|
|
114
124
|
return stys;
|
|
115
125
|
});
|
|
126
|
+
const computeXVisible = computed(() => {
|
|
127
|
+
const { visible } = props;
|
|
128
|
+
const xOpts = computeXOpts.value;
|
|
129
|
+
return getDefaultConfig(xOpts.visible, visible);
|
|
130
|
+
});
|
|
131
|
+
const computeYVisible = computed(() => {
|
|
132
|
+
const { visible } = props;
|
|
133
|
+
const yOpts = computeYOpts.value;
|
|
134
|
+
return getDefaultConfig(yOpts.visible, visible);
|
|
135
|
+
});
|
|
136
|
+
const computeXAutoHide = computed(() => {
|
|
137
|
+
const { autoHide } = props;
|
|
138
|
+
const xOpts = computeXOpts.value;
|
|
139
|
+
return getDefaultConfig(xOpts.autoHide, autoHide);
|
|
140
|
+
});
|
|
141
|
+
const computeYAutoHide = computed(() => {
|
|
142
|
+
const { autoHide } = props;
|
|
143
|
+
const yOpts = computeYOpts.value;
|
|
144
|
+
return getDefaultConfig(yOpts.autoHide, autoHide);
|
|
145
|
+
});
|
|
116
146
|
const computeWrapperClss = computed(() => {
|
|
117
147
|
const { native, className, padding } = props;
|
|
118
148
|
const { yThumbHeight, xThumbWidth } = reactData;
|
|
119
|
-
const xOpts = computeXOpts.value;
|
|
120
|
-
const yOpts = computeYOpts.value;
|
|
121
149
|
const xToTop = computeXToTop.value;
|
|
122
150
|
const yToLeft = computeYToLeft.value;
|
|
151
|
+
const xVisible = computeXVisible.value;
|
|
152
|
+
const yVisible = computeYVisible.value;
|
|
153
|
+
const xAutoHide = computeXAutoHide.value;
|
|
154
|
+
const yAutoHide = computeYAutoHide.value;
|
|
123
155
|
return domUtils.buildClass([
|
|
124
156
|
'vxe-scrollbar',
|
|
125
|
-
`ov-x--${
|
|
126
|
-
`ov-y--${
|
|
157
|
+
`ov-x--${xVisible === false ? 'hidden' : 'visible'}`,
|
|
158
|
+
`ov-y--${yVisible === false ? 'hidden' : 'visible'}`,
|
|
127
159
|
`sx-pos--${xToTop ? 'top' : 'bottom'}`,
|
|
128
160
|
`sy-pos--${yToLeft ? 'left' : 'right'}`,
|
|
129
161
|
native ? 'is--native' : 'is--virtual',
|
|
130
162
|
className
|
|
131
163
|
], {
|
|
132
164
|
'is--padding': padding,
|
|
133
|
-
'ov-x--auto-hide':
|
|
134
|
-
'ov-y--auto-hide':
|
|
165
|
+
'ov-x--auto-hide': xAutoHide,
|
|
166
|
+
'ov-y--auto-hide': yAutoHide,
|
|
135
167
|
'overflow-y': yThumbHeight,
|
|
136
168
|
'overflow-x': xThumbWidth
|
|
137
169
|
});
|
|
@@ -471,13 +503,13 @@ export default defineVxeComponent({
|
|
|
471
503
|
const scrollbarPrivateMethods = {};
|
|
472
504
|
Object.assign($xeScrollbar, scrollbarMethods, scrollbarPrivateMethods);
|
|
473
505
|
const renderVN = () => {
|
|
474
|
-
const { id, native, loading, viewAttrs } = props;
|
|
506
|
+
const { id, native, loading, viewId, viewAttrs } = props;
|
|
475
507
|
const wrapperStyle = computeWrapperStyle.value;
|
|
476
508
|
const wrapperClss = computeWrapperClss.value;
|
|
477
509
|
const viewClss = computeViewClss.value;
|
|
478
510
|
const viewInnerClss = computeViewInnerClss.value;
|
|
479
|
-
const
|
|
480
|
-
const
|
|
511
|
+
const xVisible = computeXVisible.value;
|
|
512
|
+
const yVisible = computeYVisible.value;
|
|
481
513
|
const defaultSlot = slots.default;
|
|
482
514
|
return h('div', {
|
|
483
515
|
ref: refElem,
|
|
@@ -485,14 +517,14 @@ export default defineVxeComponent({
|
|
|
485
517
|
class: wrapperClss,
|
|
486
518
|
style: wrapperStyle
|
|
487
519
|
}, [
|
|
488
|
-
h('div', Object.assign({ ref: refViewElem, class: viewClss, onScroll: scrollEvent }, viewAttrs), [
|
|
520
|
+
h('div', Object.assign({ ref: refViewElem, class: viewClss, onScroll: scrollEvent, id: viewId || null }, viewAttrs), [
|
|
489
521
|
h('div', {
|
|
490
522
|
key: 'vi',
|
|
491
523
|
ref: refViewInnerElem,
|
|
492
524
|
class: viewInnerClss
|
|
493
525
|
}, defaultSlot ? defaultSlot({}) : [])
|
|
494
526
|
]),
|
|
495
|
-
native ||
|
|
527
|
+
native || xVisible === false
|
|
496
528
|
? renderEmptyElement($xeScrollbar)
|
|
497
529
|
: h('div', {
|
|
498
530
|
ref: refTrackXElem,
|
|
@@ -509,7 +541,7 @@ export default defineVxeComponent({
|
|
|
509
541
|
onLostpointercapture: cleatPointerThumbEvent
|
|
510
542
|
})
|
|
511
543
|
]),
|
|
512
|
-
native ||
|
|
544
|
+
native || yVisible === false
|
|
513
545
|
? renderEmptyElement($xeScrollbar)
|
|
514
546
|
: h('div', {
|
|
515
547
|
ref: refTrackYElem,
|
|
@@ -557,6 +589,16 @@ export default defineVxeComponent({
|
|
|
557
589
|
watch(() => props.syncResize, () => {
|
|
558
590
|
reFlag.value++;
|
|
559
591
|
});
|
|
592
|
+
watch(computeXVisible, () => {
|
|
593
|
+
nextTick(() => {
|
|
594
|
+
reFlag.value++;
|
|
595
|
+
});
|
|
596
|
+
});
|
|
597
|
+
watch(computeYVisible, () => {
|
|
598
|
+
nextTick(() => {
|
|
599
|
+
reFlag.value++;
|
|
600
|
+
});
|
|
601
|
+
});
|
|
560
602
|
watch(reFlag, () => {
|
|
561
603
|
$xeScrollbar.recalculate().then(() => {
|
|
562
604
|
$xeScrollbar.recalculate();
|
package/es/scrollbar/style.css
CHANGED