vxe-table 4.11.19 → 4.11.20
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/grid/src/grid.js +41 -33
- package/es/style.css +1 -1
- package/es/table/module/keyboard/hook.js +30 -1
- package/es/table/src/table.js +6 -2
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +39 -38
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +84 -44
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/keyboard/hook.js +31 -1
- package/lib/table/module/keyboard/hook.min.js +1 -1
- package/lib/table/src/table.js +9 -2
- package/lib/table/src/table.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/grid/src/grid.ts +45 -39
- package/packages/table/module/keyboard/hook.ts +29 -2
- package/packages/table/src/table.ts +8 -3
- /package/es/{iconfont.1741333398347.ttf → iconfont.1741665718304.ttf} +0 -0
- /package/es/{iconfont.1741333398347.woff → iconfont.1741665718304.woff} +0 -0
- /package/es/{iconfont.1741333398347.woff2 → iconfont.1741665718304.woff2} +0 -0
- /package/lib/{iconfont.1741333398347.ttf → iconfont.1741665718304.ttf} +0 -0
- /package/lib/{iconfont.1741333398347.woff → iconfont.1741665718304.woff} +0 -0
- /package/lib/{iconfont.1741333398347.woff2 → iconfont.1741665718304.woff2} +0 -0
package/es/grid/src/grid.js
CHANGED
|
@@ -417,6 +417,25 @@ export default defineComponent({
|
|
|
417
417
|
}
|
|
418
418
|
return null;
|
|
419
419
|
};
|
|
420
|
+
const getConfigSlot = (slotConfigs) => {
|
|
421
|
+
const slotConf = {};
|
|
422
|
+
XEUtils.objectMap(slotConfigs, (slotFunc, slotKey) => {
|
|
423
|
+
if (slotFunc) {
|
|
424
|
+
if (XEUtils.isString(slotFunc)) {
|
|
425
|
+
if (slots[slotFunc]) {
|
|
426
|
+
slotConf[slotKey] = slots[slotFunc];
|
|
427
|
+
}
|
|
428
|
+
else {
|
|
429
|
+
errLog('vxe.error.notSlot', [slotFunc]);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
else {
|
|
433
|
+
slotConf[slotKey] = slotFunc;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
return slotConf;
|
|
438
|
+
};
|
|
420
439
|
/**
|
|
421
440
|
* 渲染表单
|
|
422
441
|
*/
|
|
@@ -593,37 +612,21 @@ export default defineComponent({
|
|
|
593
612
|
const { proxyConfig, pagerConfig } = props;
|
|
594
613
|
const proxyOpts = computeProxyOpts.value;
|
|
595
614
|
const pagerOpts = computePagerOpts.value;
|
|
615
|
+
const pagerSlot = slots.pager;
|
|
596
616
|
if ((pagerConfig && isEnableConf(pagerOpts)) || slots.pager) {
|
|
597
|
-
let slotVNs = [];
|
|
598
|
-
if (slots.pager) {
|
|
599
|
-
slotVNs = slots.pager({ $grid: $xeGrid });
|
|
600
|
-
}
|
|
601
|
-
else {
|
|
602
|
-
const pagerOptSlots = pagerOpts.slots;
|
|
603
|
-
const pagerSlots = {};
|
|
604
|
-
let leftSlot;
|
|
605
|
-
let rightSlot;
|
|
606
|
-
if (pagerOptSlots) {
|
|
607
|
-
leftSlot = getFuncSlot(pagerOptSlots, 'left');
|
|
608
|
-
rightSlot = getFuncSlot(pagerOptSlots, 'right');
|
|
609
|
-
if (leftSlot) {
|
|
610
|
-
pagerSlots.left = leftSlot;
|
|
611
|
-
}
|
|
612
|
-
if (rightSlot) {
|
|
613
|
-
pagerSlots.right = rightSlot;
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
if (VxeUIPagerComponent) {
|
|
617
|
-
slotVNs.push(h(VxeUIPagerComponent, Object.assign(Object.assign(Object.assign({ ref: refPager }, pagerOpts), (proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {})), { onPageChange: pageChangeEvent }), pagerSlots));
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
617
|
return h('div', {
|
|
621
618
|
ref: refPagerWrapper,
|
|
622
619
|
key: 'pager',
|
|
623
620
|
class: 'vxe-grid--pager-wrapper'
|
|
624
|
-
},
|
|
621
|
+
}, pagerSlot
|
|
622
|
+
? pagerSlot({ $grid: $xeGrid })
|
|
623
|
+
: [
|
|
624
|
+
VxeUIPagerComponent
|
|
625
|
+
? h(VxeUIPagerComponent, Object.assign(Object.assign(Object.assign({ ref: refPager }, pagerOpts), (proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {})), { onPageChange: pageChangeEvent }), getConfigSlot(pagerOpts.slots))
|
|
626
|
+
: renderEmptyElement($xeGrid)
|
|
627
|
+
]);
|
|
625
628
|
}
|
|
626
|
-
return
|
|
629
|
+
return renderEmptyElement($xeGrid);
|
|
627
630
|
};
|
|
628
631
|
const renderChildLayout = (layoutKeys) => {
|
|
629
632
|
const childVNs = [];
|
|
@@ -1177,18 +1180,23 @@ export default defineComponent({
|
|
|
1177
1180
|
getExcludeHeight() {
|
|
1178
1181
|
const { isZMax } = reactData;
|
|
1179
1182
|
const el = refElem.value;
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1183
|
+
if (el) {
|
|
1184
|
+
const formWrapper = refFormWrapper.value;
|
|
1185
|
+
const toolbarWrapper = refToolbarWrapper.value;
|
|
1186
|
+
const topWrapper = refTopWrapper.value;
|
|
1187
|
+
const bottomWrapper = refBottomWrapper.value;
|
|
1188
|
+
const pagerWrapper = refPagerWrapper.value;
|
|
1189
|
+
const parentEl = el.parentElement;
|
|
1190
|
+
const parentPaddingSize = isZMax ? 0 : (parentEl ? getPaddingTopBottomSize(parentEl) : 0);
|
|
1191
|
+
return parentPaddingSize + getPaddingTopBottomSize(el) + getOffsetHeight(formWrapper) + getOffsetHeight(toolbarWrapper) + getOffsetHeight(topWrapper) + getOffsetHeight(bottomWrapper) + getOffsetHeight(pagerWrapper);
|
|
1192
|
+
}
|
|
1193
|
+
return 0;
|
|
1187
1194
|
},
|
|
1188
1195
|
getParentHeight() {
|
|
1189
1196
|
const el = refElem.value;
|
|
1190
1197
|
if (el) {
|
|
1191
|
-
|
|
1198
|
+
const parentEl = el.parentElement;
|
|
1199
|
+
return (reactData.isZMax ? getDomNode().visibleHeight : (parentEl ? XEUtils.toNumber(getComputedStyle(parentEl).height) : 0)) - gridPrivateMethods.getExcludeHeight();
|
|
1192
1200
|
}
|
|
1193
1201
|
return 0;
|
|
1194
1202
|
},
|