vxe-table 4.22.4 → 4.23.0-beta.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 +211 -126
- package/dist/style.css +1 -1
- package/es/grid/src/grid.js +14 -2
- package/es/locale/lang/fr-FR.js +29 -29
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +4 -3
- package/es/table/module/edit/hook.js +5 -4
- package/es/table/module/export/hook.js +6 -4
- package/es/table/module/filter/hook.js +2 -2
- package/es/table/module/keyboard/hook.js +4 -3
- package/es/table/module/menu/hook.js +3 -3
- package/es/table/render/index.js +7 -4
- package/es/table/src/body.js +4 -4
- package/es/table/src/header.js +4 -3
- package/es/table/src/props.js +4 -0
- package/es/table/src/table.js +140 -90
- package/es/table/src/util.js +7 -3
- package/es/ui/index.js +9 -11
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.js +9 -0
- package/lib/grid/src/grid.js +13 -1
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +136 -84
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/fr-FR.js +29 -29
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +29 -29
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +3 -1
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +4 -3
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/hook.js +9 -3
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/module/filter/hook.js +1 -1
- package/lib/table/module/filter/hook.min.js +1 -1
- package/lib/table/module/keyboard/hook.js +4 -3
- package/lib/table/module/keyboard/hook.min.js +1 -1
- package/lib/table/module/menu/hook.js +2 -2
- package/lib/table/module/menu/hook.min.js +1 -1
- package/lib/table/render/index.js +11 -5
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +3 -3
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/header.js +3 -2
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/props.js +4 -0
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +48 -46
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +12 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/ui/index.js +9 -11
- 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 +10 -0
- package/lib/ui/src/utils.min.js +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +14 -2
- package/packages/locale/lang/fr-FR.ts +903 -903
- package/packages/table/module/custom/panel.ts +4 -3
- package/packages/table/module/edit/hook.ts +5 -4
- package/packages/table/module/export/hook.ts +6 -4
- package/packages/table/module/filter/hook.ts +2 -2
- package/packages/table/module/keyboard/hook.ts +4 -3
- package/packages/table/module/menu/hook.ts +3 -3
- package/packages/table/render/index.ts +7 -4
- package/packages/table/src/body.ts +4 -4
- package/packages/table/src/header.ts +4 -3
- package/packages/table/src/props.ts +4 -0
- package/packages/table/src/table.ts +141 -88
- package/packages/table/src/util.ts +7 -3
- package/packages/ui/index.ts +8 -10
- package/packages/ui/src/utils.ts +10 -0
- /package/es/{iconfont.1791617063720.ttf → iconfont.1791954193706.ttf} +0 -0
- /package/es/{iconfont.1791617063720.woff → iconfont.1791954193706.woff} +0 -0
- /package/es/{iconfont.1791617063720.woff2 → iconfont.1791954193706.woff2} +0 -0
- /package/lib/{iconfont.1791617063720.ttf → iconfont.1791954193706.ttf} +0 -0
- /package/lib/{iconfont.1791617063720.woff → iconfont.1791954193706.woff} +0 -0
- /package/lib/{iconfont.1791617063720.woff2 → iconfont.1791954193706.woff2} +0 -0
package/es/table/src/table.js
CHANGED
|
@@ -2,7 +2,7 @@ import { h, reactive, ref, provide, inject, nextTick, Teleport, onActivated, onD
|
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp';
|
|
3
3
|
import XEUtils from 'xe-utils';
|
|
4
4
|
import { initTpImg, getTpImg, isPx, isScale, hasClass, addClass, removeClass, wheelScrollTopTo, wheelScrollLeftTo, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey, checkTargetElement, hasAxternalInputTarget } from '../../ui/src/dom';
|
|
5
|
-
import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils';
|
|
5
|
+
import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue, hasEnableConf, getDefaultConfig } from '../../ui/src/utils';
|
|
6
6
|
import { VxeUI } from '../../ui';
|
|
7
7
|
import { createReactData, createInternalData, getRowUniqueId, createRowId, clearTableAllStatus, getColumnList, toFilters, hasDeepKey, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, getColReMaxWidth, createHandleUpdateRowId, createHandleGetRowId, getCalcHeight, getCellRestHeight, getLastChildColumn, getRowMaxHeight, handleCustomStoreConfig, encodeRowid } from './util';
|
|
8
8
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
@@ -44,6 +44,7 @@ export default defineVxeComponent({
|
|
|
44
44
|
const { slots, emit } = context;
|
|
45
45
|
const xID = XEUtils.uniqueId();
|
|
46
46
|
const browseObj = XEUtils.browse();
|
|
47
|
+
const scrollDefaultConf = Object.assign({}, getConfig().scrollbar);
|
|
47
48
|
// 使用已安装的组件,如果未安装则不渲染
|
|
48
49
|
const VxeUILoadingComponent = VxeUI.getComponent('VxeLoading');
|
|
49
50
|
const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip');
|
|
@@ -186,14 +187,12 @@ export default defineVxeComponent({
|
|
|
186
187
|
return Object.assign({}, getConfig().table.scrollbarConfig, props.scrollbarConfig);
|
|
187
188
|
});
|
|
188
189
|
const computeScrollbarXOpts = computed(() => {
|
|
189
|
-
var _a;
|
|
190
190
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
191
|
-
return Object.assign({}, scrollbarOpts.x,
|
|
191
|
+
return scrollbarOpts.x ? Object.assign({}, scrollbarOpts.x, scrollbarOpts.xConfig) : (scrollbarOpts.xConfig || {});
|
|
192
192
|
});
|
|
193
193
|
const computeScrollbarYOpts = computed(() => {
|
|
194
|
-
var _a;
|
|
195
194
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
196
|
-
return Object.assign({}, scrollbarOpts.y,
|
|
195
|
+
return scrollbarOpts.y ? Object.assign({}, scrollbarOpts.y, scrollbarOpts.yConfig) : (scrollbarOpts.yConfig || {});
|
|
197
196
|
});
|
|
198
197
|
const computeScrollbarXToTop = computed(() => {
|
|
199
198
|
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
@@ -540,15 +539,18 @@ export default defineVxeComponent({
|
|
|
540
539
|
});
|
|
541
540
|
const computeTableStyle = computed(() => {
|
|
542
541
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
543
|
-
const
|
|
544
|
-
const
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
}
|
|
548
|
-
if (
|
|
549
|
-
|
|
542
|
+
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
543
|
+
const scrollbarYOpts = computeScrollbarYOpts.value;
|
|
544
|
+
const barWidth = getDefaultConfig(getDefaultConfig(scrollbarYOpts.width, scrollbarOpts.width), scrollDefaultConf.width);
|
|
545
|
+
const barHeight = getDefaultConfig(getDefaultConfig(scrollbarXOpts.height, scrollbarOpts.height), scrollDefaultConf.height);
|
|
546
|
+
const stys = {};
|
|
547
|
+
if (barWidth || barHeight) {
|
|
548
|
+
stys['--vxe-ui-table-view-scrollbar-width'] = toCssUnit(barWidth || barHeight);
|
|
549
|
+
stys['--vxe-ui-scrollbar-y-width'] = toCssUnit(barWidth || barHeight);
|
|
550
|
+
stys['--vxe-ui-table-view-scrollbar-height'] = toCssUnit(barHeight || barWidth);
|
|
551
|
+
stys['--vxe-ui-scrollbar-x-height'] = toCssUnit(barHeight || barWidth);
|
|
550
552
|
}
|
|
551
|
-
return
|
|
553
|
+
return stys;
|
|
552
554
|
});
|
|
553
555
|
const computeTableRowExpandedList = computed(() => {
|
|
554
556
|
const { tableData, rowExpandedFlag, expandColumn, rowGroupExpandedFlag, treeExpandedFlag } = reactData;
|
|
@@ -2461,7 +2463,6 @@ export default defineVxeComponent({
|
|
|
2461
2463
|
const isHeaderRenderOptimize = computeIsHeaderRenderOptimize.value;
|
|
2462
2464
|
const isBodyRenderOptimize = computeIsBodyRenderOptimize.value;
|
|
2463
2465
|
const isFooterRenderOptimize = computeIsFooterRenderOptimize.value;
|
|
2464
|
-
const scrollbarOpts = computeScrollbarOpts.value;
|
|
2465
2466
|
const mouseOpts = computeMouseOpts.value;
|
|
2466
2467
|
const bodyWrapperElem = getRefElem(elemStore['main-body-wrapper']);
|
|
2467
2468
|
const bodyTableElem = getRefElem(elemStore['main-body-table']);
|
|
@@ -2469,24 +2470,26 @@ export default defineVxeComponent({
|
|
|
2469
2470
|
emptyPlaceholderElem.style.top = `${tHeaderHeight}px`;
|
|
2470
2471
|
emptyPlaceholderElem.style.height = bodyWrapperElem ? `${bodyWrapperElem.offsetHeight - osbHeight}px` : '';
|
|
2471
2472
|
}
|
|
2472
|
-
const
|
|
2473
|
-
const
|
|
2473
|
+
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
2474
|
+
const scrollbarYOpts = computeScrollbarYOpts.value;
|
|
2474
2475
|
const scrollbarYToLeft = computeScrollbarYToLeft.value;
|
|
2475
2476
|
let xScrollbarVisible = overflowX ? 'visible' : 'hidden';
|
|
2476
|
-
|
|
2477
|
+
const hideXScroll = scrollbarXOpts.visible === false || scrollbarXOpts.visible === 'hidden';
|
|
2478
|
+
if (!hideXScroll || $xeGanttView) {
|
|
2477
2479
|
osbHeight = scrollbarHeight;
|
|
2478
2480
|
xScrollbarVisible = 'visible';
|
|
2479
2481
|
}
|
|
2480
|
-
else if (
|
|
2482
|
+
else if (hideXScroll) {
|
|
2481
2483
|
osbHeight = 0;
|
|
2482
2484
|
xScrollbarVisible = 'hidden';
|
|
2483
2485
|
}
|
|
2484
2486
|
let yScrollbarVisible = overflowY ? 'visible' : 'hidden';
|
|
2485
|
-
|
|
2487
|
+
const showYScroll = !(scrollbarYOpts.visible === false || scrollbarYOpts.visible === 'hidden');
|
|
2488
|
+
if (!showYScroll || (($xeGantt && $xeGanttView && $xeGantt.reactData.showRightView) && !scrollbarYToLeft)) {
|
|
2486
2489
|
osbWidth = 0;
|
|
2487
2490
|
yScrollbarVisible = 'hidden';
|
|
2488
2491
|
}
|
|
2489
|
-
else if (
|
|
2492
|
+
else if (showYScroll) {
|
|
2490
2493
|
osbWidth = scrollbarWidth;
|
|
2491
2494
|
yScrollbarVisible = 'visible';
|
|
2492
2495
|
}
|
|
@@ -2720,7 +2723,7 @@ export default defineVxeComponent({
|
|
|
2720
2723
|
if (currentRow) {
|
|
2721
2724
|
$xeTable.setCurrentRow(currentRow);
|
|
2722
2725
|
}
|
|
2723
|
-
if (mouseConfig && mouseOpts.selected && editStore.selected.row && editStore.selected.column) {
|
|
2726
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected && editStore.selected.row && editStore.selected.column) {
|
|
2724
2727
|
$xeTable.addCellSelectedClass();
|
|
2725
2728
|
}
|
|
2726
2729
|
if ($xeGanttView && $xeGanttView.handleUpdateStyle) {
|
|
@@ -3307,14 +3310,18 @@ export default defineVxeComponent({
|
|
|
3307
3310
|
let overflowY = false;
|
|
3308
3311
|
let overflowX = false;
|
|
3309
3312
|
if (bodyWrapperElem) {
|
|
3313
|
+
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
3314
|
+
const scrollbarYOpts = computeScrollbarYOpts.value;
|
|
3315
|
+
const barWidth = XEUtils.toNumber(getDefaultConfig(getDefaultConfig(scrollbarYOpts.width, scrollbarOpts.width), scrollDefaultConf.width));
|
|
3316
|
+
const barHeight = XEUtils.toNumber(getDefaultConfig(getDefaultConfig(scrollbarXOpts.height, scrollbarOpts.height), scrollDefaultConf.height));
|
|
3310
3317
|
overflowY = scrollYHeight > bodyWrapperElem.clientHeight;
|
|
3311
3318
|
if (yHandleEl) {
|
|
3312
|
-
reactData.scrollbarWidth =
|
|
3319
|
+
reactData.scrollbarWidth = (barWidth || barHeight) || (yHandleEl.offsetWidth - yHandleEl.clientWidth) || 14;
|
|
3313
3320
|
}
|
|
3314
3321
|
reactData.overflowY = overflowY;
|
|
3315
3322
|
overflowX = scrollXWidth > bodyWrapperElem.clientWidth;
|
|
3316
3323
|
if (xHandleEl) {
|
|
3317
|
-
reactData.scrollbarHeight =
|
|
3324
|
+
reactData.scrollbarHeight = (barHeight || barWidth) || (xHandleEl.offsetHeight - xHandleEl.clientHeight) || 14;
|
|
3318
3325
|
}
|
|
3319
3326
|
const hHeight = headerTableElem ? headerTableElem.clientHeight : 0;
|
|
3320
3327
|
const fHeight = footerTableElem ? footerTableElem.clientHeight : 0;
|
|
@@ -3724,12 +3731,13 @@ export default defineVxeComponent({
|
|
|
3724
3731
|
* @param {Array} datas 数据
|
|
3725
3732
|
*/
|
|
3726
3733
|
const loadTableData = (datas, isReload, isReset) => {
|
|
3727
|
-
const { keepSource, treeConfig, rowGroupConfig, aggregateConfig } = props;
|
|
3734
|
+
const { keepSource, treeConfig, rowGroupConfig, aggregateConfig, mouseConfig } = props;
|
|
3728
3735
|
const { rowGroupList, scrollYLoad: oldScrollYLoad } = reactData;
|
|
3729
3736
|
const { initStatus, scrollYStore, scrollXStore, lastScrollLeft, lastScrollTop } = internalData;
|
|
3730
3737
|
const rowOpts = computeRowOpts.value;
|
|
3731
3738
|
const treeOpts = computeTreeOpts.value;
|
|
3732
3739
|
const expandOpts = computeExpandOpts.value;
|
|
3740
|
+
const mouseOpts = computeMouseOpts.value;
|
|
3733
3741
|
const { transform } = treeOpts;
|
|
3734
3742
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
3735
3743
|
let treeData = [];
|
|
@@ -3819,7 +3827,7 @@ export default defineVxeComponent({
|
|
|
3819
3827
|
if (keepSource) {
|
|
3820
3828
|
$xeTable.cacheSourceMap(fullData);
|
|
3821
3829
|
}
|
|
3822
|
-
if ($xeTable.clearCellAreas &&
|
|
3830
|
+
if ($xeTable.clearCellAreas && hasEnableConf(mouseConfig, mouseOpts)) {
|
|
3823
3831
|
$xeTable.clearCellAreas();
|
|
3824
3832
|
$xeTable.clearCopyCellArea();
|
|
3825
3833
|
}
|
|
@@ -6776,7 +6784,7 @@ export default defineVxeComponent({
|
|
|
6776
6784
|
setCurrentColumn(fieldOrColumn) {
|
|
6777
6785
|
const { mouseConfig } = props;
|
|
6778
6786
|
const mouseOpts = computeMouseOpts.value;
|
|
6779
|
-
const isMouseSelected = mouseConfig && mouseOpts.selected;
|
|
6787
|
+
const isMouseSelected = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected;
|
|
6780
6788
|
const column = handleFieldOrColumn($xeTable, fieldOrColumn);
|
|
6781
6789
|
if (column) {
|
|
6782
6790
|
$xeTable.clearCurrentColumn();
|
|
@@ -8023,7 +8031,7 @@ export default defineVxeComponent({
|
|
|
8023
8031
|
updateCellAreas() {
|
|
8024
8032
|
const { mouseConfig } = props;
|
|
8025
8033
|
const mouseOpts = computeMouseOpts.value;
|
|
8026
|
-
if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
|
|
8034
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
|
|
8027
8035
|
return $xeTable.handleRecalculateCellAreaEvent();
|
|
8028
8036
|
}
|
|
8029
8037
|
return nextTick();
|
|
@@ -8282,6 +8290,7 @@ export default defineVxeComponent({
|
|
|
8282
8290
|
const editOpts = computeEditOpts.value;
|
|
8283
8291
|
const validOpts = computeValidOpts.value;
|
|
8284
8292
|
const areaOpts = computeAreaOpts.value;
|
|
8293
|
+
const mouseOpts = computeMouseOpts.value;
|
|
8285
8294
|
const { actived } = editStore;
|
|
8286
8295
|
const $validTooltip = refValidTooltip.value;
|
|
8287
8296
|
const tableFilter = refTableFilter.value;
|
|
@@ -8378,7 +8387,7 @@ export default defineVxeComponent({
|
|
|
8378
8387
|
}
|
|
8379
8388
|
}
|
|
8380
8389
|
}
|
|
8381
|
-
else if (mouseConfig) {
|
|
8390
|
+
else if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
8382
8391
|
if (!getEventTargetNode(evnt, el).flag && !($xeGGWrapper && getEventTargetNode(evnt, $xeGGWrapper.getRefMaps().refElem.value).flag) && !(tableMenu && getEventTargetNode(evnt, tableMenu.getRefMaps().refElem.value).flag) && !($xeToolbar && getEventTargetNode(evnt, $xeToolbar.getRefMaps().refElem.value).flag)) {
|
|
8383
8392
|
if ($xeTable.clearSelected) {
|
|
8384
8393
|
$xeTable.clearSelected();
|
|
@@ -8465,7 +8474,7 @@ export default defineVxeComponent({
|
|
|
8465
8474
|
if (isEsc) {
|
|
8466
8475
|
$xeTable.preventEvent(evnt, 'event.keydown', null, () => {
|
|
8467
8476
|
dispatchEvent('keydown-start', {}, evnt);
|
|
8468
|
-
if (keyboardConfig && mouseConfig && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
8477
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
8469
8478
|
$xeTable.handleKdClAreaEvent(evnt);
|
|
8470
8479
|
}
|
|
8471
8480
|
else if (actived.row || filterStore.visible || ctxMenuStore.visible) {
|
|
@@ -8475,7 +8484,7 @@ export default defineVxeComponent({
|
|
|
8475
8484
|
$xeTable.closeMenu();
|
|
8476
8485
|
}
|
|
8477
8486
|
$xeTable.closeFilter();
|
|
8478
|
-
if (keyboardConfig && keyboardOpts.isEsc) {
|
|
8487
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEsc) {
|
|
8479
8488
|
// 如果是激活编辑状态,则取消编辑
|
|
8480
8489
|
if (actived.row) {
|
|
8481
8490
|
const params = actived.args;
|
|
@@ -8552,7 +8561,7 @@ export default defineVxeComponent({
|
|
|
8552
8561
|
$xeTable.moveCtxMenu(evnt, ctxMenuStore, 'selected', isRightArrow, true, menuList);
|
|
8553
8562
|
}
|
|
8554
8563
|
}
|
|
8555
|
-
else if (keyboardConfig && mouseConfig && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
8564
|
+
else if (hasEnableConf(keyboardConfig, keyboardOpts) && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleKdClAreaEvent) {
|
|
8556
8565
|
$xeTable.handleKdClAreaEvent(evnt);
|
|
8557
8566
|
}
|
|
8558
8567
|
else if (isEsc) {
|
|
@@ -8561,7 +8570,7 @@ export default defineVxeComponent({
|
|
|
8561
8570
|
$xeTable.closeMenu();
|
|
8562
8571
|
}
|
|
8563
8572
|
$xeTable.closeFilter();
|
|
8564
|
-
if (keyboardConfig && keyboardOpts.isEsc) {
|
|
8573
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEsc) {
|
|
8565
8574
|
// 如果是激活编辑状态,则取消编辑
|
|
8566
8575
|
if (actived.row) {
|
|
8567
8576
|
const params = actived.args;
|
|
@@ -8573,7 +8582,7 @@ export default defineVxeComponent({
|
|
|
8573
8582
|
}
|
|
8574
8583
|
}
|
|
8575
8584
|
}
|
|
8576
|
-
else if (isSpacebar && keyboardConfig && keyboardOpts.isChecked && selectRow && selectColumn && (selectColumn.type === 'checkbox' || selectColumn.type === 'radio')) {
|
|
8585
|
+
else if (isSpacebar && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isChecked && selectRow && selectColumn && (selectColumn.type === 'checkbox' || selectColumn.type === 'radio')) {
|
|
8577
8586
|
// 空格键支持选中复选框
|
|
8578
8587
|
evnt.preventDefault();
|
|
8579
8588
|
if (selectColumn.type === 'checkbox') {
|
|
@@ -8600,7 +8609,7 @@ export default defineVxeComponent({
|
|
|
8600
8609
|
internalData._keyCtx = false;
|
|
8601
8610
|
}, 1000);
|
|
8602
8611
|
}
|
|
8603
|
-
else if (isEnter && !isAltKey && keyboardConfig && keyboardOpts.isEnter && (selectRow || actived.row || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow))) {
|
|
8612
|
+
else if (isEnter && !isAltKey && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isEnter && (selectRow || actived.row || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow))) {
|
|
8604
8613
|
// 退出选中
|
|
8605
8614
|
if (isControlKey) {
|
|
8606
8615
|
// 如果是激活编辑状态,则取消编辑
|
|
@@ -8728,7 +8737,7 @@ export default defineVxeComponent({
|
|
|
8728
8737
|
}
|
|
8729
8738
|
}
|
|
8730
8739
|
}
|
|
8731
|
-
else if (operArrow && keyboardConfig && keyboardOpts.isArrow) {
|
|
8740
|
+
else if (operArrow && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isArrow) {
|
|
8732
8741
|
if (!isEditStatus) {
|
|
8733
8742
|
// 如果按下了方向键
|
|
8734
8743
|
if (mouseOpts.selected && selectRow && selectColumn) {
|
|
@@ -8746,7 +8755,7 @@ export default defineVxeComponent({
|
|
|
8746
8755
|
}
|
|
8747
8756
|
}
|
|
8748
8757
|
}
|
|
8749
|
-
else if (isTab && keyboardConfig && keyboardOpts.isTab) {
|
|
8758
|
+
else if (isTab && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isTab) {
|
|
8750
8759
|
// 如果按下了 Tab 键切换
|
|
8751
8760
|
if (selectRow || actived.row) {
|
|
8752
8761
|
const activeRow = selectRow || actived.row;
|
|
@@ -8796,7 +8805,7 @@ export default defineVxeComponent({
|
|
|
8796
8805
|
}
|
|
8797
8806
|
}
|
|
8798
8807
|
}
|
|
8799
|
-
else if (keyboardConfig && keyboardOpts.isDel && hasDeleteKey && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
8808
|
+
else if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isDel && hasDeleteKey && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
8800
8809
|
// 如果是删除键
|
|
8801
8810
|
if (!isEditStatus) {
|
|
8802
8811
|
const { delMethod } = keyboardOpts;
|
|
@@ -8827,7 +8836,7 @@ export default defineVxeComponent({
|
|
|
8827
8836
|
}
|
|
8828
8837
|
}
|
|
8829
8838
|
}
|
|
8830
|
-
else if (hasBackspaceKey && keyboardConfig && keyboardOpts.isBack && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
8839
|
+
else if (hasBackspaceKey && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isBack && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
8831
8840
|
if (!isEditStatus) {
|
|
8832
8841
|
const { backMethod } = keyboardOpts;
|
|
8833
8842
|
// 如果是删除键
|
|
@@ -8860,7 +8869,7 @@ export default defineVxeComponent({
|
|
|
8860
8869
|
}
|
|
8861
8870
|
}
|
|
8862
8871
|
}
|
|
8863
|
-
else if (hasBackspaceKey && keyboardConfig && treeConfig && keyboardOpts.isBack && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
|
|
8872
|
+
else if (hasBackspaceKey && hasEnableConf(keyboardConfig, keyboardOpts) && treeConfig && keyboardOpts.isBack && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
|
|
8864
8873
|
// 如果树形表格回退键关闭当前行返回父节点
|
|
8865
8874
|
const { parent: parentRow } = XEUtils.findTree(internalData.afterTreeFullData, item => item === currentRow, { children: childrenField });
|
|
8866
8875
|
if (parentRow) {
|
|
@@ -8878,7 +8887,7 @@ export default defineVxeComponent({
|
|
|
8878
8887
|
.then(() => $xeTable.triggerCurrentRowEvent(evnt, params));
|
|
8879
8888
|
}
|
|
8880
8889
|
}
|
|
8881
|
-
else if (keyboardConfig && keyboardOpts.isUndoRedo && isControlKey && (isZ || isY) && !hasAxternalInputTarget(evnt.target)) {
|
|
8890
|
+
else if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isUndoRedo && isControlKey && (isZ || isY) && !hasAxternalInputTarget(evnt.target)) {
|
|
8882
8891
|
if (evnt.target) {
|
|
8883
8892
|
if (isY || (hasShiftKey && isZ)) {
|
|
8884
8893
|
// 恢复被撤销的操作:Ctrl + Y 或 Ctrl + Shift + Z
|
|
@@ -8892,7 +8901,7 @@ export default defineVxeComponent({
|
|
|
8892
8901
|
}
|
|
8893
8902
|
}
|
|
8894
8903
|
}
|
|
8895
|
-
else if (keyboardConfig && isEnableConf(editConfig) && keyboardOpts.isEdit && !isControlKey && (isSpacebar || isProcess || evnt.key === 'Process' || (keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <= 90) || (keyCode >= 96 && keyCode <= 111) || (keyCode >= 186 && keyCode <= 192) || (keyCode >= 219 && keyCode <= 222))) {
|
|
8904
|
+
else if (hasEnableConf(keyboardConfig, keyboardOpts) && isEnableConf(editConfig) && keyboardOpts.isEdit && !isControlKey && (isSpacebar || isProcess || evnt.key === 'Process' || (keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <= 90) || (keyCode >= 96 && keyCode <= 111) || (keyCode >= 186 && keyCode <= 192) || (keyCode >= 219 && keyCode <= 222))) {
|
|
8896
8905
|
const { editMode, editMethod } = keyboardOpts;
|
|
8897
8906
|
// 启用编辑后,空格键功能将失效
|
|
8898
8907
|
// if (isSpacebar) {
|
|
@@ -8944,7 +8953,7 @@ export default defineVxeComponent({
|
|
|
8944
8953
|
const { actived } = editStore;
|
|
8945
8954
|
if (isActivated && !filterStore.visible) {
|
|
8946
8955
|
if (!(actived.row || actived.column)) {
|
|
8947
|
-
if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handlePeClAreaEvent) {
|
|
8956
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isClip && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handlePeClAreaEvent) {
|
|
8948
8957
|
$xeTable.handlePeClAreaEvent(evnt);
|
|
8949
8958
|
}
|
|
8950
8959
|
}
|
|
@@ -8960,7 +8969,7 @@ export default defineVxeComponent({
|
|
|
8960
8969
|
const { actived } = editStore;
|
|
8961
8970
|
if (isActivated && !filterStore.visible) {
|
|
8962
8971
|
if (!(actived.row || actived.column)) {
|
|
8963
|
-
if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handleCyClAreaEvent) {
|
|
8972
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isClip && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleCyClAreaEvent) {
|
|
8964
8973
|
$xeTable.handleCyClAreaEvent(evnt);
|
|
8965
8974
|
}
|
|
8966
8975
|
}
|
|
@@ -8976,7 +8985,7 @@ export default defineVxeComponent({
|
|
|
8976
8985
|
const { actived } = editStore;
|
|
8977
8986
|
if (isActivated && !filterStore.visible) {
|
|
8978
8987
|
if (!(actived.row || actived.column)) {
|
|
8979
|
-
if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handleCutCellAreaEvent) {
|
|
8988
|
+
if (hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isClip && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleCutCellAreaEvent) {
|
|
8980
8989
|
$xeTable.handleCutCellAreaEvent(evnt);
|
|
8981
8990
|
}
|
|
8982
8991
|
}
|
|
@@ -9483,11 +9492,24 @@ export default defineVxeComponent({
|
|
|
9483
9492
|
*/
|
|
9484
9493
|
getParentElem() {
|
|
9485
9494
|
const el = refElem.value;
|
|
9486
|
-
if (
|
|
9487
|
-
|
|
9488
|
-
|
|
9495
|
+
if (!el) {
|
|
9496
|
+
return null;
|
|
9497
|
+
}
|
|
9498
|
+
const parentEl = el.parentElement;
|
|
9499
|
+
if (!parentEl) {
|
|
9500
|
+
return null;
|
|
9501
|
+
}
|
|
9502
|
+
if ($xeGantt && hasClass(parentEl, 'vxe-gantt--table-wrapper')) {
|
|
9503
|
+
return $xeGantt.getParentElem();
|
|
9504
|
+
}
|
|
9505
|
+
else if ($xeGrid && hasClass(parentEl, 'vxe-grid--table-wrapper')) {
|
|
9506
|
+
return $xeGrid.getParentElem();
|
|
9489
9507
|
}
|
|
9490
|
-
|
|
9508
|
+
// 如果是虚拟滚动条
|
|
9509
|
+
if (parentEl && hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
|
|
9510
|
+
return parentEl.parentElement;
|
|
9511
|
+
}
|
|
9512
|
+
return parentEl;
|
|
9491
9513
|
},
|
|
9492
9514
|
/**
|
|
9493
9515
|
* 获取父容器的高度
|
|
@@ -9495,25 +9517,32 @@ export default defineVxeComponent({
|
|
|
9495
9517
|
getParentHeight() {
|
|
9496
9518
|
const { height } = props;
|
|
9497
9519
|
const el = refElem.value;
|
|
9498
|
-
if (el) {
|
|
9499
|
-
|
|
9500
|
-
|
|
9501
|
-
|
|
9502
|
-
|
|
9503
|
-
|
|
9504
|
-
|
|
9505
|
-
|
|
9506
|
-
|
|
9507
|
-
|
|
9508
|
-
|
|
9509
|
-
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
|
|
9520
|
+
if (!el) {
|
|
9521
|
+
return 0;
|
|
9522
|
+
}
|
|
9523
|
+
let parentEl = el.parentElement;
|
|
9524
|
+
let parentPaddingSize = 0;
|
|
9525
|
+
let parentWrapperHeight = 0;
|
|
9526
|
+
if (!parentEl) {
|
|
9527
|
+
return 0;
|
|
9528
|
+
}
|
|
9529
|
+
if ($xeGantt && hasClass(parentEl, 'vxe-gantt--table-wrapper')) {
|
|
9530
|
+
parentWrapperHeight = $xeGantt.getParentHeight();
|
|
9531
|
+
}
|
|
9532
|
+
else if ($xeGrid && hasClass(parentEl, 'vxe-grid--table-wrapper')) {
|
|
9533
|
+
parentWrapperHeight = $xeGrid.getParentHeight();
|
|
9534
|
+
}
|
|
9535
|
+
else {
|
|
9536
|
+
// 如果是虚拟滚动条
|
|
9537
|
+
if (parentEl && hasClass(parentEl, 'vxe-scrollbar--view-inner')) {
|
|
9538
|
+
parentEl = parentEl.parentElement;
|
|
9539
|
+
}
|
|
9540
|
+
if (parentEl) {
|
|
9541
|
+
parentWrapperHeight = parentEl.clientHeight;
|
|
9542
|
+
parentPaddingSize = height === '100%' || height === 'auto' ? getPaddingTopBottomSize(parentEl) : 0;
|
|
9513
9543
|
}
|
|
9514
|
-
return Math.floor(parentWrapperHeight - parentPaddingSize);
|
|
9515
9544
|
}
|
|
9516
|
-
return
|
|
9545
|
+
return Math.floor(parentWrapperHeight - parentPaddingSize);
|
|
9517
9546
|
},
|
|
9518
9547
|
/**
|
|
9519
9548
|
* 获取需要排除的高度
|
|
@@ -10180,7 +10209,8 @@ export default defineVxeComponent({
|
|
|
10180
10209
|
*/
|
|
10181
10210
|
handleCustom() {
|
|
10182
10211
|
const { mouseConfig } = props;
|
|
10183
|
-
|
|
10212
|
+
const mouseOpts = computeMouseOpts.value;
|
|
10213
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
10184
10214
|
if ($xeTable.clearSelected) {
|
|
10185
10215
|
$xeTable.clearSelected();
|
|
10186
10216
|
}
|
|
@@ -11338,7 +11368,7 @@ export default defineVxeComponent({
|
|
|
11338
11368
|
const { field, sortable, order } = column;
|
|
11339
11369
|
if (sortable) {
|
|
11340
11370
|
const params = { $table: $xeTable, $event: evnt, column, field, property: field, order, sortList: $xeTable.getSortColumns(), sortTime: column.sortTime };
|
|
11341
|
-
if (mouseConfig && mouseOpts.area && $xeTable.handleSortEvent) {
|
|
11371
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleSortEvent) {
|
|
11342
11372
|
$xeTable.handleSortEvent(evnt, params);
|
|
11343
11373
|
}
|
|
11344
11374
|
if (!order) {
|
|
@@ -11415,7 +11445,7 @@ export default defineVxeComponent({
|
|
|
11415
11445
|
$xeTable.handleHeaderCellDragMousedownEvent(evnt, params);
|
|
11416
11446
|
}
|
|
11417
11447
|
}
|
|
11418
|
-
if (!triggerDrag && mouseConfig && mouseOpts.area && $xeTable.handleHeaderCellAreaMouseDnEvent) {
|
|
11448
|
+
if (!triggerDrag && hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.handleHeaderCellAreaMouseDnEvent) {
|
|
11419
11449
|
$xeTable.handleHeaderCellAreaMouseDnEvent(evnt, Object.assign({ cell, triggerSort, triggerFilter }, params));
|
|
11420
11450
|
}
|
|
11421
11451
|
$xeTable.focus();
|
|
@@ -12156,6 +12186,7 @@ export default defineVxeComponent({
|
|
|
12156
12186
|
handleColDragSwapEvent(evnt, isSyncColumn, dragCol, prevDragCol, prevDragPos, prevDragToChild) {
|
|
12157
12187
|
const { mouseConfig } = props;
|
|
12158
12188
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
12189
|
+
const mouseOpts = computeMouseOpts.value;
|
|
12159
12190
|
const { animation, isPeerDrag, isCrossDrag, isSelfToChildDrag, isToChildDrag, dragEndMethod, dragToChildMethod } = columnDragOpts;
|
|
12160
12191
|
const { collectColumn, fullColumnIdData } = internalData;
|
|
12161
12192
|
const el = refElem.value;
|
|
@@ -12318,7 +12349,7 @@ export default defineVxeComponent({
|
|
|
12318
12349
|
}
|
|
12319
12350
|
});
|
|
12320
12351
|
$xeTable.handleClearStack();
|
|
12321
|
-
if (mouseConfig) {
|
|
12352
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
12322
12353
|
if ($xeTable.clearSelected) {
|
|
12323
12354
|
$xeTable.clearSelected();
|
|
12324
12355
|
}
|
|
@@ -12856,14 +12887,14 @@ export default defineVxeComponent({
|
|
|
12856
12887
|
const isRollY = overflowY && scrollTop !== lastScrollTop;
|
|
12857
12888
|
if (isRollX) {
|
|
12858
12889
|
// 如果禁用滚动
|
|
12859
|
-
if (scrollbarXOpts.visible === 'hidden') {
|
|
12890
|
+
if (scrollbarXOpts.visible === false || scrollbarXOpts.visible === 'hidden') {
|
|
12860
12891
|
evnt.preventDefault();
|
|
12861
12892
|
return;
|
|
12862
12893
|
}
|
|
12863
12894
|
}
|
|
12864
12895
|
if (isRollY) {
|
|
12865
12896
|
// 如果禁用滚动
|
|
12866
|
-
if (scrollbarYOpts.visible === 'hidden') {
|
|
12897
|
+
if (scrollbarYOpts.visible === false || scrollbarYOpts.visible === 'hidden') {
|
|
12867
12898
|
evnt.preventDefault();
|
|
12868
12899
|
return;
|
|
12869
12900
|
}
|
|
@@ -13460,10 +13491,15 @@ export default defineVxeComponent({
|
|
|
13460
13491
|
const osYBehavior = XEUtils.eqNull(overscrollYBehavior) ? scrollbarOpts.overscrollBehavior : overscrollYBehavior;
|
|
13461
13492
|
return h('div', {
|
|
13462
13493
|
ref: isFixedLeft ? refLeftContainer : refRightContainer,
|
|
13463
|
-
class: [
|
|
13494
|
+
class: [
|
|
13495
|
+
`vxe-table--fixed-${fixedType}-wrapper`,
|
|
13496
|
+
`sx--${(scrollbarXOpts.visible === false || scrollbarXOpts.visible === 'hidden') ? 'hidden' : 'visible'}`,
|
|
13497
|
+
`sy--${(scrollbarYOpts.visible === false || scrollbarYOpts.visible === 'hidden') ? 'hidden' : 'visible'}`,
|
|
13498
|
+
{
|
|
13464
13499
|
[`x-ob--${osXBehavior}`]: osXBehavior,
|
|
13465
13500
|
[`y-ob--${osYBehavior}`]: osYBehavior
|
|
13466
|
-
}
|
|
13501
|
+
}
|
|
13502
|
+
]
|
|
13467
13503
|
}, [
|
|
13468
13504
|
showHeader
|
|
13469
13505
|
? h(TableHeaderComponent, {
|
|
@@ -13772,7 +13808,11 @@ export default defineVxeComponent({
|
|
|
13772
13808
|
}]
|
|
13773
13809
|
}, [
|
|
13774
13810
|
h('div', {
|
|
13775
|
-
class: [
|
|
13811
|
+
class: [
|
|
13812
|
+
'vxe-table--main-wrapper',
|
|
13813
|
+
`sx--${(scrollbarXOpts.visible === false || scrollbarXOpts.visible === 'hidden') ? 'hidden' : 'visible'}`,
|
|
13814
|
+
`sy--${(scrollbarYOpts.visible === false || scrollbarYOpts.visible === 'hidden') ? 'hidden' : 'visible'}`
|
|
13815
|
+
]
|
|
13776
13816
|
}, [
|
|
13777
13817
|
/**
|
|
13778
13818
|
* 表头
|
|
@@ -13828,7 +13868,7 @@ export default defineVxeComponent({
|
|
|
13828
13868
|
]);
|
|
13829
13869
|
};
|
|
13830
13870
|
const renderVN = () => {
|
|
13831
|
-
const { loading, stripe, showHeader, height, treeConfig, mouseConfig, showFooter, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, editRules } = props;
|
|
13871
|
+
const { loading, stripe, useScrollbar, showHeader, height, treeConfig, mouseConfig, showFooter, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, editRules, importConfig, exportConfig, printConfig } = props;
|
|
13832
13872
|
const { isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, tableData, initStore, isRowGroupStatus, columnStore, filterStore, customStore, tooltipStore } = reactData;
|
|
13833
13873
|
const { teleportToWrapperElem, popupToWrapperElem, customPopupToElem } = internalData;
|
|
13834
13874
|
const { leftList, rightList } = columnStore;
|
|
@@ -13856,10 +13896,13 @@ export default defineVxeComponent({
|
|
|
13856
13896
|
const isContentMenu = computeIsContentMenu.value;
|
|
13857
13897
|
const currLoading = reactData.isColLoading || reactData.isRowLoading || loading;
|
|
13858
13898
|
const resizableOpts = computeResizableOpts.value;
|
|
13859
|
-
const isArea = mouseConfig && mouseOpts.area;
|
|
13899
|
+
const isArea = hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area;
|
|
13860
13900
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
13861
13901
|
const scrollbarXToTop = computeScrollbarXToTop.value;
|
|
13862
13902
|
const scrollbarYToLeft = computeScrollbarYToLeft.value;
|
|
13903
|
+
const exportOpts = computeExportOpts.value;
|
|
13904
|
+
const importOpts = computeImportOpts.value;
|
|
13905
|
+
const printOpts = computePrintOpts.value;
|
|
13863
13906
|
const { isCrossTableDrag } = rowDragOpts;
|
|
13864
13907
|
const tbOns = {
|
|
13865
13908
|
onKeydown: keydownEvent,
|
|
@@ -13868,13 +13911,13 @@ export default defineVxeComponent({
|
|
|
13868
13911
|
if (isCrossTableDrag && !tableData.length) {
|
|
13869
13912
|
tbOns.onDragover = $xeTable.handleCrossTableRowDragoverEmptyEvent;
|
|
13870
13913
|
}
|
|
13871
|
-
return h('div', Object.assign({ ref: refElem, class: ['vxe-table', 'vxe-table--render-default', `tid_${xID}`, `border--${tableBorder}`, `sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}`, `sy-pos--${scrollbarYToLeft ? 'left' : 'right'}`, {
|
|
13914
|
+
return h('div', Object.assign({ ref: refElem, class: ['vxe-table', 'vxe-table--render-default', `tid_${xID}`, `border--${tableBorder}`, useScrollbar ? 'is--virtual-scrollbar' : 'is--native-scrollbar', `sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}`, `sy-pos--${scrollbarYToLeft ? 'left' : 'right'}`, {
|
|
13872
13915
|
[`size--${vSize}`]: vSize,
|
|
13873
13916
|
[`valid-msg--${validOpts.msgMode}`]: !!editRules,
|
|
13874
13917
|
'vxe-editable': !!editConfig,
|
|
13875
13918
|
'old-cell-valid': editRules && getConfig().cellVaildMode === 'obsolete',
|
|
13876
13919
|
'cell--highlight': highlightCell,
|
|
13877
|
-
'cell--selected': mouseConfig && mouseOpts.selected,
|
|
13920
|
+
'cell--selected': hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected,
|
|
13878
13921
|
'cell--area': isArea,
|
|
13879
13922
|
'header-cell--area': isArea && areaOpts.selectCellByHeader,
|
|
13880
13923
|
'body-cell--area': isArea && areaOpts.selectCellByBody,
|
|
@@ -14084,7 +14127,7 @@ export default defineVxeComponent({
|
|
|
14084
14127
|
/**
|
|
14085
14128
|
* 导入
|
|
14086
14129
|
*/
|
|
14087
|
-
initStore.import &&
|
|
14130
|
+
initStore.import && hasEnableConf(importConfig, importOpts)
|
|
14088
14131
|
? h(TableImportPanelComponent, {
|
|
14089
14132
|
key: 'it',
|
|
14090
14133
|
defaultOptions: reactData.importParams,
|
|
@@ -14094,7 +14137,7 @@ export default defineVxeComponent({
|
|
|
14094
14137
|
/**
|
|
14095
14138
|
* 导出
|
|
14096
14139
|
*/
|
|
14097
|
-
initStore.export && (
|
|
14140
|
+
initStore.export && (hasEnableConf(exportConfig, exportOpts) || hasEnableConf(printConfig, printOpts))
|
|
14098
14141
|
? h(TableExportPanelComponent, {
|
|
14099
14142
|
key: 'et',
|
|
14100
14143
|
defaultOptions: reactData.exportParams,
|
|
@@ -14436,7 +14479,7 @@ export default defineVxeComponent({
|
|
|
14436
14479
|
$xeTable.preventEvent(null, 'deactivated', { $table: $xeTable });
|
|
14437
14480
|
});
|
|
14438
14481
|
onMounted(() => {
|
|
14439
|
-
const { editConfig, exportConfig, importConfig, treeConfig, minHeight, keepSource } = props;
|
|
14482
|
+
const { editConfig, exportConfig, importConfig, treeConfig, minHeight, keepSource, areaConfig } = props;
|
|
14440
14483
|
const { scrollXStore, scrollYStore } = internalData;
|
|
14441
14484
|
const columnOpts = computeColumnOpts.value;
|
|
14442
14485
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
@@ -14459,6 +14502,7 @@ export default defineVxeComponent({
|
|
|
14459
14502
|
const areaOpts = computeAreaOpts.value;
|
|
14460
14503
|
const sortOpts = computeSortOpts.value;
|
|
14461
14504
|
const filterOpts = computeFilterOpts.value;
|
|
14505
|
+
const scrollbarOpts = computeScrollbarOpts.value;
|
|
14462
14506
|
const { groupFields } = aggregateOpts;
|
|
14463
14507
|
if ($xeGantt) {
|
|
14464
14508
|
const { refClassifyWrapperElem } = $xeGantt.getRefMaps();
|
|
@@ -14550,13 +14594,13 @@ export default defineVxeComponent({
|
|
|
14550
14594
|
// warnLog('vxe.error.delProp', ['scroll-x', 'virtual-x-config'])
|
|
14551
14595
|
// }
|
|
14552
14596
|
// 检查导入导出类型,如果自定义导入导出方法,则不校验类型
|
|
14553
|
-
if (importConfig && importOpts.types && !importOpts.importMethod && !XEUtils.includeArrays(XEUtils.keys(importOpts._typeMaps), importOpts.types)) {
|
|
14597
|
+
if (hasEnableConf(importConfig, importOpts) && importOpts.types && !importOpts.importMethod && !XEUtils.includeArrays(XEUtils.keys(importOpts._typeMaps), importOpts.types)) {
|
|
14554
14598
|
warnLog('vxe.error.errProp', [`export-config.types=${importOpts.types.join(',')}`, importOpts.types.filter((type) => XEUtils.includes(XEUtils.keys(importOpts._typeMaps), type)).join(',') || XEUtils.keys(importOpts._typeMaps).join(',')]);
|
|
14555
14599
|
}
|
|
14556
|
-
if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !XEUtils.includeArrays(XEUtils.keys(exportOpts._typeMaps), exportOpts.types)) {
|
|
14600
|
+
if (hasEnableConf(exportConfig, exportOpts) && exportOpts.types && !exportOpts.exportMethod && !XEUtils.includeArrays(XEUtils.keys(exportOpts._typeMaps), exportOpts.types)) {
|
|
14557
14601
|
warnLog('vxe.error.errProp', [`export-config.types=${exportOpts.types.join(',')}`, exportOpts.types.filter((type) => XEUtils.includes(XEUtils.keys(exportOpts._typeMaps), type)).join(',') || XEUtils.keys(exportOpts._typeMaps).join(',')]);
|
|
14558
14602
|
}
|
|
14559
|
-
if (exportConfig && XEUtils.isBoolean(exportOpts.isAllExpand)) {
|
|
14603
|
+
if (hasEnableConf(exportConfig, exportOpts) && XEUtils.isBoolean(exportOpts.isAllExpand)) {
|
|
14560
14604
|
warnLog('vxe.error.delProp', ['isAllExpand', 'isTreeAllExpanded']);
|
|
14561
14605
|
}
|
|
14562
14606
|
if (!props.id) {
|
|
@@ -14570,8 +14614,8 @@ export default defineVxeComponent({
|
|
|
14570
14614
|
if (rowOpts.height && !props.showOverflow) {
|
|
14571
14615
|
warnLog('vxe.error.notProp', ['table.show-overflow']);
|
|
14572
14616
|
}
|
|
14573
|
-
if (!$xeTable.
|
|
14574
|
-
if (
|
|
14617
|
+
if (!$xeTable.triggerClAaMnEvent) {
|
|
14618
|
+
if (hasEnableConf(areaConfig, areaOpts)) {
|
|
14575
14619
|
warnLog('vxe.error.notProp', ['area-config']);
|
|
14576
14620
|
}
|
|
14577
14621
|
if (props.clipConfig) {
|
|
@@ -14657,10 +14701,10 @@ export default defineVxeComponent({
|
|
|
14657
14701
|
if (columnOpts.currentMethod) {
|
|
14658
14702
|
warnLog('vxe.error.delProp', ['row-config.currentMethod', 'current-column-config.beforeSelectMethod']);
|
|
14659
14703
|
}
|
|
14660
|
-
// if ((rowOpts.isCurrent || highlightCurrentRow) &&
|
|
14704
|
+
// if ((rowOpts.isCurrent || highlightCurrentRow) && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isArrow && !XEUtils.isBoolean(currentRowOpts.isFollowSelected)) {
|
|
14661
14705
|
// warnLog('vxe.error.notConflictProp', ['row-config.isCurrent & keyboard-config.isArrow', 'current-row-config.isFollowSelected'])
|
|
14662
14706
|
// }
|
|
14663
|
-
// if ((columnOpts.isCurrent || highlightCurrentColumn) &&
|
|
14707
|
+
// if ((columnOpts.isCurrent || highlightCurrentColumn) && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isArrow && !XEUtils.isBoolean(currentColumnOpts.isFollowSelected)) {
|
|
14664
14708
|
// warnLog('vxe.error.notConflictProp', ['column-config.isCurrent & keyboard-config.isArrow', 'current-column-config.isFollowSelected'])
|
|
14665
14709
|
// }
|
|
14666
14710
|
// 如果不支持虚拟滚动
|
|
@@ -14684,12 +14728,18 @@ export default defineVxeComponent({
|
|
|
14684
14728
|
// if (props.editRules && !$xeTable.validate) {
|
|
14685
14729
|
// errLog('vxe.error.reqModule', ['Validator'])
|
|
14686
14730
|
// }
|
|
14687
|
-
// if ((checkboxOpts.range ||
|
|
14731
|
+
// if ((checkboxOpts.range || hasEnableConf(keyboardConfig, keyboardOpts) || hasEnableConf(mouseConfig, mouseOpts)) && !$xeTable.handleCellMousedownEvent) {
|
|
14688
14732
|
// errLog('vxe.error.reqModule', ['Keyboard'])
|
|
14689
14733
|
// }
|
|
14690
|
-
// if ((
|
|
14734
|
+
// if (hasEnableConf(printConfig, printOpts) || hasEnableConf(importConfig, importOpts) || hasEnableConf(exportConfig, exportOpts)) && !$xeTable.exportData) {
|
|
14691
14735
|
// errLog('vxe.error.reqModule', ['Export'])
|
|
14692
14736
|
// }
|
|
14737
|
+
if (scrollbarOpts.x) {
|
|
14738
|
+
warnLog('vxe.error.delProp', ['scrollbar-config.x', 'scrollbar-config.xConfig']);
|
|
14739
|
+
}
|
|
14740
|
+
if (scrollbarOpts.y) {
|
|
14741
|
+
warnLog('vxe.error.delProp', ['scrollbar-config.y', 'scrollbar-config.yConfig']);
|
|
14742
|
+
}
|
|
14693
14743
|
Object.assign(scrollYStore, {
|
|
14694
14744
|
startIndex: 0,
|
|
14695
14745
|
endIndex: 0,
|