vxe-pc-ui 4.20.1 → 4.20.2
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 +226 -83
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/card/src/card.js +2 -1
- package/es/drawer/src/drawer.js +59 -15
- package/es/drawer/style.css +13 -6
- package/es/drawer/style.min.css +1 -1
- 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/list/src/list.js +49 -23
- package/es/menu/src/menu.js +2 -2
- package/es/modal/src/modal.js +56 -12
- package/es/modal/style.css +15 -4
- package/es/modal/style.min.css +1 -1
- package/es/scrollbar/src/scrollbar.js +16 -4
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tabs/src/tabs.js +2 -2
- package/es/tree/src/tree.js +43 -24
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-drawer/style.css +13 -6
- package/es/vxe-drawer/style.min.css +1 -1
- package/es/vxe-modal/style.css +15 -4
- package/es/vxe-modal/style.min.css +1 -1
- package/lib/card/src/card.js +2 -1
- package/lib/card/src/card.min.js +1 -1
- package/lib/drawer/src/drawer.js +64 -11
- package/lib/drawer/src/drawer.min.js +1 -1
- package/lib/drawer/style/style.css +13 -6
- package/lib/drawer/style/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +318 -84
- package/lib/index.umd.min.js +1 -1
- package/lib/layout-aside/src/layout-aside.js +2 -1
- package/lib/layout-aside/src/layout-aside.min.js +1 -1
- package/lib/layout-body/src/layout-body.js +2 -1
- package/lib/layout-body/src/layout-body.min.js +1 -1
- package/lib/list/src/list.js +49 -24
- 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 +61 -10
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/modal/style/style.css +15 -4
- package/lib/modal/style/style.min.css +1 -1
- package/lib/scrollbar/src/scrollbar.js +16 -4
- package/lib/scrollbar/src/scrollbar.min.js +1 -1
- 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/tree/src/tree.js +43 -25
- 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/lib/vxe-drawer/style/style.css +13 -6
- package/lib/vxe-drawer/style/style.min.css +1 -1
- package/lib/vxe-modal/style/style.css +15 -4
- package/lib/vxe-modal/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/card/src/card.ts +2 -1
- package/packages/drawer/src/drawer.ts +73 -16
- package/packages/layout-aside/src/layout-aside.ts +2 -1
- package/packages/layout-body/src/layout-body.ts +2 -1
- package/packages/list/src/list.ts +53 -23
- package/packages/menu/src/menu.ts +2 -2
- package/packages/modal/src/modal.ts +71 -14
- package/packages/scrollbar/src/scrollbar.ts +18 -4
- package/packages/tabs/src/tabs.ts +2 -2
- package/packages/tree/src/tree.ts +46 -24
- package/styles/components/drawer.scss +13 -6
- package/styles/components/modal.scss +12 -4
- package/types/components/drawer.d.ts +20 -0
- package/types/components/gantt-module/gantt-view.d.ts +24 -1
- package/types/components/gantt.d.ts +2 -0
- package/types/components/list.d.ts +3 -1
- package/types/components/modal.d.ts +20 -0
- package/types/components/table.d.ts +33 -2
- package/types/components/tree.d.ts +3 -1
- /package/es/icon/{iconfont.1791950625324.ttf → iconfont.1792034967421.ttf} +0 -0
- /package/es/icon/{iconfont.1791950625324.woff → iconfont.1792034967421.woff} +0 -0
- /package/es/icon/{iconfont.1791950625324.woff2 → iconfont.1792034967421.woff2} +0 -0
- /package/es/{iconfont.1791950625324.ttf → iconfont.1792034967421.ttf} +0 -0
- /package/es/{iconfont.1791950625324.woff → iconfont.1792034967421.woff} +0 -0
- /package/es/{iconfont.1791950625324.woff2 → iconfont.1792034967421.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1791950625324.ttf → iconfont.1792034967421.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1791950625324.woff → iconfont.1792034967421.woff} +0 -0
- /package/lib/icon/style/{iconfont.1791950625324.woff2 → iconfont.1792034967421.woff2} +0 -0
- /package/lib/{iconfont.1791950625324.ttf → iconfont.1792034967421.ttf} +0 -0
- /package/lib/{iconfont.1791950625324.woff → iconfont.1792034967421.woff} +0 -0
- /package/lib/{iconfont.1791950625324.woff2 → iconfont.1792034967421.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -101,7 +101,7 @@ function checkDynamic() {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
const { log } = VxeUI;
|
|
104
|
-
const uiVersion = `ui v${"4.20.
|
|
104
|
+
const uiVersion = `ui v${"4.20.2"}`;
|
|
105
105
|
function createComponentLog(name) {
|
|
106
106
|
const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
|
|
107
107
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -115,7 +115,7 @@ function createComponentLog(name) {
|
|
|
115
115
|
const warnLog$j = log.create('warn', uiVersion);
|
|
116
116
|
log.create('error', uiVersion);
|
|
117
117
|
|
|
118
|
-
const version = "4.20.
|
|
118
|
+
const version = "4.20.2";
|
|
119
119
|
VxeUI.uiVersion = version;
|
|
120
120
|
VxeUI.dynamicApp = dynamicApp;
|
|
121
121
|
function config(options) {
|
|
@@ -6548,10 +6548,8 @@ var VxeScrollbarComponent = defineVxeComponent({
|
|
|
6548
6548
|
const internalData = createInternalData$m();
|
|
6549
6549
|
const computeWrapperStyle = computed(() => {
|
|
6550
6550
|
const { width, height, minWidth, minHeight, maxWidth, maxHeight } = props;
|
|
6551
|
-
const
|
|
6552
|
-
const
|
|
6553
|
-
const barWidth = yOpts.width;
|
|
6554
|
-
const barHeight = xOpts.height;
|
|
6551
|
+
const barWidth = computeYWidth.value;
|
|
6552
|
+
const barHeight = computeXHeight.value;
|
|
6555
6553
|
const stys = {};
|
|
6556
6554
|
if (width) {
|
|
6557
6555
|
stys.width = toCssUnit(width);
|
|
@@ -6577,6 +6575,14 @@ var VxeScrollbarComponent = defineVxeComponent({
|
|
|
6577
6575
|
}
|
|
6578
6576
|
return stys;
|
|
6579
6577
|
});
|
|
6578
|
+
const computeXHeight = computed(() => {
|
|
6579
|
+
const xOpts = computeXOpts.value;
|
|
6580
|
+
return xOpts.height;
|
|
6581
|
+
});
|
|
6582
|
+
const computeYWidth = computed(() => {
|
|
6583
|
+
const yOpts = computeYOpts.value;
|
|
6584
|
+
return yOpts.width;
|
|
6585
|
+
});
|
|
6580
6586
|
const computeXVisible = computed(() => {
|
|
6581
6587
|
const { visible } = props;
|
|
6582
6588
|
const xOpts = computeXOpts.value;
|
|
@@ -7043,6 +7049,12 @@ var VxeScrollbarComponent = defineVxeComponent({
|
|
|
7043
7049
|
watch(() => props.syncResize, () => {
|
|
7044
7050
|
reFlag.value++;
|
|
7045
7051
|
});
|
|
7052
|
+
watch(computeYWidth, () => {
|
|
7053
|
+
reFlag.value++;
|
|
7054
|
+
});
|
|
7055
|
+
watch(computeXHeight, () => {
|
|
7056
|
+
reFlag.value++;
|
|
7057
|
+
});
|
|
7046
7058
|
watch(computeXVisible, () => {
|
|
7047
7059
|
nextTick(() => {
|
|
7048
7060
|
reFlag.value++;
|
|
@@ -7134,7 +7146,7 @@ var VxeCardComponent = defineVxeComponent({
|
|
|
7134
7146
|
},
|
|
7135
7147
|
useScrollbar: {
|
|
7136
7148
|
type: Boolean,
|
|
7137
|
-
default: () => getConfig$4().card.useScrollbar
|
|
7149
|
+
default: () => getDefaultConfig(getConfig$4().card.useScrollbar, getConfig$4().useScrollbar)
|
|
7138
7150
|
},
|
|
7139
7151
|
scrollbarConfig: Object
|
|
7140
7152
|
},
|
|
@@ -7861,8 +7873,9 @@ function createInternalData$l() {
|
|
|
7861
7873
|
afterList: [],
|
|
7862
7874
|
fullKeyMaps: {},
|
|
7863
7875
|
rowMaps: {},
|
|
7864
|
-
// 滚动条
|
|
7865
7876
|
// resizeObserver: undefined,
|
|
7877
|
+
// 滚动条
|
|
7878
|
+
// scrollObserver: undefined,
|
|
7866
7879
|
// isThumbDrag: false,
|
|
7867
7880
|
thumbDragOffset: 0,
|
|
7868
7881
|
yThumbTop: 0,
|
|
@@ -7925,7 +7938,7 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7925
7938
|
scrollY: Object,
|
|
7926
7939
|
useScrollbar: {
|
|
7927
7940
|
type: Boolean,
|
|
7928
|
-
default: () => getConfig$4().list.useScrollbar
|
|
7941
|
+
default: () => getDefaultConfig(getConfig$4().list.useScrollbar, getConfig$4().useScrollbar)
|
|
7929
7942
|
},
|
|
7930
7943
|
scrollbarConfig: Object
|
|
7931
7944
|
},
|
|
@@ -8012,11 +8025,8 @@ var VxeListComponent = defineVxeComponent({
|
|
|
8012
8025
|
});
|
|
8013
8026
|
const computeWrapperStyles = computed(() => {
|
|
8014
8027
|
const rowHeight = computeRowHeight.value;
|
|
8015
|
-
const
|
|
8016
|
-
const
|
|
8017
|
-
const scrollbarYOpts = computeScrollbarYOpts.value;
|
|
8018
|
-
const barWidth = getDefaultConfig(getDefaultConfig(scrollbarYOpts.width, scrollbarOpts.width), getConfig$4().scrollbar.width);
|
|
8019
|
-
const barHeight = getDefaultConfig(getDefaultConfig(scrollbarXOpts.height, scrollbarOpts.height), getConfig$4().scrollbar.height);
|
|
8028
|
+
const barWidth = computeScrollYWidth.value;
|
|
8029
|
+
const barHeight = computeScrollXHeight.value;
|
|
8020
8030
|
const stys = {};
|
|
8021
8031
|
if (rowHeight) {
|
|
8022
8032
|
stys['--vxe-ui-list-row-height'] = toCssUnit(rowHeight);
|
|
@@ -8051,6 +8061,16 @@ var VxeListComponent = defineVxeComponent({
|
|
|
8051
8061
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
8052
8062
|
return Object.assign({}, getConfig$4().scrollbar.yConfig, scrollbarOpts.yConfig);
|
|
8053
8063
|
});
|
|
8064
|
+
const computeScrollXHeight = computed(() => {
|
|
8065
|
+
const scrollbarOpts = computeScrollbarOpts.value;
|
|
8066
|
+
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
8067
|
+
return getDefaultConfig(getDefaultConfig(scrollbarXOpts.height, scrollbarOpts.height), getConfig$4().scrollbar.height);
|
|
8068
|
+
});
|
|
8069
|
+
const computeScrollYWidth = computed(() => {
|
|
8070
|
+
const scrollbarOpts = computeScrollbarOpts.value;
|
|
8071
|
+
const scrollbarYOpts = computeScrollbarYOpts.value;
|
|
8072
|
+
return getDefaultConfig(getDefaultConfig(scrollbarYOpts.width, scrollbarOpts.width), getConfig$4().scrollbar.width);
|
|
8073
|
+
});
|
|
8054
8074
|
const computeScrollXVisible = computed(() => {
|
|
8055
8075
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
8056
8076
|
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
@@ -8072,15 +8092,11 @@ var VxeListComponent = defineVxeComponent({
|
|
|
8072
8092
|
return getDefaultConfig(getDefaultConfig(scrollbarYOpts.autoHide, scrollbarOpts.autoHide), getConfig$4().scrollbar.autoHide);
|
|
8073
8093
|
});
|
|
8074
8094
|
const computeScrollbarWrapperClss = computed(() => {
|
|
8075
|
-
const scrollbarOpts = computeScrollbarOpts.value;
|
|
8076
|
-
const { padding } = scrollbarOpts;
|
|
8077
8095
|
const { yThumbHeight, xThumbWidth } = reactData;
|
|
8078
8096
|
const scrollbarXToTop = computeScrollbarXToTop.value;
|
|
8079
8097
|
const scrollbarYToLeft = computeScrollbarYToLeft.value;
|
|
8080
8098
|
const scrollXVisible = computeScrollXVisible.value;
|
|
8081
8099
|
const scrollYVisible = computeScrollYVisible.value;
|
|
8082
|
-
const scrollXAutoHide = computeScrollXAutoHide.value;
|
|
8083
|
-
const scrollYAutoHide = computeScrollYAutoHide.value;
|
|
8084
8100
|
return domUtils$1.buildClass([
|
|
8085
8101
|
'vxe-scrollbar is--virtual',
|
|
8086
8102
|
`ov-x--${scrollXVisible === false ? 'hidden' : 'visible'}`,
|
|
@@ -8088,9 +8104,6 @@ var VxeListComponent = defineVxeComponent({
|
|
|
8088
8104
|
`sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}`,
|
|
8089
8105
|
`sy-pos--${scrollbarYToLeft ? 'left' : 'right'}`
|
|
8090
8106
|
], {
|
|
8091
|
-
'is--padding': padding,
|
|
8092
|
-
'ov-x--auto-hide': scrollXAutoHide,
|
|
8093
|
-
'ov-y--auto-hide': scrollYAutoHide,
|
|
8094
8107
|
'overflow-y': yThumbHeight,
|
|
8095
8108
|
'overflow-x': xThumbWidth
|
|
8096
8109
|
});
|
|
@@ -8116,6 +8129,10 @@ var VxeListComponent = defineVxeComponent({
|
|
|
8116
8129
|
const keyField = computeKeyField.value;
|
|
8117
8130
|
return getRowIdByField(row, keyField);
|
|
8118
8131
|
};
|
|
8132
|
+
const getParentElem = () => {
|
|
8133
|
+
const el = refElem.value;
|
|
8134
|
+
return el ? el.parentElement : null;
|
|
8135
|
+
};
|
|
8119
8136
|
const calcTableHeight = (key) => {
|
|
8120
8137
|
const { parentHeight } = reactData;
|
|
8121
8138
|
const val = props[key];
|
|
@@ -10162,6 +10179,12 @@ var VxeListComponent = defineVxeComponent({
|
|
|
10162
10179
|
watch(computeRowHeight, () => {
|
|
10163
10180
|
reFlag.value++;
|
|
10164
10181
|
});
|
|
10182
|
+
watch(computeScrollYWidth, () => {
|
|
10183
|
+
reFlag.value++;
|
|
10184
|
+
});
|
|
10185
|
+
watch(computeScrollXHeight, () => {
|
|
10186
|
+
reFlag.value++;
|
|
10187
|
+
});
|
|
10165
10188
|
watch(computeScrollXVisible, () => {
|
|
10166
10189
|
nextTick(() => {
|
|
10167
10190
|
reFlag.value++;
|
|
@@ -10221,20 +10244,32 @@ var VxeListComponent = defineVxeComponent({
|
|
|
10221
10244
|
if (useKey && !keyField) {
|
|
10222
10245
|
errLog$j('vxe.error.reqSupportProp', ['row-config.useKey', 'row-config.keyField']);
|
|
10223
10246
|
}
|
|
10224
|
-
|
|
10225
|
-
|
|
10247
|
+
const el = refElem.value;
|
|
10248
|
+
if (useScrollbar) {
|
|
10226
10249
|
const viewInnerEl = refVirtualBody.value;
|
|
10227
|
-
const
|
|
10250
|
+
const scrollObserver = globalResize$1.create(() => {
|
|
10228
10251
|
reFlag.value++;
|
|
10229
10252
|
});
|
|
10230
10253
|
if (el) {
|
|
10231
|
-
|
|
10232
|
-
if (autoResize) {
|
|
10233
|
-
resizeObserver.observe(el.parentElement);
|
|
10234
|
-
}
|
|
10254
|
+
scrollObserver.observe(el);
|
|
10235
10255
|
}
|
|
10236
10256
|
if (viewInnerEl) {
|
|
10237
|
-
|
|
10257
|
+
scrollObserver.observe(viewInnerEl);
|
|
10258
|
+
}
|
|
10259
|
+
internalData.scrollObserver = scrollObserver;
|
|
10260
|
+
}
|
|
10261
|
+
if (autoResize) {
|
|
10262
|
+
const parentEl = getParentElem();
|
|
10263
|
+
const resizeObserver = globalResize$1.create(() => {
|
|
10264
|
+
if (props.autoResize) {
|
|
10265
|
+
reFlag.value++;
|
|
10266
|
+
}
|
|
10267
|
+
});
|
|
10268
|
+
if (el) {
|
|
10269
|
+
resizeObserver.observe(el);
|
|
10270
|
+
}
|
|
10271
|
+
if (parentEl) {
|
|
10272
|
+
resizeObserver.observe(parentEl);
|
|
10238
10273
|
}
|
|
10239
10274
|
internalData.resizeObserver = resizeObserver;
|
|
10240
10275
|
}
|
|
@@ -10244,10 +10279,13 @@ var VxeListComponent = defineVxeComponent({
|
|
|
10244
10279
|
});
|
|
10245
10280
|
});
|
|
10246
10281
|
onBeforeUnmount(() => {
|
|
10247
|
-
const { resizeObserver } = internalData;
|
|
10282
|
+
const { scrollObserver, resizeObserver } = internalData;
|
|
10248
10283
|
if (resizeObserver) {
|
|
10249
10284
|
resizeObserver.disconnect();
|
|
10250
10285
|
}
|
|
10286
|
+
if (scrollObserver) {
|
|
10287
|
+
scrollObserver.disconnect();
|
|
10288
|
+
}
|
|
10251
10289
|
globalEvents$1.off($xeList, 'resize');
|
|
10252
10290
|
XEUtils.assign(reactData, createReactData$m());
|
|
10253
10291
|
XEUtils.assign(internalData, createInternalData$l());
|
|
@@ -25011,7 +25049,12 @@ var VxeDrawerComponent = defineVxeComponent({
|
|
|
25011
25049
|
default: () => getConfig$4().drawer.size || getConfig$4().size
|
|
25012
25050
|
},
|
|
25013
25051
|
beforeHideMethod: Function,
|
|
25014
|
-
slots: Object
|
|
25052
|
+
slots: Object,
|
|
25053
|
+
useScrollbar: {
|
|
25054
|
+
type: Boolean,
|
|
25055
|
+
default: () => getDefaultConfig(getConfig$4().drawer.useScrollbar, getConfig$4().useScrollbar)
|
|
25056
|
+
},
|
|
25057
|
+
scrollbarConfig: Object
|
|
25015
25058
|
},
|
|
25016
25059
|
emits: [
|
|
25017
25060
|
'update:modelValue',
|
|
@@ -25072,6 +25115,25 @@ var VxeDrawerComponent = defineVxeComponent({
|
|
|
25072
25115
|
}
|
|
25073
25116
|
return 'wl';
|
|
25074
25117
|
});
|
|
25118
|
+
const computeScrollbarOpts = computed(() => {
|
|
25119
|
+
return Object.assign({}, getConfig$4().modal.scrollbarConfig, props.scrollbarConfig);
|
|
25120
|
+
});
|
|
25121
|
+
const computeScrollbarProps = computed(() => {
|
|
25122
|
+
const scrollbarOpts = computeScrollbarOpts.value;
|
|
25123
|
+
const { viewClassName, viewInnerClassName } = scrollbarOpts;
|
|
25124
|
+
return {
|
|
25125
|
+
width: scrollbarOpts.width,
|
|
25126
|
+
height: scrollbarOpts.height,
|
|
25127
|
+
autoHide: scrollbarOpts.autoHide,
|
|
25128
|
+
visible: scrollbarOpts.visible,
|
|
25129
|
+
xConfig: scrollbarOpts.xConfig,
|
|
25130
|
+
yConfig: scrollbarOpts.yConfig,
|
|
25131
|
+
className: scrollbarOpts.className,
|
|
25132
|
+
viewAttrs: scrollbarOpts.viewAttrs,
|
|
25133
|
+
viewClassName: 'vxe-drawer--scrollbar-content-view' + (viewClassName ? (' ' + viewClassName) : ''),
|
|
25134
|
+
viewInnerClassName: 'vxe-drawer--scrollbar-content-inner' + (viewClassName ? (' ' + viewInnerClassName) : '')
|
|
25135
|
+
};
|
|
25136
|
+
});
|
|
25075
25137
|
const computeMaps = {};
|
|
25076
25138
|
const $xeDrawer = {
|
|
25077
25139
|
xID,
|
|
@@ -25372,10 +25434,40 @@ var VxeDrawerComponent = defineVxeComponent({
|
|
|
25372
25434
|
return renderEmptyElement$1($xeDrawer);
|
|
25373
25435
|
};
|
|
25374
25436
|
const renderBody = () => {
|
|
25375
|
-
const { slots: propSlots = {}, content, useHtml } = props;
|
|
25437
|
+
const { slots: propSlots = {}, content, useScrollbar, useHtml } = props;
|
|
25438
|
+
const scrollbarProps = computeScrollbarProps.value;
|
|
25376
25439
|
const defaultSlot = slots.default || propSlots.default;
|
|
25377
25440
|
const leftSlot = slots.left || propSlots.left;
|
|
25378
25441
|
const rightSlot = slots.right || propSlots.right;
|
|
25442
|
+
const contVNs = [];
|
|
25443
|
+
if (useHtml && !defaultSlot) {
|
|
25444
|
+
contVNs.push(useScrollbar
|
|
25445
|
+
? h(VxeScrollbar, Object.assign({ key: 'shc', class: 'vxe-drawer--scrollbar-content' }, scrollbarProps), {
|
|
25446
|
+
default() {
|
|
25447
|
+
return [
|
|
25448
|
+
h('div', {
|
|
25449
|
+
class: 'vxe-drawer--scrollbar-content-html',
|
|
25450
|
+
innerHTML: getFuncText(content)
|
|
25451
|
+
})
|
|
25452
|
+
];
|
|
25453
|
+
}
|
|
25454
|
+
})
|
|
25455
|
+
: h('div', {
|
|
25456
|
+
key: 'hc',
|
|
25457
|
+
class: 'vxe-drawer--content',
|
|
25458
|
+
innerHTML: getFuncText(content)
|
|
25459
|
+
}));
|
|
25460
|
+
}
|
|
25461
|
+
else {
|
|
25462
|
+
contVNs.push(useScrollbar
|
|
25463
|
+
? h(VxeScrollbar, Object.assign({ key: 'sdc', class: 'vxe-drawer--scrollbar-content' }, scrollbarProps), {
|
|
25464
|
+
default: () => defaultSlot ? getSlotVNs(defaultSlot({ $drawer: $xeDrawer })) : getFuncText(content)
|
|
25465
|
+
})
|
|
25466
|
+
: h('div', {
|
|
25467
|
+
key: 'dc',
|
|
25468
|
+
class: 'vxe-drawer--content'
|
|
25469
|
+
}, defaultSlot ? getSlotVNs(defaultSlot({ $drawer: $xeDrawer })) : getFuncText(content)));
|
|
25470
|
+
}
|
|
25379
25471
|
return h('div', {
|
|
25380
25472
|
class: 'vxe-drawer--body'
|
|
25381
25473
|
}, [
|
|
@@ -25386,18 +25478,7 @@ var VxeDrawerComponent = defineVxeComponent({
|
|
|
25386
25478
|
: renderEmptyElement$1($xeDrawer),
|
|
25387
25479
|
h('div', {
|
|
25388
25480
|
class: 'vxe-drawer--body-default'
|
|
25389
|
-
},
|
|
25390
|
-
useHtml && !defaultSlot
|
|
25391
|
-
? h('div', {
|
|
25392
|
-
key: 'hc',
|
|
25393
|
-
class: 'vxe-drawer--content',
|
|
25394
|
-
innerHTML: getFuncText(content)
|
|
25395
|
-
})
|
|
25396
|
-
: h('div', {
|
|
25397
|
-
key: 'dc',
|
|
25398
|
-
class: 'vxe-drawer--content'
|
|
25399
|
-
}, defaultSlot ? getSlotVNs(defaultSlot({ $drawer: $xeDrawer })) : getFuncText(content))
|
|
25400
|
-
]),
|
|
25481
|
+
}, contVNs),
|
|
25401
25482
|
rightSlot
|
|
25402
25483
|
? h('div', {
|
|
25403
25484
|
class: 'vxe-drawer--body-right'
|
|
@@ -29897,7 +29978,7 @@ var VxeLayoutAsideComponent = defineVxeComponent({
|
|
|
29897
29978
|
collapseConfig: Object,
|
|
29898
29979
|
useScrollbar: {
|
|
29899
29980
|
type: Boolean,
|
|
29900
|
-
default: () => getConfig$4().layoutAside.useScrollbar
|
|
29981
|
+
default: () => getDefaultConfig(getConfig$4().layoutAside.useScrollbar, getConfig$4().useScrollbar)
|
|
29901
29982
|
},
|
|
29902
29983
|
scrollbarConfig: Object,
|
|
29903
29984
|
size: {
|
|
@@ -30036,7 +30117,7 @@ var VxeLayoutBodyComponent = defineVxeComponent({
|
|
|
30036
30117
|
backtopConfig: Object,
|
|
30037
30118
|
useScrollbar: {
|
|
30038
30119
|
type: Boolean,
|
|
30039
|
-
default: () => getConfig$4().layoutBody.useScrollbar
|
|
30120
|
+
default: () => getDefaultConfig(getConfig$4().layoutBody.useScrollbar, getConfig$4().useScrollbar)
|
|
30040
30121
|
},
|
|
30041
30122
|
scrollbarConfig: Object,
|
|
30042
30123
|
size: {
|
|
@@ -30550,7 +30631,7 @@ var VxeMenuComponent = defineVxeComponent({
|
|
|
30550
30631
|
menuConfig: Object,
|
|
30551
30632
|
useScrollbar: {
|
|
30552
30633
|
type: Boolean,
|
|
30553
|
-
default: () => getConfig$1().menu.useScrollbar
|
|
30634
|
+
default: () => getDefaultConfig(getConfig$1().menu.useScrollbar, getConfig$1().useScrollbar)
|
|
30554
30635
|
},
|
|
30555
30636
|
scrollbarConfig: Object,
|
|
30556
30637
|
appendTo: {
|
|
@@ -31452,6 +31533,11 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
31452
31533
|
},
|
|
31453
31534
|
beforeHideMethod: Function,
|
|
31454
31535
|
slots: Object,
|
|
31536
|
+
useScrollbar: {
|
|
31537
|
+
type: Boolean,
|
|
31538
|
+
default: () => getDefaultConfig(getConfig$4().modal.useScrollbar, getConfig$4().useScrollbar)
|
|
31539
|
+
},
|
|
31540
|
+
scrollbarConfig: Object,
|
|
31455
31541
|
/**
|
|
31456
31542
|
* 已废弃
|
|
31457
31543
|
* @deprecated
|
|
@@ -31525,6 +31611,25 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
31525
31611
|
const computeZoomOpts = computed(() => {
|
|
31526
31612
|
return Object.assign({}, getConfig$4().modal.zoomConfig, props.zoomConfig);
|
|
31527
31613
|
});
|
|
31614
|
+
const computeScrollbarOpts = computed(() => {
|
|
31615
|
+
return Object.assign({}, getConfig$4().modal.scrollbarConfig, props.scrollbarConfig);
|
|
31616
|
+
});
|
|
31617
|
+
const computeScrollbarProps = computed(() => {
|
|
31618
|
+
const scrollbarOpts = computeScrollbarOpts.value;
|
|
31619
|
+
const { viewClassName, viewInnerClassName } = scrollbarOpts;
|
|
31620
|
+
return {
|
|
31621
|
+
width: scrollbarOpts.width,
|
|
31622
|
+
height: scrollbarOpts.height,
|
|
31623
|
+
autoHide: scrollbarOpts.autoHide,
|
|
31624
|
+
visible: scrollbarOpts.visible,
|
|
31625
|
+
xConfig: scrollbarOpts.xConfig,
|
|
31626
|
+
yConfig: scrollbarOpts.yConfig,
|
|
31627
|
+
className: scrollbarOpts.className,
|
|
31628
|
+
viewAttrs: scrollbarOpts.viewAttrs,
|
|
31629
|
+
viewClassName: 'vxe-modal--scrollbar-content-view' + (viewClassName ? (' ' + viewClassName) : ''),
|
|
31630
|
+
viewInnerClassName: 'vxe-modal--scrollbar-content-inner' + (viewClassName ? (' ' + viewInnerClassName) : '')
|
|
31631
|
+
};
|
|
31632
|
+
});
|
|
31528
31633
|
const computeMaps = {
|
|
31529
31634
|
computeSize,
|
|
31530
31635
|
computeZoomOpts
|
|
@@ -32543,9 +32648,10 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
32543
32648
|
return renderEmptyElement$1($xeModal);
|
|
32544
32649
|
};
|
|
32545
32650
|
const renderBody = () => {
|
|
32546
|
-
const { slots: propSlots = {}, status, message, iconStatus, useHtml } = props;
|
|
32651
|
+
const { slots: propSlots = {}, status, message, iconStatus, useScrollbar, useHtml } = props;
|
|
32547
32652
|
const content = props.content || message;
|
|
32548
32653
|
const isMsg = computeIsMsg.value;
|
|
32654
|
+
const scrollbarProps = computeScrollbarProps.value;
|
|
32549
32655
|
const defaultSlot = slots.default || propSlots.default;
|
|
32550
32656
|
const leftSlot = slots.left || propSlots.left;
|
|
32551
32657
|
const rightSlot = slots.right || propSlots.right;
|
|
@@ -32559,16 +32665,34 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
32559
32665
|
})
|
|
32560
32666
|
]));
|
|
32561
32667
|
}
|
|
32562
|
-
|
|
32563
|
-
|
|
32564
|
-
key: '
|
|
32565
|
-
|
|
32566
|
-
|
|
32567
|
-
|
|
32568
|
-
|
|
32569
|
-
|
|
32570
|
-
|
|
32571
|
-
|
|
32668
|
+
if (useHtml && !defaultSlot) {
|
|
32669
|
+
contVNs.push(useScrollbar
|
|
32670
|
+
? h(VxeScrollbar, Object.assign({ key: 'shc', class: 'vxe-modal--scrollbar-content' }, scrollbarProps), {
|
|
32671
|
+
default() {
|
|
32672
|
+
return [
|
|
32673
|
+
h('div', {
|
|
32674
|
+
class: 'vxe-modal--scrollbar-content-html',
|
|
32675
|
+
innerHTML: getFuncText(content)
|
|
32676
|
+
})
|
|
32677
|
+
];
|
|
32678
|
+
}
|
|
32679
|
+
})
|
|
32680
|
+
: h('div', {
|
|
32681
|
+
key: 'hc',
|
|
32682
|
+
class: 'vxe-modal--content',
|
|
32683
|
+
innerHTML: getFuncText(content)
|
|
32684
|
+
}));
|
|
32685
|
+
}
|
|
32686
|
+
else {
|
|
32687
|
+
contVNs.push(useScrollbar
|
|
32688
|
+
? h(VxeScrollbar, Object.assign({ key: 'sdc', class: 'vxe-modal--scrollbar-content' }, scrollbarProps), {
|
|
32689
|
+
default: () => defaultSlot ? getSlotVNs(defaultSlot({ $modal: $xeModal })) : getFuncText(content)
|
|
32690
|
+
})
|
|
32691
|
+
: h('div', {
|
|
32692
|
+
key: 'dc',
|
|
32693
|
+
class: 'vxe-modal--content'
|
|
32694
|
+
}, defaultSlot ? getSlotVNs(defaultSlot({ $modal: $xeModal })) : getFuncText(content)));
|
|
32695
|
+
}
|
|
32572
32696
|
return h('div', {
|
|
32573
32697
|
class: 'vxe-modal--body'
|
|
32574
32698
|
}, [
|
|
@@ -41390,7 +41514,7 @@ var VxeTabsComponent = defineVxeComponent({
|
|
|
41390
41514
|
},
|
|
41391
41515
|
useScrollbar: {
|
|
41392
41516
|
type: Boolean,
|
|
41393
|
-
default: () => getConfig$4().tabs.useScrollbar
|
|
41517
|
+
default: () => getDefaultConfig(getConfig$4().tabs.useScrollbar, getConfig$4().useScrollbar)
|
|
41394
41518
|
},
|
|
41395
41519
|
scrollbarConfig: Object,
|
|
41396
41520
|
// 已废弃
|
|
@@ -43623,8 +43747,9 @@ function createInternalData$2() {
|
|
|
43623
43747
|
indeterminateNodeMaps: {},
|
|
43624
43748
|
treeExpandedMaps: {},
|
|
43625
43749
|
treeExpandLazyLoadedMaps: {},
|
|
43626
|
-
// 滚动条
|
|
43627
43750
|
// resizeObserver: undefined,
|
|
43751
|
+
// 滚动条
|
|
43752
|
+
// scrollObserver: undefined,
|
|
43628
43753
|
// isThumbDrag: false,
|
|
43629
43754
|
thumbDragOffset: 0,
|
|
43630
43755
|
yThumbTop: 0,
|
|
@@ -43780,7 +43905,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
43780
43905
|
virtualYConfig: Object,
|
|
43781
43906
|
useScrollbar: {
|
|
43782
43907
|
type: Boolean,
|
|
43783
|
-
default: () => getConfig().tree.useScrollbar
|
|
43908
|
+
default: () => getDefaultConfig(getConfig().tree.useScrollbar, getConfig().useScrollbar)
|
|
43784
43909
|
},
|
|
43785
43910
|
scrollbarConfig: Object
|
|
43786
43911
|
},
|
|
@@ -43890,11 +44015,8 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
43890
44015
|
return Object.assign({}, getConfig().tree.menuConfig, props.menuConfig);
|
|
43891
44016
|
});
|
|
43892
44017
|
const computeWrapperStyles = computed(() => {
|
|
43893
|
-
const
|
|
43894
|
-
const
|
|
43895
|
-
const scrollbarYOpts = computeScrollbarYOpts.value;
|
|
43896
|
-
const barWidth = getDefaultConfig(getDefaultConfig(scrollbarYOpts.width, scrollbarOpts.width), getConfig().scrollbar.width);
|
|
43897
|
-
const barHeight = getDefaultConfig(getDefaultConfig(scrollbarXOpts.height, scrollbarOpts.height), getConfig().scrollbar.height);
|
|
44018
|
+
const barWidth = computeScrollYWidth.value;
|
|
44019
|
+
const barHeight = computeScrollXHeight.value;
|
|
43898
44020
|
const stys = {};
|
|
43899
44021
|
if (barWidth || barHeight) {
|
|
43900
44022
|
stys['--vxe-ui-scrollbar-y-width'] = toCssUnit(barWidth || barHeight);
|
|
@@ -43947,6 +44069,16 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
43947
44069
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
43948
44070
|
return Object.assign({}, getConfig().scrollbar.yConfig, scrollbarOpts.yConfig);
|
|
43949
44071
|
});
|
|
44072
|
+
const computeScrollXHeight = computed(() => {
|
|
44073
|
+
const scrollbarOpts = computeScrollbarOpts.value;
|
|
44074
|
+
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
44075
|
+
return getDefaultConfig(getDefaultConfig(scrollbarXOpts.height, scrollbarOpts.height), getConfig().scrollbar.height);
|
|
44076
|
+
});
|
|
44077
|
+
const computeScrollYWidth = computed(() => {
|
|
44078
|
+
const scrollbarOpts = computeScrollbarOpts.value;
|
|
44079
|
+
const scrollbarYOpts = computeScrollbarYOpts.value;
|
|
44080
|
+
return getDefaultConfig(getDefaultConfig(scrollbarYOpts.width, scrollbarOpts.width), getConfig().scrollbar.width);
|
|
44081
|
+
});
|
|
43950
44082
|
const computeScrollXVisible = computed(() => {
|
|
43951
44083
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
43952
44084
|
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
@@ -43968,15 +44100,11 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
43968
44100
|
return getDefaultConfig(getDefaultConfig(scrollbarYOpts.autoHide, scrollbarOpts.autoHide), getConfig().scrollbar.autoHide);
|
|
43969
44101
|
});
|
|
43970
44102
|
const computeScrollbarWrapperClss = computed(() => {
|
|
43971
|
-
const scrollbarOpts = computeScrollbarOpts.value;
|
|
43972
|
-
const { padding } = scrollbarOpts;
|
|
43973
44103
|
const { yThumbHeight, xThumbWidth } = reactData;
|
|
43974
44104
|
const scrollbarXToTop = computeScrollbarXToTop.value;
|
|
43975
44105
|
const scrollbarYToLeft = computeScrollbarYToLeft.value;
|
|
43976
44106
|
const scrollXVisible = computeScrollXVisible.value;
|
|
43977
44107
|
const scrollYVisible = computeScrollYVisible.value;
|
|
43978
|
-
const scrollXAutoHide = computeScrollXAutoHide.value;
|
|
43979
|
-
const scrollYAutoHide = computeScrollYAutoHide.value;
|
|
43980
44108
|
return domUtils$1.buildClass([
|
|
43981
44109
|
'vxe-scrollbar is--virtual',
|
|
43982
44110
|
`ov-x--${scrollXVisible === false ? 'hidden' : 'visible'}`,
|
|
@@ -43984,9 +44112,6 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
43984
44112
|
`sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}`,
|
|
43985
44113
|
`sy-pos--${scrollbarYToLeft ? 'left' : 'right'}`
|
|
43986
44114
|
], {
|
|
43987
|
-
'is--padding': padding,
|
|
43988
|
-
'ov-x--auto-hide': scrollXAutoHide,
|
|
43989
|
-
'ov-y--auto-hide': scrollYAutoHide,
|
|
43990
44115
|
'overflow-y': yThumbHeight,
|
|
43991
44116
|
'overflow-x': xThumbWidth
|
|
43992
44117
|
});
|
|
@@ -47238,6 +47363,12 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
47238
47363
|
watch(() => props.useScrollbar, () => {
|
|
47239
47364
|
reFlag.value++;
|
|
47240
47365
|
});
|
|
47366
|
+
watch(computeScrollYWidth, () => {
|
|
47367
|
+
reFlag.value++;
|
|
47368
|
+
});
|
|
47369
|
+
watch(computeScrollXHeight, () => {
|
|
47370
|
+
reFlag.value++;
|
|
47371
|
+
});
|
|
47241
47372
|
watch(computeScrollXVisible, () => {
|
|
47242
47373
|
nextTick(() => {
|
|
47243
47374
|
reFlag.value++;
|
|
@@ -47275,23 +47406,32 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
47275
47406
|
if (menuConfig && !VxeUIContextMenu) {
|
|
47276
47407
|
errLog$2('vxe.error.reqComp', ['vxe-context-menu']);
|
|
47277
47408
|
}
|
|
47409
|
+
const el = refElem.value;
|
|
47278
47410
|
if (useScrollbar || autoResize) {
|
|
47279
|
-
const el = refElem.value;
|
|
47280
47411
|
const viewInnerEl = refVirtualBody.value;
|
|
47412
|
+
const scrollObserver = globalResize$1.create(() => {
|
|
47413
|
+
updateScrollbar();
|
|
47414
|
+
});
|
|
47415
|
+
if (el) {
|
|
47416
|
+
scrollObserver.observe(el);
|
|
47417
|
+
}
|
|
47418
|
+
if (viewInnerEl) {
|
|
47419
|
+
scrollObserver.observe(viewInnerEl);
|
|
47420
|
+
}
|
|
47421
|
+
internalData.scrollObserver = scrollObserver;
|
|
47422
|
+
}
|
|
47423
|
+
if (autoResize) {
|
|
47281
47424
|
const parentEl = getParentElem();
|
|
47282
47425
|
const resizeObserver = globalResize$1.create(() => {
|
|
47283
|
-
|
|
47426
|
+
if (props.autoResize) {
|
|
47427
|
+
reFlag.value++;
|
|
47428
|
+
}
|
|
47284
47429
|
});
|
|
47285
47430
|
if (el) {
|
|
47286
47431
|
resizeObserver.observe(el);
|
|
47287
|
-
if (autoResize) {
|
|
47288
|
-
if (parentEl) {
|
|
47289
|
-
resizeObserver.observe(parentEl);
|
|
47290
|
-
}
|
|
47291
|
-
}
|
|
47292
47432
|
}
|
|
47293
|
-
if (
|
|
47294
|
-
resizeObserver.observe(
|
|
47433
|
+
if (parentEl) {
|
|
47434
|
+
resizeObserver.observe(parentEl);
|
|
47295
47435
|
}
|
|
47296
47436
|
internalData.resizeObserver = resizeObserver;
|
|
47297
47437
|
}
|
|
@@ -47301,10 +47441,13 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
47301
47441
|
});
|
|
47302
47442
|
});
|
|
47303
47443
|
onBeforeUnmount(() => {
|
|
47304
|
-
const { resizeObserver } = internalData;
|
|
47444
|
+
const { scrollObserver, resizeObserver } = internalData;
|
|
47305
47445
|
if (resizeObserver) {
|
|
47306
47446
|
resizeObserver.disconnect();
|
|
47307
47447
|
}
|
|
47448
|
+
if (scrollObserver) {
|
|
47449
|
+
scrollObserver.disconnect();
|
|
47450
|
+
}
|
|
47308
47451
|
globalEvents$1.off($xeTree, 'resize');
|
|
47309
47452
|
XEUtils.assign(reactData, createReactData$2());
|
|
47310
47453
|
XEUtils.assign(internalData, createInternalData$2());
|