vxe-table 4.18.0-beta.2 → 4.18.0-beta.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/README.md +10 -10
- package/es/colgroup/style.css +0 -0
- package/es/colgroup/style.min.css +0 -0
- package/es/column/style.css +0 -0
- package/es/column/style.min.css +0 -0
- package/es/grid/src/grid.js +23 -19
- package/es/grid/style.css +86 -0
- package/es/grid/style.min.css +1 -0
- package/es/iconfont.1770109263422.ttf +0 -0
- package/es/iconfont.1770109263422.woff +0 -0
- package/es/iconfont.1770109263422.woff2 +0 -0
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.d.ts +2 -0
- package/es/locale/lang/ar-EG.js +6 -0
- package/es/locale/lang/de-DE.d.ts +2 -0
- package/es/locale/lang/de-DE.js +6 -0
- package/es/locale/lang/en-US.d.ts +2 -0
- package/es/locale/lang/en-US.js +6 -0
- package/es/locale/lang/es-ES.d.ts +2 -0
- package/es/locale/lang/es-ES.js +6 -0
- package/es/locale/lang/fr-FR.d.ts +2 -0
- package/es/locale/lang/fr-FR.js +6 -0
- package/es/locale/lang/hu-HU.d.ts +2 -0
- package/es/locale/lang/hu-HU.js +6 -0
- package/es/locale/lang/hy-AM.d.ts +2 -0
- package/es/locale/lang/hy-AM.js +6 -0
- package/es/locale/lang/id-ID.d.ts +2 -0
- package/es/locale/lang/id-ID.js +6 -0
- package/es/locale/lang/it-IT.d.ts +2 -0
- package/es/locale/lang/it-IT.js +6 -0
- package/es/locale/lang/ja-JP.d.ts +2 -0
- package/es/locale/lang/ja-JP.js +6 -0
- package/es/locale/lang/ko-KR.d.ts +2 -0
- package/es/locale/lang/ko-KR.js +6 -0
- package/es/locale/lang/ms-MY.d.ts +2 -0
- package/es/locale/lang/ms-MY.js +6 -0
- package/es/locale/lang/nb-NO.d.ts +2 -0
- package/es/locale/lang/nb-NO.js +6 -0
- package/es/locale/lang/pt-BR.d.ts +2 -0
- package/es/locale/lang/pt-BR.js +6 -0
- package/es/locale/lang/ru-RU.d.ts +2 -0
- package/es/locale/lang/ru-RU.js +6 -0
- package/es/locale/lang/th-TH.d.ts +2 -0
- package/es/locale/lang/th-TH.js +6 -0
- package/es/locale/lang/ug-CN.d.ts +2 -0
- package/es/locale/lang/ug-CN.js +6 -0
- package/es/locale/lang/uk-UA.d.ts +2 -0
- package/es/locale/lang/uk-UA.js +6 -0
- package/es/locale/lang/uz-UZ.d.ts +2 -0
- package/es/locale/lang/uz-UZ.js +6 -0
- package/es/locale/lang/vi-VN.d.ts +2 -0
- package/es/locale/lang/vi-VN.js +6 -0
- package/es/locale/lang/zh-CHT.d.ts +2 -0
- package/es/locale/lang/zh-CHT.js +6 -0
- package/es/locale/lang/zh-CN.d.ts +2 -0
- package/es/locale/lang/zh-CN.js +6 -0
- package/es/locale/lang/zh-HK.d.ts +2 -0
- package/es/locale/lang/zh-MO.d.ts +2 -0
- package/es/locale/lang/zh-TW.d.ts +2 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/hook.js +25 -9
- package/es/table/module/custom/panel.js +14 -13
- package/es/table/module/edit/hook.js +3 -3
- package/es/table/module/export/hook.js +15 -1
- package/es/table/module/filter/panel.js +11 -3
- package/es/table/module/validator/hook.js +7 -6
- package/es/table/render/index.js +14 -0
- package/es/table/src/body.js +12 -5
- package/es/table/src/emits.js +1 -0
- package/es/table/src/props.js +2 -0
- package/es/table/src/table.js +235 -54
- package/es/table/src/util.js +23 -9
- package/es/table/style.css +3887 -0
- package/es/table/style.min.css +1 -0
- package/es/toolbar/src/toolbar.js +11 -7
- package/es/toolbar/style.css +110 -0
- package/es/toolbar/style.min.css +1 -0
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/ui/style.css +0 -0
- package/es/ui/style.min.css +0 -0
- package/es/v-x-e-table/style.css +0 -0
- package/es/v-x-e-table/style.min.css +0 -0
- package/es/vxe-colgroup/style.css +0 -0
- package/es/vxe-colgroup/style.min.css +0 -0
- package/es/vxe-column/style.css +0 -0
- package/es/vxe-column/style.min.css +0 -0
- package/es/vxe-grid/style.css +86 -0
- package/es/vxe-grid/style.min.css +1 -0
- package/es/vxe-table/style.css +3887 -0
- package/es/vxe-table/style.min.css +1 -0
- package/es/vxe-toolbar/style.css +110 -0
- package/es/vxe-toolbar/style.min.css +1 -0
- package/es/vxe-ui/style.css +0 -0
- package/es/vxe-ui/style.min.css +0 -0
- package/es/vxe-v-x-e-table/style.css +0 -0
- package/es/vxe-v-x-e-table/style.min.css +0 -0
- package/lib/colgroup/style/index.js +1 -0
- package/lib/colgroup/style/style.css +0 -0
- package/lib/colgroup/style/style.min.css +0 -0
- package/lib/column/style/index.js +1 -0
- package/lib/column/style/style.css +0 -0
- package/lib/column/style/style.min.css +0 -0
- package/lib/grid/src/grid.js +22 -18
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/style/index.js +1 -0
- package/lib/grid/style/style.css +86 -0
- package/lib/grid/style/style.min.css +1 -0
- package/lib/iconfont.1770109263422.ttf +0 -0
- package/lib/iconfont.1770109263422.woff +0 -0
- package/lib/iconfont.1770109263422.woff2 +0 -0
- package/lib/index.common.js +22 -0
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +224 -106
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.d.ts +2 -0
- package/lib/locale/lang/ar-EG.js +6 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +848 -0
- package/lib/locale/lang/de-DE.d.ts +2 -0
- package/lib/locale/lang/de-DE.js +6 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +848 -0
- package/lib/locale/lang/en-US.d.ts +2 -0
- package/lib/locale/lang/en-US.js +6 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +848 -0
- package/lib/locale/lang/es-ES.d.ts +2 -0
- package/lib/locale/lang/es-ES.js +6 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +848 -0
- package/lib/locale/lang/fr-FR.d.ts +2 -0
- package/lib/locale/lang/fr-FR.js +6 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +848 -0
- package/lib/locale/lang/hu-HU.d.ts +2 -0
- package/lib/locale/lang/hu-HU.js +6 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +848 -0
- package/lib/locale/lang/hy-AM.d.ts +2 -0
- package/lib/locale/lang/hy-AM.js +6 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +848 -0
- package/lib/locale/lang/id-ID.d.ts +2 -0
- package/lib/locale/lang/id-ID.js +6 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +848 -0
- package/lib/locale/lang/it-IT.d.ts +2 -0
- package/lib/locale/lang/it-IT.js +6 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +848 -0
- package/lib/locale/lang/ja-JP.d.ts +2 -0
- package/lib/locale/lang/ja-JP.js +6 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +848 -0
- package/lib/locale/lang/ko-KR.d.ts +2 -0
- package/lib/locale/lang/ko-KR.js +6 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +848 -0
- package/lib/locale/lang/ms-MY.d.ts +2 -0
- package/lib/locale/lang/ms-MY.js +6 -0
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +848 -0
- package/lib/locale/lang/nb-NO.d.ts +2 -0
- package/lib/locale/lang/nb-NO.js +6 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +848 -0
- package/lib/locale/lang/pt-BR.d.ts +2 -0
- package/lib/locale/lang/pt-BR.js +6 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +848 -0
- package/lib/locale/lang/ru-RU.d.ts +2 -0
- package/lib/locale/lang/ru-RU.js +6 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +848 -0
- package/lib/locale/lang/th-TH.d.ts +2 -0
- package/lib/locale/lang/th-TH.js +6 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +848 -0
- package/lib/locale/lang/ug-CN.d.ts +2 -0
- package/lib/locale/lang/ug-CN.js +6 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +848 -0
- package/lib/locale/lang/uk-UA.d.ts +2 -0
- package/lib/locale/lang/uk-UA.js +6 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +848 -0
- package/lib/locale/lang/uz-UZ.d.ts +2 -0
- package/lib/locale/lang/uz-UZ.js +6 -0
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +848 -0
- package/lib/locale/lang/vi-VN.d.ts +2 -0
- package/lib/locale/lang/vi-VN.js +6 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +848 -0
- package/lib/locale/lang/zh-CHT.d.ts +2 -0
- package/lib/locale/lang/zh-CHT.js +6 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +848 -0
- package/lib/locale/lang/zh-CN.d.ts +2 -0
- package/lib/locale/lang/zh-CN.js +6 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +848 -0
- package/lib/locale/lang/zh-HK.d.ts +2 -0
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +23 -0
- package/lib/locale/lang/zh-MO.d.ts +2 -0
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +23 -0
- package/lib/locale/lang/zh-TW.d.ts +2 -0
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +23 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/hook.js +29 -9
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +12 -8
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +3 -3
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/hook.js +18 -6
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/module/filter/panel.js +14 -3
- package/lib/table/module/filter/panel.min.js +1 -1
- package/lib/table/module/validator/hook.js +8 -6
- package/lib/table/module/validator/hook.min.js +1 -1
- package/lib/table/render/index.js +18 -0
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +13 -4
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/emits.js +1 -1
- package/lib/table/src/emits.min.js +1 -1
- package/lib/table/src/props.js +2 -0
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +37 -32
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +31 -11
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/index.js +1 -0
- package/lib/table/style/style.css +3887 -0
- package/lib/table/style/style.min.css +1 -0
- package/lib/toolbar/src/toolbar.js +10 -6
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/index.js +1 -0
- package/lib/toolbar/style/style.css +110 -0
- package/lib/toolbar/style/style.min.css +1 -0
- 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/style/index.js +1 -0
- package/lib/ui/style/style.css +0 -0
- package/lib/ui/style/style.min.css +0 -0
- package/lib/v-x-e-table/style/index.js +1 -0
- package/lib/v-x-e-table/style/style.css +0 -0
- package/lib/v-x-e-table/style/style.min.css +0 -0
- package/lib/vxe-colgroup/style/index.js +1 -0
- package/lib/vxe-colgroup/style/style.css +0 -0
- package/lib/vxe-colgroup/style/style.min.css +0 -0
- package/lib/vxe-column/style/index.js +1 -0
- package/lib/vxe-column/style/style.css +0 -0
- package/lib/vxe-column/style/style.min.css +0 -0
- package/lib/vxe-grid/style/index.js +1 -0
- package/lib/vxe-grid/style/style.css +86 -0
- package/lib/vxe-grid/style/style.min.css +1 -0
- package/lib/vxe-table/style/index.js +1 -0
- package/lib/vxe-table/style/style.css +3887 -0
- package/lib/vxe-table/style/style.min.css +1 -0
- package/lib/vxe-toolbar/style/index.js +1 -0
- package/lib/vxe-toolbar/style/style.css +110 -0
- package/lib/vxe-toolbar/style/style.min.css +1 -0
- package/lib/vxe-ui/style/index.js +1 -0
- package/lib/vxe-ui/style/style.css +0 -0
- package/lib/vxe-ui/style/style.min.css +0 -0
- package/lib/vxe-v-x-e-table/style/index.js +1 -0
- package/lib/vxe-v-x-e-table/style/style.css +0 -0
- package/lib/vxe-v-x-e-table/style/style.min.css +0 -0
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +23 -18
- package/packages/locale/lang/ar-EG.ts +6 -0
- package/packages/locale/lang/de-DE.ts +6 -0
- package/packages/locale/lang/en-US.ts +6 -0
- package/packages/locale/lang/es-ES.ts +6 -0
- package/packages/locale/lang/fr-FR.ts +6 -0
- package/packages/locale/lang/hu-HU.ts +6 -0
- package/packages/locale/lang/hy-AM.ts +6 -0
- package/packages/locale/lang/id-ID.ts +6 -0
- package/packages/locale/lang/it-IT.ts +6 -0
- package/packages/locale/lang/ja-JP.ts +6 -0
- package/packages/locale/lang/ko-KR.ts +6 -0
- package/packages/locale/lang/ms-MY.ts +6 -0
- package/packages/locale/lang/nb-NO.ts +6 -0
- package/packages/locale/lang/pt-BR.ts +6 -0
- package/packages/locale/lang/ru-RU.ts +6 -0
- package/packages/locale/lang/th-TH.ts +6 -0
- package/packages/locale/lang/ug-CN.ts +6 -0
- package/packages/locale/lang/uk-UA.ts +6 -0
- package/packages/locale/lang/uz-UZ.ts +6 -0
- package/packages/locale/lang/vi-VN.ts +6 -0
- package/packages/locale/lang/zh-CHT.ts +6 -0
- package/packages/locale/lang/zh-CN.ts +6 -0
- package/packages/table/module/custom/hook.ts +24 -9
- package/packages/table/module/custom/panel.ts +15 -14
- package/packages/table/module/edit/hook.ts +3 -3
- package/packages/table/module/export/hook.ts +13 -1
- package/packages/table/module/filter/panel.ts +10 -3
- package/packages/table/module/validator/hook.ts +7 -6
- package/packages/table/render/index.ts +16 -0
- package/packages/table/src/body.ts +12 -5
- package/packages/table/src/emits.ts +1 -0
- package/packages/table/src/props.ts +5 -3
- package/packages/table/src/table.ts +235 -53
- package/packages/table/src/util.ts +25 -9
- package/packages/toolbar/src/toolbar.ts +12 -7
- package/styles/components/table-module/custom.scss +3 -0
- package/styles/components/table-module/filter.scss +1 -1
- package/styles/components/table.scss +8 -2
- package/styles/components/toolbar.scss +5 -1
- package/styles/theme/base.scss +4 -0
package/es/table/src/table.js
CHANGED
|
@@ -4,7 +4,7 @@ import XEUtils from 'xe-utils';
|
|
|
4
4
|
import { initTpImg, getTpImg, isPx, isScale, hasClass, addClass, removeClass, scrollTopTo, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey, checkTargetElement } from '../../ui/src/dom';
|
|
5
5
|
import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils';
|
|
6
6
|
import { VxeUI } from '../../ui';
|
|
7
|
-
import { createReactData, createInternalData, getRowUniqueId, clearTableAllStatus, getColumnList, toFilters, hasDeepKey, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId, getCalcHeight, getCellRestHeight, getLastChildColumn } from './util';
|
|
7
|
+
import { createReactData, createInternalData, getRowUniqueId, createRowId, clearTableAllStatus, getColumnList, toFilters, hasDeepKey, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId, getCalcHeight, getCellRestHeight, getLastChildColumn } from './util';
|
|
8
8
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
9
9
|
import { moveRowAnimateToTb, clearRowAnimate, moveColAnimateToLr, clearColAnimate } from '../../ui/src/anime';
|
|
10
10
|
import { warnLog, errLog } from '../../ui/src/log';
|
|
@@ -304,6 +304,9 @@ export default defineVxeComponent({
|
|
|
304
304
|
const computeEditOpts = computed(() => {
|
|
305
305
|
return Object.assign({}, getConfig().table.editConfig, props.editConfig);
|
|
306
306
|
});
|
|
307
|
+
const computeEditDirtyOpts = computed(() => {
|
|
308
|
+
return Object.assign({}, getConfig().table.editDirtyConfig, props.editDirtyConfig);
|
|
309
|
+
});
|
|
307
310
|
const computeSortOpts = computed(() => {
|
|
308
311
|
return Object.assign({ orders: ['asc', 'desc', null] }, getConfig().table.sortConfig, props.sortConfig);
|
|
309
312
|
});
|
|
@@ -492,6 +495,26 @@ export default defineVxeComponent({
|
|
|
492
495
|
const computeCustomOpts = computed(() => {
|
|
493
496
|
return Object.assign({}, getConfig().table.customConfig, props.customConfig);
|
|
494
497
|
});
|
|
498
|
+
const computeCustomSimpleMode = computed(() => {
|
|
499
|
+
const { minHeight, height } = props;
|
|
500
|
+
const customOpts = computeCustomOpts.value;
|
|
501
|
+
const { mode, popupOptions, placement } = customOpts;
|
|
502
|
+
if (!placement || placement === 'top-left' || placement === 'top-right') {
|
|
503
|
+
if (!(mode === 'modal' || mode === 'drawer')) {
|
|
504
|
+
const { mode } = popupOptions || {};
|
|
505
|
+
if (!mode || mode === 'auto') {
|
|
506
|
+
if (height || minHeight) {
|
|
507
|
+
return 'inside';
|
|
508
|
+
}
|
|
509
|
+
return 'outside';
|
|
510
|
+
}
|
|
511
|
+
if (mode) {
|
|
512
|
+
return mode;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
return '';
|
|
517
|
+
});
|
|
495
518
|
const computeTableRowExpandedList = computed(() => {
|
|
496
519
|
const { tableData, rowExpandedFlag, expandColumn, rowGroupExpandedFlag, treeExpandedFlag } = reactData;
|
|
497
520
|
const { visibleDataRowIdData, rowExpandedMaps } = internalData;
|
|
@@ -533,6 +556,32 @@ export default defineVxeComponent({
|
|
|
533
556
|
}
|
|
534
557
|
return false;
|
|
535
558
|
});
|
|
559
|
+
const computeKeepFields = computed(() => {
|
|
560
|
+
const { tableFullColumn } = internalData;
|
|
561
|
+
const { updateColFlag } = reactData;
|
|
562
|
+
const editDirtyOpts = computeEditDirtyOpts.value;
|
|
563
|
+
const { includeFields, excludeFields } = editDirtyOpts;
|
|
564
|
+
const kpFields = [];
|
|
565
|
+
if (updateColFlag) {
|
|
566
|
+
if (includeFields && includeFields.length) {
|
|
567
|
+
return includeFields;
|
|
568
|
+
}
|
|
569
|
+
const exfMaps = {};
|
|
570
|
+
if (excludeFields && excludeFields.length) {
|
|
571
|
+
excludeFields.forEach(field => {
|
|
572
|
+
exfMaps[field] = 1;
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
for (let i = 0; i < tableFullColumn.length; i++) {
|
|
576
|
+
const column = tableFullColumn[i];
|
|
577
|
+
const { field, type, editRender, cellRender } = column;
|
|
578
|
+
if (field && !type && (editRender || cellRender) && !exfMaps[field]) {
|
|
579
|
+
kpFields.push(field);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
return kpFields;
|
|
584
|
+
});
|
|
536
585
|
const computeTableBorder = computed(() => {
|
|
537
586
|
const { border } = props;
|
|
538
587
|
if (border === true) {
|
|
@@ -657,6 +706,7 @@ export default defineVxeComponent({
|
|
|
657
706
|
computeHeaderTooltipOpts,
|
|
658
707
|
computeFooterTooltipOpts,
|
|
659
708
|
computeEditOpts,
|
|
709
|
+
computeEditDirtyOpts,
|
|
660
710
|
computeSortOpts,
|
|
661
711
|
computeFilterOpts,
|
|
662
712
|
computeFloatingFilterOpts,
|
|
@@ -681,11 +731,13 @@ export default defineVxeComponent({
|
|
|
681
731
|
computeLoadingOpts,
|
|
682
732
|
computeCellOffsetWidth,
|
|
683
733
|
computeCustomOpts,
|
|
734
|
+
computeCustomSimpleMode,
|
|
684
735
|
computeLeftFixedWidth,
|
|
685
736
|
computeRightFixedWidth,
|
|
686
737
|
computeBodyMergeCoverFixed,
|
|
687
738
|
computeFixedColumnSize,
|
|
688
739
|
computeIsMaxFixedColumn,
|
|
740
|
+
computeKeepFields,
|
|
689
741
|
computeIsAllCheckboxDisabled,
|
|
690
742
|
computeIsHeaderRenderOptimize,
|
|
691
743
|
computeIsBodyRenderOptimize,
|
|
@@ -1325,14 +1377,18 @@ export default defineVxeComponent({
|
|
|
1325
1377
|
};
|
|
1326
1378
|
const calcTableHeight = (key) => {
|
|
1327
1379
|
const { editConfig, editRules } = props;
|
|
1328
|
-
const { parentHeight } = reactData;
|
|
1380
|
+
const { parentHeight, tableColumn } = reactData;
|
|
1329
1381
|
let val = props[key];
|
|
1330
1382
|
if (key === 'minHeight') {
|
|
1331
1383
|
const defMinHeight = getConfig().table.minHeight;
|
|
1332
1384
|
if (XEUtils.eqNull(val)) {
|
|
1333
1385
|
if (eqEmptyValue(defMinHeight)) {
|
|
1334
|
-
|
|
1335
|
-
|
|
1386
|
+
if (!tableColumn.length) {
|
|
1387
|
+
// 如果全部列被隐藏
|
|
1388
|
+
val = 40;
|
|
1389
|
+
}
|
|
1390
|
+
else if (editRules && isEnableConf(editConfig)) {
|
|
1391
|
+
// 编辑模式默认最小高度
|
|
1336
1392
|
val = 144;
|
|
1337
1393
|
}
|
|
1338
1394
|
}
|
|
@@ -1442,6 +1498,7 @@ export default defineVxeComponent({
|
|
|
1442
1498
|
const newCollectCols = XEUtils.toArrayTree(XEUtils.orderBy(allCols, 'renderSortNumber'), { key: 'id', parentKey: 'parentId', children: 'children' });
|
|
1443
1499
|
internalData.collectColumn = newCollectCols;
|
|
1444
1500
|
internalData.tableFullColumn = getColumnList(newCollectCols);
|
|
1501
|
+
reactData.updateColFlag++;
|
|
1445
1502
|
}
|
|
1446
1503
|
reactData.isCustomStatus = true;
|
|
1447
1504
|
}
|
|
@@ -1592,14 +1649,19 @@ export default defineVxeComponent({
|
|
|
1592
1649
|
else {
|
|
1593
1650
|
tableFullColumn.forEach(handleFunc);
|
|
1594
1651
|
}
|
|
1595
|
-
if (expandColumn
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1652
|
+
if (expandColumn) {
|
|
1653
|
+
if (expandOpts.mode !== 'fixed' && virtualYOpts.enabled) {
|
|
1654
|
+
warnLog('vxe.error.notConflictProp', ['column.type="expand', 'virtual-y-config.enabled=false']);
|
|
1655
|
+
}
|
|
1656
|
+
if ((expandOpts.mode !== 'fixed') && mouseOpts.area) {
|
|
1657
|
+
errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand']);
|
|
1658
|
+
}
|
|
1659
|
+
if (expandOpts.mode !== 'inside' && (treeConfig && !treeOpts.transform)) {
|
|
1660
|
+
errLog('vxe.error.notConflictProp', ['tree-config.transform=false', 'expand-config.mode=fixed']);
|
|
1661
|
+
}
|
|
1662
|
+
if (props.spanMethod) {
|
|
1663
|
+
warnLog('vxe.error.notSupportProp', ['column.type=expand', 'span-method', 'span-method=null']);
|
|
1664
|
+
}
|
|
1603
1665
|
}
|
|
1604
1666
|
if (htmlColumn) {
|
|
1605
1667
|
if (!columnOpts.useKey) {
|
|
@@ -3322,6 +3384,7 @@ export default defineVxeComponent({
|
|
|
3322
3384
|
if (rowGroups) {
|
|
3323
3385
|
const aggregateOpts = computeAggregateOpts.value;
|
|
3324
3386
|
const { rowField, parentField, childrenField, mapChildrenField } = aggregateOpts;
|
|
3387
|
+
const rowOpts = computeRowOpts.value;
|
|
3325
3388
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
3326
3389
|
const { checkField } = checkboxOpts;
|
|
3327
3390
|
const indeterminateField = checkboxOpts.indeterminateField || checkboxOpts.halfField;
|
|
@@ -3357,10 +3420,10 @@ export default defineVxeComponent({
|
|
|
3357
3420
|
childCount: 0,
|
|
3358
3421
|
[rowField]: getRowUniqueId(),
|
|
3359
3422
|
[parentField]: null,
|
|
3360
|
-
[rowkey]: getRowUniqueId(),
|
|
3361
3423
|
[childrenField]: childTreeData,
|
|
3362
3424
|
[mapChildrenField]: childTreeData
|
|
3363
3425
|
};
|
|
3426
|
+
aggRow[rowkey] = createRowId(rowOpts, aggRow, rowkey);
|
|
3364
3427
|
if (checkField) {
|
|
3365
3428
|
aggRow[checkField] = false;
|
|
3366
3429
|
}
|
|
@@ -3535,7 +3598,7 @@ export default defineVxeComponent({
|
|
|
3535
3598
|
// }
|
|
3536
3599
|
// }
|
|
3537
3600
|
if (!(props.height || props.maxHeight)) {
|
|
3538
|
-
errLog('vxe.error.
|
|
3601
|
+
errLog('vxe.error.reqSupportProp', ['virtual-y-config.enabled = true', 'height | max-height']);
|
|
3539
3602
|
}
|
|
3540
3603
|
// if (!props.showOverflow) {
|
|
3541
3604
|
// warnLog('vxe.error.reqProp', ['table.show-overflow'])
|
|
@@ -3658,8 +3721,9 @@ export default defineVxeComponent({
|
|
|
3658
3721
|
const handleUpdateColumn = () => {
|
|
3659
3722
|
const columnList = XEUtils.orderBy(internalData.collectColumn, 'renderSortNumber');
|
|
3660
3723
|
internalData.collectColumn = columnList;
|
|
3661
|
-
const
|
|
3662
|
-
internalData.tableFullColumn =
|
|
3724
|
+
const tFullColumn = getColumnList(columnList);
|
|
3725
|
+
internalData.tableFullColumn = tFullColumn;
|
|
3726
|
+
reactData.updateColFlag++;
|
|
3663
3727
|
cacheColumnMap();
|
|
3664
3728
|
};
|
|
3665
3729
|
const loadScrollXData = () => {
|
|
@@ -3842,8 +3906,9 @@ export default defineVxeComponent({
|
|
|
3842
3906
|
const handleInitColumn = (collectColumn) => {
|
|
3843
3907
|
const expandOpts = computeExpandOpts.value;
|
|
3844
3908
|
internalData.collectColumn = collectColumn;
|
|
3845
|
-
const
|
|
3846
|
-
internalData.tableFullColumn =
|
|
3909
|
+
const tFullColumn = getColumnList(collectColumn);
|
|
3910
|
+
internalData.tableFullColumn = tFullColumn;
|
|
3911
|
+
reactData.updateColFlag++;
|
|
3847
3912
|
reactData.isColLoading = true;
|
|
3848
3913
|
initColumnHierarchy();
|
|
3849
3914
|
return Promise.resolve(restoreCustomStorage()).then(() => {
|
|
@@ -4372,7 +4437,7 @@ export default defineVxeComponent({
|
|
|
4372
4437
|
const rowid = expandEl.getAttribute('rowid') || '';
|
|
4373
4438
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
4374
4439
|
if (rowRest) {
|
|
4375
|
-
const expandHeight = expandEl.offsetHeight
|
|
4440
|
+
const expandHeight = expandEl.offsetHeight;
|
|
4376
4441
|
const trEl = bodyScrollElem.querySelector(`.vxe-body--row[rowid="${rowid}"]`);
|
|
4377
4442
|
let offsetTop = 0;
|
|
4378
4443
|
if (scrollYLoad) {
|
|
@@ -5138,7 +5203,8 @@ export default defineVxeComponent({
|
|
|
5138
5203
|
*/
|
|
5139
5204
|
isUpdateByRow(rowidOrRow, field) {
|
|
5140
5205
|
const { keepSource } = props;
|
|
5141
|
-
const {
|
|
5206
|
+
const { fullDataRowIdData, sourceDataRowIdData } = internalData;
|
|
5207
|
+
const keepFields = computeKeepFields.value;
|
|
5142
5208
|
if (keepSource) {
|
|
5143
5209
|
const rowid = XEUtils.isString(rowidOrRow) || XEUtils.isNumber(rowidOrRow) ? rowidOrRow : getRowid($xeTable, rowidOrRow);
|
|
5144
5210
|
const rowRest = fullDataRowIdData[rowid];
|
|
@@ -5152,9 +5218,8 @@ export default defineVxeComponent({
|
|
|
5152
5218
|
if (arguments.length > 1) {
|
|
5153
5219
|
return !eqCellValue(oRow, row, field);
|
|
5154
5220
|
}
|
|
5155
|
-
for (let
|
|
5156
|
-
|
|
5157
|
-
if (property && !eqCellValue(oRow, row, property)) {
|
|
5221
|
+
for (let i = 0; i < keepFields.length; i++) {
|
|
5222
|
+
if (!eqCellValue(oRow, row, keepFields[i])) {
|
|
5158
5223
|
return true;
|
|
5159
5224
|
}
|
|
5160
5225
|
}
|
|
@@ -6864,8 +6929,8 @@ export default defineVxeComponent({
|
|
|
6864
6929
|
XEUtils.each(fullAllDataRowIdData, (rowRest) => {
|
|
6865
6930
|
rowRest.treeLoaded = false;
|
|
6866
6931
|
});
|
|
6932
|
+
internalData.treeExpandedMaps = {};
|
|
6867
6933
|
}
|
|
6868
|
-
internalData.treeExpandedMaps = {};
|
|
6869
6934
|
if (transform) {
|
|
6870
6935
|
handleVirtualTreeToList();
|
|
6871
6936
|
$xeTable.handleTableData();
|
|
@@ -7071,18 +7136,13 @@ export default defineVxeComponent({
|
|
|
7071
7136
|
setScrollTop(rightScrollElem, scrollTop);
|
|
7072
7137
|
loadScrollYData();
|
|
7073
7138
|
}
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
}, 30);
|
|
7082
|
-
});
|
|
7083
|
-
}
|
|
7084
|
-
return nextTick().then(() => {
|
|
7085
|
-
internalData.intoRunScroll = false;
|
|
7139
|
+
return new Promise(resolve => {
|
|
7140
|
+
setTimeout(() => {
|
|
7141
|
+
nextTick(() => {
|
|
7142
|
+
internalData.intoRunScroll = false;
|
|
7143
|
+
resolve();
|
|
7144
|
+
});
|
|
7145
|
+
}, (reactData.scrollXLoad || reactData.scrollYLoad) ? 30 : 0);
|
|
7086
7146
|
});
|
|
7087
7147
|
},
|
|
7088
7148
|
/**
|
|
@@ -7731,7 +7791,7 @@ export default defineVxeComponent({
|
|
|
7731
7791
|
$xeTable.preventEvent(evnt, 'event.keydown', null, () => {
|
|
7732
7792
|
const { mouseConfig, keyboardConfig, treeConfig, editConfig, highlightCurrentRow, highlightCurrentColumn } = props;
|
|
7733
7793
|
const { ctxMenuStore, editStore, currentRow } = reactData;
|
|
7734
|
-
const { afterFullData } = internalData;
|
|
7794
|
+
const { afterFullData, visibleColumn } = internalData;
|
|
7735
7795
|
const isContentMenu = computeIsContentMenu.value;
|
|
7736
7796
|
const bodyMenu = computeBodyMenu.value;
|
|
7737
7797
|
const keyboardOpts = computeKeyboardOpts.value;
|
|
@@ -7741,6 +7801,7 @@ export default defineVxeComponent({
|
|
|
7741
7801
|
const menuList = computeMenuList.value;
|
|
7742
7802
|
const rowOpts = computeRowOpts.value;
|
|
7743
7803
|
const columnOpts = computeColumnOpts.value;
|
|
7804
|
+
const { isLastEnterAppendRow, beforeEnterMethod, enterMethod, isLastTabAppendRow, beforeTabMethod, tabMethod } = keyboardOpts;
|
|
7744
7805
|
const { selected, actived } = editStore;
|
|
7745
7806
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
7746
7807
|
const keyCode = evnt.keyCode;
|
|
@@ -7822,7 +7883,6 @@ export default defineVxeComponent({
|
|
|
7822
7883
|
}, 1000);
|
|
7823
7884
|
}
|
|
7824
7885
|
else if (isEnter && !isAltKey && keyboardConfig && keyboardOpts.isEnter && (selected.row || actived.row || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow))) {
|
|
7825
|
-
const { isLastEnterAppendRow, beforeEnterMethod, enterMethod } = keyboardOpts;
|
|
7826
7886
|
// 退出选中
|
|
7827
7887
|
if (isControlKey) {
|
|
7828
7888
|
// 如果是激活编辑状态,则取消编辑
|
|
@@ -7840,6 +7900,8 @@ export default defineVxeComponent({
|
|
|
7840
7900
|
else {
|
|
7841
7901
|
// 如果是激活状态,退则出到上一行/下一行
|
|
7842
7902
|
if (selected.row || actived.row) {
|
|
7903
|
+
const activeRow = selected.row || actived.row;
|
|
7904
|
+
const activeColumn = selected.column || actived.column;
|
|
7843
7905
|
const activeParams = selected.row ? selected.args : actived.args;
|
|
7844
7906
|
if (hasShiftKey) {
|
|
7845
7907
|
if (keyboardOpts.enterToTab) {
|
|
@@ -7850,13 +7912,46 @@ export default defineVxeComponent({
|
|
|
7850
7912
|
}
|
|
7851
7913
|
}
|
|
7852
7914
|
else {
|
|
7915
|
+
const _rowIndex = $xeTable.getVTRowIndex(activeRow);
|
|
7916
|
+
const _columnIndex = $xeTable.getVTColumnIndex(activeColumn);
|
|
7853
7917
|
if (keyboardOpts.enterToTab) {
|
|
7854
|
-
|
|
7918
|
+
const ttrParams = {
|
|
7919
|
+
row: activeRow,
|
|
7920
|
+
rowIndex: $xeTable.getRowIndex(activeRow),
|
|
7921
|
+
$rowIndex: $xeTable.getVMRowIndex(activeRow),
|
|
7922
|
+
_rowIndex,
|
|
7923
|
+
column: activeColumn,
|
|
7924
|
+
columnIndex: $xeTable.getColumnIndex(activeColumn),
|
|
7925
|
+
$columnIndex: $xeTable.getVMColumnIndex(activeColumn),
|
|
7926
|
+
_columnIndex,
|
|
7927
|
+
$table: $xeTable
|
|
7928
|
+
};
|
|
7929
|
+
if (!beforeTabMethod || beforeTabMethod(ttrParams) !== false) {
|
|
7930
|
+
evnt.preventDefault();
|
|
7931
|
+
// 最后一行按下Tab键,自动追加一行
|
|
7932
|
+
if (isLastTabAppendRow) {
|
|
7933
|
+
const newColumn = visibleColumn[0];
|
|
7934
|
+
if (_rowIndex >= afterFullData.length - 1 && _columnIndex >= visibleColumn.length - 1) {
|
|
7935
|
+
if (actived.row) {
|
|
7936
|
+
$xeTable.handleClearEdit(evnt);
|
|
7937
|
+
}
|
|
7938
|
+
$xeTable.insertAt({}, -1).then(({ row: newRow }) => {
|
|
7939
|
+
$xeTable.scrollToRow(newRow, newColumn);
|
|
7940
|
+
$xeTable.handleSelected(Object.assign(Object.assign({}, activeParams), { row: newRow, column: newColumn }), evnt);
|
|
7941
|
+
});
|
|
7942
|
+
$xeTable.dispatchEvent('tab-append-row', ttrParams, evnt);
|
|
7943
|
+
return;
|
|
7944
|
+
}
|
|
7945
|
+
}
|
|
7946
|
+
if (tabMethod) {
|
|
7947
|
+
tabMethod(ttrParams);
|
|
7948
|
+
}
|
|
7949
|
+
else {
|
|
7950
|
+
$xeTable.moveTabSelected(activeParams, hasShiftKey, evnt);
|
|
7951
|
+
}
|
|
7952
|
+
}
|
|
7855
7953
|
}
|
|
7856
7954
|
else {
|
|
7857
|
-
const activeRow = selected.row || actived.row;
|
|
7858
|
-
const activeColumn = selected.column || actived.column;
|
|
7859
|
-
const _rowIndex = $xeTable.getVTRowIndex(activeRow);
|
|
7860
7955
|
const etrParams = {
|
|
7861
7956
|
row: activeRow,
|
|
7862
7957
|
rowIndex: $xeTable.getRowIndex(activeRow),
|
|
@@ -7865,10 +7960,11 @@ export default defineVxeComponent({
|
|
|
7865
7960
|
column: activeColumn,
|
|
7866
7961
|
columnIndex: $xeTable.getColumnIndex(activeColumn),
|
|
7867
7962
|
$columnIndex: $xeTable.getVMColumnIndex(activeColumn),
|
|
7868
|
-
_columnIndex
|
|
7963
|
+
_columnIndex,
|
|
7869
7964
|
$table: $xeTable
|
|
7870
7965
|
};
|
|
7871
7966
|
if (!beforeEnterMethod || beforeEnterMethod(etrParams) !== false) {
|
|
7967
|
+
evnt.preventDefault();
|
|
7872
7968
|
// 最后一行按下回车键,自动追加一行
|
|
7873
7969
|
if (isLastEnterAppendRow) {
|
|
7874
7970
|
if (_rowIndex >= afterFullData.length - 1) {
|
|
@@ -7880,10 +7976,15 @@ export default defineVxeComponent({
|
|
|
7880
7976
|
return;
|
|
7881
7977
|
}
|
|
7882
7978
|
}
|
|
7883
|
-
$xeTable.moveEnterSelected(activeParams, isLeftArrow, false, isRightArrow, true, evnt);
|
|
7884
7979
|
if (enterMethod) {
|
|
7885
7980
|
enterMethod(etrParams);
|
|
7886
7981
|
}
|
|
7982
|
+
else {
|
|
7983
|
+
if (actived.row) {
|
|
7984
|
+
$xeTable.handleClearEdit(evnt);
|
|
7985
|
+
}
|
|
7986
|
+
$xeTable.moveEnterSelected(activeParams, isLeftArrow, false, isRightArrow, true, evnt);
|
|
7987
|
+
}
|
|
7887
7988
|
}
|
|
7888
7989
|
}
|
|
7889
7990
|
}
|
|
@@ -7927,11 +8028,50 @@ export default defineVxeComponent({
|
|
|
7927
8028
|
}
|
|
7928
8029
|
else if (isTab && keyboardConfig && keyboardOpts.isTab) {
|
|
7929
8030
|
// 如果按下了 Tab 键切换
|
|
7930
|
-
if (selected.row ||
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
$xeTable.
|
|
8031
|
+
if (selected.row || actived.row) {
|
|
8032
|
+
const activeRow = selected.row || actived.row;
|
|
8033
|
+
const activeColumn = selected.column || actived.column;
|
|
8034
|
+
const activeParams = selected.row ? selected.args : actived.args;
|
|
8035
|
+
const _rowIndex = $xeTable.getVTRowIndex(activeRow);
|
|
8036
|
+
const _columnIndex = $xeTable.getVTColumnIndex(activeColumn);
|
|
8037
|
+
const ttrParams = {
|
|
8038
|
+
row: activeRow,
|
|
8039
|
+
rowIndex: $xeTable.getRowIndex(activeRow),
|
|
8040
|
+
$rowIndex: $xeTable.getVMRowIndex(activeRow),
|
|
8041
|
+
_rowIndex,
|
|
8042
|
+
column: activeColumn,
|
|
8043
|
+
columnIndex: $xeTable.getColumnIndex(activeColumn),
|
|
8044
|
+
$columnIndex: $xeTable.getVMColumnIndex(activeColumn),
|
|
8045
|
+
_columnIndex,
|
|
8046
|
+
$table: $xeTable
|
|
8047
|
+
};
|
|
8048
|
+
if (!beforeTabMethod || beforeTabMethod(ttrParams) !== false) {
|
|
8049
|
+
evnt.preventDefault();
|
|
8050
|
+
// 最后一行按下Tab键,自动追加一行
|
|
8051
|
+
if (isLastTabAppendRow) {
|
|
8052
|
+
const newColumn = visibleColumn[0];
|
|
8053
|
+
if (_rowIndex >= afterFullData.length - 1 && _columnIndex >= visibleColumn.length - 1) {
|
|
8054
|
+
if (actived.row) {
|
|
8055
|
+
$xeTable.handleClearEdit(evnt);
|
|
8056
|
+
}
|
|
8057
|
+
$xeTable.insertAt({}, -1).then(({ row: newRow }) => {
|
|
8058
|
+
$xeTable.scrollToRow(newRow, newColumn);
|
|
8059
|
+
$xeTable.handleSelected(Object.assign(Object.assign({}, activeParams), { row: newRow, column: newColumn }), evnt);
|
|
8060
|
+
});
|
|
8061
|
+
$xeTable.dispatchEvent('tab-append-row', ttrParams, evnt);
|
|
8062
|
+
return;
|
|
8063
|
+
}
|
|
8064
|
+
}
|
|
8065
|
+
if (tabMethod) {
|
|
8066
|
+
tabMethod(ttrParams);
|
|
8067
|
+
}
|
|
8068
|
+
else {
|
|
8069
|
+
if (actived.row) {
|
|
8070
|
+
$xeTable.handleClearEdit(evnt);
|
|
8071
|
+
}
|
|
8072
|
+
$xeTable.moveTabSelected(activeParams, hasShiftKey, evnt);
|
|
8073
|
+
}
|
|
8074
|
+
}
|
|
7935
8075
|
}
|
|
7936
8076
|
}
|
|
7937
8077
|
else if (keyboardConfig && keyboardOpts.isDel && hasDeleteKey && isEnableConf(editConfig) && (selected.row || selected.column)) {
|
|
@@ -8464,6 +8604,7 @@ export default defineVxeComponent({
|
|
|
8464
8604
|
const expandOpts = computeExpandOpts.value;
|
|
8465
8605
|
const treeOpts = computeTreeOpts.value;
|
|
8466
8606
|
const radioOpts = computeRadioOpts.value;
|
|
8607
|
+
const rowOpts = computeRowOpts.value;
|
|
8467
8608
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
8468
8609
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
8469
8610
|
const rowkey = getRowkey($xeTable);
|
|
@@ -8498,7 +8639,7 @@ export default defineVxeComponent({
|
|
|
8498
8639
|
}
|
|
8499
8640
|
// 必须有行数据的唯一主键,可以自行设置;也可以默认生成一个随机数
|
|
8500
8641
|
if (eqEmptyValue(XEUtils.get(record, rowkey))) {
|
|
8501
|
-
XEUtils.set(record, rowkey,
|
|
8642
|
+
XEUtils.set(record, rowkey, createRowId(rowOpts, record, rowkey));
|
|
8502
8643
|
}
|
|
8503
8644
|
return record;
|
|
8504
8645
|
});
|
|
@@ -10314,6 +10455,7 @@ export default defineVxeComponent({
|
|
|
10314
10455
|
// 移出源位置
|
|
10315
10456
|
if (oldRest && newRest) {
|
|
10316
10457
|
const fullList = XEUtils.toTreeArray(internalData.afterTreeFullData, {
|
|
10458
|
+
updated: false,
|
|
10317
10459
|
key: rowField,
|
|
10318
10460
|
parentKey: parentField,
|
|
10319
10461
|
children: mapChildrenField
|
|
@@ -12355,7 +12497,11 @@ export default defineVxeComponent({
|
|
|
12355
12497
|
}],
|
|
12356
12498
|
rowid,
|
|
12357
12499
|
style: cellStyle
|
|
12358
|
-
},
|
|
12500
|
+
}, [
|
|
12501
|
+
h('div', {
|
|
12502
|
+
class: 'vxe-body--row-expanded-content'
|
|
12503
|
+
}, expandColumn.renderData(expandParams))
|
|
12504
|
+
]));
|
|
12359
12505
|
});
|
|
12360
12506
|
}
|
|
12361
12507
|
return h('div', {
|
|
@@ -12536,6 +12682,8 @@ export default defineVxeComponent({
|
|
|
12536
12682
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
12537
12683
|
const scrollbarXToTop = computeScrollbarXToTop.value;
|
|
12538
12684
|
const scrollbarYToLeft = computeScrollbarYToLeft.value;
|
|
12685
|
+
const customSimpleMode = computeCustomSimpleMode.value;
|
|
12686
|
+
const showCustomSimpleOutside = customSimpleMode === 'outside';
|
|
12539
12687
|
const { isCrossTableDrag } = rowDragOpts;
|
|
12540
12688
|
const tbOns = {
|
|
12541
12689
|
onKeydown: keydownEvent,
|
|
@@ -12679,7 +12827,7 @@ export default defineVxeComponent({
|
|
|
12679
12827
|
/**
|
|
12680
12828
|
* 自定义列
|
|
12681
12829
|
*/
|
|
12682
|
-
initStore.custom
|
|
12830
|
+
!showCustomSimpleOutside && initStore.custom
|
|
12683
12831
|
? h(TableCustomPanelComponent, {
|
|
12684
12832
|
key: 'cs',
|
|
12685
12833
|
ref: refTableCustom,
|
|
@@ -12725,6 +12873,16 @@ export default defineVxeComponent({
|
|
|
12725
12873
|
h('div', {
|
|
12726
12874
|
ref: refPopupWrapperElem
|
|
12727
12875
|
}, [
|
|
12876
|
+
/**
|
|
12877
|
+
* 自定义列
|
|
12878
|
+
*/
|
|
12879
|
+
showCustomSimpleOutside && initStore.custom
|
|
12880
|
+
? h(TableCustomPanelComponent, {
|
|
12881
|
+
key: 'cs',
|
|
12882
|
+
ref: refTableCustom,
|
|
12883
|
+
customStore
|
|
12884
|
+
})
|
|
12885
|
+
: renderEmptyElement($xeTable),
|
|
12728
12886
|
/**
|
|
12729
12887
|
* 筛选
|
|
12730
12888
|
*/
|
|
@@ -13022,6 +13180,21 @@ export default defineVxeComponent({
|
|
|
13022
13180
|
});
|
|
13023
13181
|
}
|
|
13024
13182
|
});
|
|
13183
|
+
const kfFlag = ref(0);
|
|
13184
|
+
watch(() => reactData.updateColFlag, () => {
|
|
13185
|
+
kfFlag.value++;
|
|
13186
|
+
});
|
|
13187
|
+
watch(computeKeepFields, () => {
|
|
13188
|
+
kfFlag.value++;
|
|
13189
|
+
});
|
|
13190
|
+
watch(kfFlag, () => {
|
|
13191
|
+
const keepFields = computeKeepFields.value;
|
|
13192
|
+
const kpfMaps = {};
|
|
13193
|
+
keepFields.forEach(field => {
|
|
13194
|
+
kpfMaps[field] = 1;
|
|
13195
|
+
});
|
|
13196
|
+
internalData.keepUpdateFieldMaps = kpfMaps;
|
|
13197
|
+
});
|
|
13025
13198
|
if ($xeTabs) {
|
|
13026
13199
|
watch(() => $xeTabs ? $xeTabs.reactData.resizeFlag : null, () => {
|
|
13027
13200
|
handleGlobalResizeEvent();
|
|
@@ -13053,9 +13226,10 @@ export default defineVxeComponent({
|
|
|
13053
13226
|
$xeTable.preventEvent(null, 'deactivated', { $table: $xeTable });
|
|
13054
13227
|
});
|
|
13055
13228
|
onMounted(() => {
|
|
13056
|
-
const { exportConfig, importConfig, treeConfig } = props;
|
|
13229
|
+
const { exportConfig, importConfig, treeConfig, minHeight } = props;
|
|
13057
13230
|
const { scrollXStore, scrollYStore } = internalData;
|
|
13058
13231
|
const columnOpts = computeColumnOpts.value;
|
|
13232
|
+
const columnDragOpts = computeColumnDragOpts.value;
|
|
13059
13233
|
const aggregateOpts = computeAggregateOpts.value;
|
|
13060
13234
|
const virtualYOpts = computeVirtualYOpts.value;
|
|
13061
13235
|
const editOpts = computeEditOpts.value;
|
|
@@ -13072,6 +13246,7 @@ export default defineVxeComponent({
|
|
|
13072
13246
|
// const currentColumnOpts = computeCurrentColumnOpts.value
|
|
13073
13247
|
// const keyboardOpts = computeKeyboardOpts.value
|
|
13074
13248
|
const rowDragOpts = computeRowDragOpts.value;
|
|
13249
|
+
const areaOpts = computeAreaOpts.value;
|
|
13075
13250
|
const { groupFields } = aggregateOpts;
|
|
13076
13251
|
if ($xeGantt) {
|
|
13077
13252
|
const { refClassifyWrapperElem } = $xeGantt.getRefMaps();
|
|
@@ -13179,6 +13354,9 @@ export default defineVxeComponent({
|
|
|
13179
13354
|
errLog('vxe.error.notProp', ['mouse-config.area']);
|
|
13180
13355
|
return;
|
|
13181
13356
|
}
|
|
13357
|
+
if (mouseOpts.area && areaOpts.selectCellByHeader && columnOpts.drag && columnDragOpts.trigger === 'cell') {
|
|
13358
|
+
errLog('vxe.error.notSupportProp', ['area-config.selectCellByHeader & column-config.drag', 'column-drag-config.trigger=cell', 'column-drag-config.trigger=default | area-config.selectCellByHeader=false']);
|
|
13359
|
+
}
|
|
13182
13360
|
}
|
|
13183
13361
|
if (!$xeTable.handlePivotTableAggregateData) {
|
|
13184
13362
|
if (customOpts.allowGroup) {
|
|
@@ -13232,6 +13410,9 @@ export default defineVxeComponent({
|
|
|
13232
13410
|
if (checkboxOpts.halfField) {
|
|
13233
13411
|
warnLog('vxe.error.delProp', ['checkbox-config.halfField', 'checkbox-config.indeterminateField']);
|
|
13234
13412
|
}
|
|
13413
|
+
if (props.editConfig && isEnableConf(editOpts) && props.editRules && (minHeight === 0 || minHeight === '0')) {
|
|
13414
|
+
warnLog('vxe.error.reqSupportProp', ['edit-config & edit-rules', 'min-height']);
|
|
13415
|
+
}
|
|
13235
13416
|
if (treeConfig) {
|
|
13236
13417
|
XEUtils.arrayEach(['rowField', 'parentField', 'childrenField', 'hasChildField', 'mapChildrenField'], key => {
|
|
13237
13418
|
const val = treeOpts[key];
|
|
@@ -13352,10 +13533,10 @@ export default defineVxeComponent({
|
|
|
13352
13533
|
globalEvents.off($xeTable, 'contextmenu');
|
|
13353
13534
|
$xeTable.preventEvent(null, 'beforeUnmount', { $table: $xeTable });
|
|
13354
13535
|
XEUtils.assign(reactData, createReactData());
|
|
13536
|
+
XEUtils.assign(internalData, createInternalData());
|
|
13355
13537
|
});
|
|
13356
13538
|
onUnmounted(() => {
|
|
13357
13539
|
$xeTable.preventEvent(null, 'unmounted', { $table: $xeTable });
|
|
13358
|
-
XEUtils.assign(internalData, createInternalData());
|
|
13359
13540
|
});
|
|
13360
13541
|
nextTick(() => {
|
|
13361
13542
|
if (props.loading) {
|