vxe-table 4.7.5 → 4.7.7
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 +10 -9
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/hook.js +8 -15
- package/es/table/module/custom/panel.js +166 -102
- package/es/table/module/edit/hook.js +11 -10
- package/es/table/module/export/hook.js +31 -11
- package/es/table/module/validator/hook.js +6 -5
- package/es/table/render/index.js +3 -2
- package/es/table/src/columnInfo.js +10 -8
- package/es/table/src/table.js +143 -85
- package/es/table/style.css +49 -12
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +12 -11
- package/es/ui/index.js +6 -3
- package/es/ui/src/log.js +5 -0
- package/es/vxe-table/style.css +49 -12
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +9 -9
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +348 -206
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/hook.js +8 -17
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +96 -42
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +10 -10
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/hook.js +33 -12
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/module/validator/hook.js +6 -6
- package/lib/table/module/validator/hook.min.js +1 -1
- package/lib/table/render/index.js +3 -3
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/columnInfo.js +10 -9
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/table.js +149 -85
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +49 -12
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +11 -11
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +6 -3
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +13 -0
- package/lib/ui/src/log.min.js +1 -0
- package/lib/vxe-table/style/style.css +49 -12
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +10 -9
- package/packages/table/module/custom/hook.ts +10 -17
- package/packages/table/module/custom/panel.ts +166 -104
- package/packages/table/module/edit/hook.ts +11 -10
- package/packages/table/module/export/hook.ts +35 -13
- package/packages/table/module/validator/hook.ts +6 -5
- package/packages/table/render/index.ts +3 -2
- package/packages/table/src/columnInfo.ts +11 -8
- package/packages/table/src/table.ts +142 -85
- package/packages/toolbar/src/toolbar.ts +12 -11
- package/packages/ui/index.ts +4 -1
- package/packages/ui/src/log.ts +8 -0
- package/styles/components/table-module/custom.scss +45 -9
- package/styles/components/table.scss +1 -0
package/es/table/src/table.js
CHANGED
|
@@ -11,12 +11,13 @@ import tableProps from './props';
|
|
|
11
11
|
import tableEmits from './emits';
|
|
12
12
|
import { getRowUniqueId, clearTableAllStatus, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, restoreScrollListener, getRootColumn } from './util';
|
|
13
13
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
14
|
+
import { warnLog, errLog } from '../../ui/src/log';
|
|
14
15
|
import TableCustomPanelComponent from '../module/custom/panel';
|
|
15
16
|
import TableFilterPanelComponent from '../module/filter/panel';
|
|
16
17
|
import TableImportPanelComponent from '../module/export/import-panel';
|
|
17
18
|
import TableExportPanelComponent from '../module/export/export-panel';
|
|
18
19
|
import TableMenuPanelComponent from '../module/menu/panel';
|
|
19
|
-
const { getConfig, getI18n, renderer, formats, createEvent, globalResize, interceptor, hooks, globalEvents, GLOBAL_EVENT_KEYS,
|
|
20
|
+
const { getConfig, getI18n, renderer, formats, createEvent, globalResize, interceptor, hooks, globalEvents, GLOBAL_EVENT_KEYS, useFns } = VxeUI;
|
|
20
21
|
const isWebkit = browse['-webkit'] && !browse.edge;
|
|
21
22
|
const resizableStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_WIDTH';
|
|
22
23
|
const visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
|
|
@@ -715,7 +716,7 @@ export default defineComponent({
|
|
|
715
716
|
merges = [merges];
|
|
716
717
|
}
|
|
717
718
|
if (treeConfig && merges.length) {
|
|
718
|
-
|
|
719
|
+
errLog('vxe.error.noTree', ['merge-cells | merge-footer-items']);
|
|
719
720
|
}
|
|
720
721
|
merges.forEach((item) => {
|
|
721
722
|
let { row, col, rowspan, colspan } = item;
|
|
@@ -765,7 +766,7 @@ export default defineComponent({
|
|
|
765
766
|
merges = [merges];
|
|
766
767
|
}
|
|
767
768
|
if (treeConfig && merges.length) {
|
|
768
|
-
|
|
769
|
+
errLog('vxe.error.noTree', ['merge-cells | merge-footer-items']);
|
|
769
770
|
}
|
|
770
771
|
merges.forEach((item) => {
|
|
771
772
|
let { row, col } = item;
|
|
@@ -830,7 +831,7 @@ export default defineComponent({
|
|
|
830
831
|
if (customConfig && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
|
|
831
832
|
const customMap = {};
|
|
832
833
|
if (!id) {
|
|
833
|
-
|
|
834
|
+
errLog('vxe.error.reqProp', ['id']);
|
|
834
835
|
return;
|
|
835
836
|
}
|
|
836
837
|
// 自定义列宽
|
|
@@ -959,7 +960,7 @@ export default defineComponent({
|
|
|
959
960
|
if (field) {
|
|
960
961
|
if (process.env.NODE_ENV === 'development') {
|
|
961
962
|
if (fullColumnFieldData[field]) {
|
|
962
|
-
|
|
963
|
+
warnLog('vxe.error.colRepet', ['field', field]);
|
|
963
964
|
}
|
|
964
965
|
}
|
|
965
966
|
fullColumnFieldData[field] = rest;
|
|
@@ -973,7 +974,7 @@ export default defineComponent({
|
|
|
973
974
|
if (treeNode) {
|
|
974
975
|
if (process.env.NODE_ENV === 'development') {
|
|
975
976
|
if (treeNodeColumn) {
|
|
976
|
-
|
|
977
|
+
warnLog('vxe.error.colRepet', ['tree-node', treeNode]);
|
|
977
978
|
}
|
|
978
979
|
}
|
|
979
980
|
if (!treeNodeColumn) {
|
|
@@ -983,7 +984,7 @@ export default defineComponent({
|
|
|
983
984
|
else if (type === 'expand') {
|
|
984
985
|
if (process.env.NODE_ENV === 'development') {
|
|
985
986
|
if (expandColumn) {
|
|
986
|
-
|
|
987
|
+
warnLog('vxe.error.colRepet', ['type', type]);
|
|
987
988
|
}
|
|
988
989
|
}
|
|
989
990
|
if (!expandColumn) {
|
|
@@ -993,7 +994,7 @@ export default defineComponent({
|
|
|
993
994
|
if (process.env.NODE_ENV === 'development') {
|
|
994
995
|
if (type === 'checkbox') {
|
|
995
996
|
if (checkboxColumn) {
|
|
996
|
-
|
|
997
|
+
warnLog('vxe.error.colRepet', ['type', type]);
|
|
997
998
|
}
|
|
998
999
|
if (!checkboxColumn) {
|
|
999
1000
|
checkboxColumn = column;
|
|
@@ -1001,7 +1002,7 @@ export default defineComponent({
|
|
|
1001
1002
|
}
|
|
1002
1003
|
else if (type === 'radio') {
|
|
1003
1004
|
if (radioColumn) {
|
|
1004
|
-
|
|
1005
|
+
warnLog('vxe.error.colRepet', ['type', type]);
|
|
1005
1006
|
}
|
|
1006
1007
|
if (!radioColumn) {
|
|
1007
1008
|
radioColumn = column;
|
|
@@ -1012,7 +1013,7 @@ export default defineComponent({
|
|
|
1012
1013
|
isAllOverflow = false;
|
|
1013
1014
|
}
|
|
1014
1015
|
if (fullColumnIdData[colid]) {
|
|
1015
|
-
|
|
1016
|
+
errLog('vxe.error.colRepet', ['colId', colid]);
|
|
1016
1017
|
}
|
|
1017
1018
|
fullColumnIdData[colid] = rest;
|
|
1018
1019
|
};
|
|
@@ -1027,16 +1028,16 @@ export default defineComponent({
|
|
|
1027
1028
|
}
|
|
1028
1029
|
if (process.env.NODE_ENV === 'development') {
|
|
1029
1030
|
if (expandColumn && mouseOpts.area) {
|
|
1030
|
-
|
|
1031
|
+
errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand']);
|
|
1031
1032
|
}
|
|
1032
1033
|
}
|
|
1033
1034
|
if (process.env.NODE_ENV === 'development') {
|
|
1034
1035
|
if (htmlColumn) {
|
|
1035
1036
|
if (!columnOpts.useKey) {
|
|
1036
|
-
|
|
1037
|
+
errLog('vxe.error.reqProp', ['column-config.useKey', 'column.type=html']);
|
|
1037
1038
|
}
|
|
1038
1039
|
if (!rowOpts.useKey) {
|
|
1039
|
-
|
|
1040
|
+
errLog('vxe.error.reqProp', ['row-config.useKey', 'column.type=html']);
|
|
1040
1041
|
}
|
|
1041
1042
|
}
|
|
1042
1043
|
}
|
|
@@ -2179,23 +2180,23 @@ export default defineComponent({
|
|
|
2179
2180
|
// 树结构自动转换
|
|
2180
2181
|
if (process.env.NODE_ENV === 'development') {
|
|
2181
2182
|
if (!treeOpts.rowField) {
|
|
2182
|
-
|
|
2183
|
+
errLog('vxe.error.reqProp', ['tree-config.rowField']);
|
|
2183
2184
|
}
|
|
2184
2185
|
if (!treeOpts.parentField) {
|
|
2185
|
-
|
|
2186
|
+
errLog('vxe.error.reqProp', ['tree-config.parentField']);
|
|
2186
2187
|
}
|
|
2187
2188
|
if (!childrenField) {
|
|
2188
|
-
|
|
2189
|
+
errLog('vxe.error.reqProp', ['tree-config.childrenField']);
|
|
2189
2190
|
}
|
|
2190
2191
|
if (!treeOpts.mapChildrenField) {
|
|
2191
|
-
|
|
2192
|
+
errLog('vxe.error.reqProp', ['tree-config.mapChildrenField']);
|
|
2192
2193
|
}
|
|
2193
2194
|
if (childrenField === treeOpts.mapChildrenField) {
|
|
2194
|
-
|
|
2195
|
+
errLog('vxe.error.errConflicts', ['tree-config.childrenField', 'tree-config.mapChildrenField']);
|
|
2195
2196
|
}
|
|
2196
2197
|
// fullData.forEach(row => {
|
|
2197
2198
|
// if (row[treeOpts.children] && row[treeOpts.children].length) {
|
|
2198
|
-
//
|
|
2199
|
+
// warnLog('vxe.error.errConflicts', ['tree-config.transform', `row.${treeOpts.children}`])
|
|
2199
2200
|
// }
|
|
2200
2201
|
// })
|
|
2201
2202
|
}
|
|
@@ -2234,13 +2235,13 @@ export default defineComponent({
|
|
|
2234
2235
|
if (process.env.NODE_ENV === 'development') {
|
|
2235
2236
|
if (sYLoad) {
|
|
2236
2237
|
if (!(props.height || props.maxHeight)) {
|
|
2237
|
-
|
|
2238
|
+
errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}']);
|
|
2238
2239
|
}
|
|
2239
2240
|
if (!props.showOverflow) {
|
|
2240
|
-
|
|
2241
|
+
warnLog('vxe.error.reqProp', ['table.show-overflow']);
|
|
2241
2242
|
}
|
|
2242
2243
|
if (props.spanMethod) {
|
|
2243
|
-
|
|
2244
|
+
warnLog('vxe.error.scrollErrProp', ['table.span-method']);
|
|
2244
2245
|
}
|
|
2245
2246
|
}
|
|
2246
2247
|
}
|
|
@@ -2370,7 +2371,7 @@ export default defineComponent({
|
|
|
2370
2371
|
column.fixed = parent.fixed;
|
|
2371
2372
|
}
|
|
2372
2373
|
if (parent && column.fixed !== parent.fixed) {
|
|
2373
|
-
|
|
2374
|
+
errLog('vxe.error.groupFixed');
|
|
2374
2375
|
}
|
|
2375
2376
|
if (isColGroup) {
|
|
2376
2377
|
column.visible = !!XEUtils.findTree(column.children, (subColumn) => hasChildrenList(subColumn) ? false : subColumn.visible);
|
|
@@ -2426,16 +2427,16 @@ export default defineComponent({
|
|
|
2426
2427
|
if (scrollXLoad) {
|
|
2427
2428
|
if (process.env.NODE_ENV === 'development') {
|
|
2428
2429
|
// if (props.showHeader && !props.showHeaderOverflow) {
|
|
2429
|
-
//
|
|
2430
|
+
// warnLog('vxe.error.reqProp', ['show-header-overflow'])
|
|
2430
2431
|
// }
|
|
2431
2432
|
// if (props.showFooter && !props.showFooterOverflow) {
|
|
2432
|
-
//
|
|
2433
|
+
// warnLog('vxe.error.reqProp', ['show-footer-overflow'])
|
|
2433
2434
|
// }
|
|
2434
2435
|
if (props.spanMethod) {
|
|
2435
|
-
|
|
2436
|
+
warnLog('vxe.error.scrollErrProp', ['span-method']);
|
|
2436
2437
|
}
|
|
2437
2438
|
if (props.footerSpanMethod) {
|
|
2438
|
-
|
|
2439
|
+
warnLog('vxe.error.scrollErrProp', ['footer-span-method']);
|
|
2439
2440
|
}
|
|
2440
2441
|
}
|
|
2441
2442
|
const { visibleSize } = computeVirtualX();
|
|
@@ -2491,7 +2492,7 @@ export default defineComponent({
|
|
|
2491
2492
|
tablePrivateMethods.handleTableData(true);
|
|
2492
2493
|
if (process.env.NODE_ENV === 'development') {
|
|
2493
2494
|
if ((reactData.scrollXLoad || reactData.scrollYLoad) && reactData.expandColumn) {
|
|
2494
|
-
|
|
2495
|
+
warnLog('vxe.error.scrollErrProp', ['column.type=expand']);
|
|
2495
2496
|
}
|
|
2496
2497
|
}
|
|
2497
2498
|
return nextTick().then(() => {
|
|
@@ -2660,7 +2661,7 @@ export default defineComponent({
|
|
|
2660
2661
|
* 对于某些特殊的场景,比如深层树节点元素发生变动时可能会用到
|
|
2661
2662
|
*/
|
|
2662
2663
|
syncData() {
|
|
2663
|
-
|
|
2664
|
+
warnLog('vxe.error.delFunc', ['syncData', 'getData']);
|
|
2664
2665
|
return nextTick().then(() => {
|
|
2665
2666
|
reactData.tableData = [];
|
|
2666
2667
|
emit('update:data', internalData.tableFullData);
|
|
@@ -2772,7 +2773,7 @@ export default defineComponent({
|
|
|
2772
2773
|
}
|
|
2773
2774
|
else {
|
|
2774
2775
|
if (process.env.NODE_ENV === 'development') {
|
|
2775
|
-
|
|
2776
|
+
warnLog('vxe.error.reqProp', ['keep-source']);
|
|
2776
2777
|
}
|
|
2777
2778
|
}
|
|
2778
2779
|
return nextTick();
|
|
@@ -2937,7 +2938,7 @@ export default defineComponent({
|
|
|
2937
2938
|
const { tableSourceData, sourceDataRowIdData } = internalData;
|
|
2938
2939
|
if (!keepSource) {
|
|
2939
2940
|
if (process.env.NODE_ENV === 'development') {
|
|
2940
|
-
|
|
2941
|
+
warnLog('vxe.error.reqProp', ['keep-source']);
|
|
2941
2942
|
}
|
|
2942
2943
|
return nextTick();
|
|
2943
2944
|
}
|
|
@@ -3297,6 +3298,7 @@ export default defineComponent({
|
|
|
3297
3298
|
if (!checkMethod || checkMethod({ column })) {
|
|
3298
3299
|
column.visible = column.defaultVisible;
|
|
3299
3300
|
}
|
|
3301
|
+
column.renderResizeWidth = column.renderWidth;
|
|
3300
3302
|
});
|
|
3301
3303
|
if (opts.resizable) {
|
|
3302
3304
|
tablePrivateMethods.saveCustomResizable(true);
|
|
@@ -3928,7 +3930,7 @@ export default defineComponent({
|
|
|
3928
3930
|
},
|
|
3929
3931
|
reloadExpandContent(row) {
|
|
3930
3932
|
if (process.env.NODE_ENV === 'development') {
|
|
3931
|
-
|
|
3933
|
+
warnLog('vxe.error.delFunc', ['reloadExpandContent', 'reloadRowExpand']);
|
|
3932
3934
|
}
|
|
3933
3935
|
// 即将废弃
|
|
3934
3936
|
return tableMethods.reloadRowExpand(row);
|
|
@@ -4026,7 +4028,7 @@ export default defineComponent({
|
|
|
4026
4028
|
isExpandByRow(row) {
|
|
4027
4029
|
// 已废弃
|
|
4028
4030
|
if (process.env.NODE_ENV === 'development') {
|
|
4029
|
-
|
|
4031
|
+
warnLog('vxe.error.delFunc', ['isExpandByRow', 'isRowExpandByRow']);
|
|
4030
4032
|
}
|
|
4031
4033
|
return tableMethods.isRowExpandByRow(row);
|
|
4032
4034
|
},
|
|
@@ -4124,7 +4126,7 @@ export default defineComponent({
|
|
|
4124
4126
|
},
|
|
4125
4127
|
reloadTreeChilds(row) {
|
|
4126
4128
|
if (process.env.NODE_ENV === 'development') {
|
|
4127
|
-
|
|
4129
|
+
warnLog('vxe.error.delFunc', ['reloadTreeChilds', 'reloadTreeExpand']);
|
|
4128
4130
|
}
|
|
4129
4131
|
// 即将废弃
|
|
4130
4132
|
return tableMethods.reloadTreeExpand(row);
|
|
@@ -4380,7 +4382,7 @@ export default defineComponent({
|
|
|
4380
4382
|
*/
|
|
4381
4383
|
setMergeCells(merges) {
|
|
4382
4384
|
if (props.spanMethod) {
|
|
4383
|
-
|
|
4385
|
+
errLog('vxe.error.errConflicts', ['merge-cells', 'span-method']);
|
|
4384
4386
|
}
|
|
4385
4387
|
setMerges(merges, reactData.mergeList, internalData.afterFullData);
|
|
4386
4388
|
return nextTick().then(() => {
|
|
@@ -4394,7 +4396,7 @@ export default defineComponent({
|
|
|
4394
4396
|
*/
|
|
4395
4397
|
removeMergeCells(merges) {
|
|
4396
4398
|
if (props.spanMethod) {
|
|
4397
|
-
|
|
4399
|
+
errLog('vxe.error.errConflicts', ['merge-cells', 'span-method']);
|
|
4398
4400
|
}
|
|
4399
4401
|
const rest = removeMerges(merges, reactData.mergeList, internalData.afterFullData);
|
|
4400
4402
|
return nextTick().then(() => {
|
|
@@ -4420,7 +4422,7 @@ export default defineComponent({
|
|
|
4420
4422
|
},
|
|
4421
4423
|
setMergeFooterItems(merges) {
|
|
4422
4424
|
if (props.footerSpanMethod) {
|
|
4423
|
-
|
|
4425
|
+
errLog('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
|
|
4424
4426
|
}
|
|
4425
4427
|
setMerges(merges, reactData.mergeFooterList);
|
|
4426
4428
|
return nextTick().then(() => {
|
|
@@ -4430,7 +4432,7 @@ export default defineComponent({
|
|
|
4430
4432
|
},
|
|
4431
4433
|
removeMergeFooterItems(merges) {
|
|
4432
4434
|
if (props.footerSpanMethod) {
|
|
4433
|
-
|
|
4435
|
+
errLog('vxe.error.errConflicts', ['merge-footer-items', 'footer-span-method']);
|
|
4434
4436
|
}
|
|
4435
4437
|
const rest = removeMerges(merges, reactData.mergeFooterList);
|
|
4436
4438
|
return nextTick().then(() => {
|
|
@@ -4462,6 +4464,64 @@ export default defineComponent({
|
|
|
4462
4464
|
}
|
|
4463
4465
|
return nextTick();
|
|
4464
4466
|
},
|
|
4467
|
+
getCustomStoreData() {
|
|
4468
|
+
const { id } = props;
|
|
4469
|
+
const customOpts = computeCustomOpts.value;
|
|
4470
|
+
const { collectColumn } = internalData;
|
|
4471
|
+
const { checkMethod } = customOpts;
|
|
4472
|
+
const resizableData = {};
|
|
4473
|
+
const sortData = {};
|
|
4474
|
+
const visibleData = {};
|
|
4475
|
+
const fixedData = {};
|
|
4476
|
+
const storeData = {
|
|
4477
|
+
resizableData,
|
|
4478
|
+
sortData,
|
|
4479
|
+
visibleData,
|
|
4480
|
+
fixedData
|
|
4481
|
+
};
|
|
4482
|
+
if (!id) {
|
|
4483
|
+
errLog('vxe.error.reqProp', ['id']);
|
|
4484
|
+
return storeData;
|
|
4485
|
+
}
|
|
4486
|
+
XEUtils.eachTree(collectColumn, (column, index, items, path, parent) => {
|
|
4487
|
+
// 排序只支持一级
|
|
4488
|
+
if (!parent) {
|
|
4489
|
+
collectColumn.forEach((column) => {
|
|
4490
|
+
const colKey = column.getKey();
|
|
4491
|
+
if (colKey) {
|
|
4492
|
+
sortData[colKey] = column.renderSortNumber;
|
|
4493
|
+
}
|
|
4494
|
+
});
|
|
4495
|
+
}
|
|
4496
|
+
if (column.resizeWidth) {
|
|
4497
|
+
const colKey = column.getKey();
|
|
4498
|
+
if (colKey) {
|
|
4499
|
+
resizableData[colKey] = column.renderWidth;
|
|
4500
|
+
}
|
|
4501
|
+
}
|
|
4502
|
+
if (column.fixed && column.fixed !== column.defaultFixed) {
|
|
4503
|
+
const colKey = column.getKey();
|
|
4504
|
+
if (colKey) {
|
|
4505
|
+
fixedData[colKey] = column.fixed;
|
|
4506
|
+
}
|
|
4507
|
+
}
|
|
4508
|
+
if (!checkMethod || checkMethod({ column })) {
|
|
4509
|
+
if (!column.visible && column.defaultVisible) {
|
|
4510
|
+
const colKey = column.getKey();
|
|
4511
|
+
if (colKey) {
|
|
4512
|
+
visibleData[colKey] = false;
|
|
4513
|
+
}
|
|
4514
|
+
}
|
|
4515
|
+
else if (column.visible && !column.defaultVisible) {
|
|
4516
|
+
const colKey = column.getKey();
|
|
4517
|
+
if (colKey) {
|
|
4518
|
+
visibleData[colKey] = true;
|
|
4519
|
+
}
|
|
4520
|
+
}
|
|
4521
|
+
}
|
|
4522
|
+
});
|
|
4523
|
+
return storeData;
|
|
4524
|
+
},
|
|
4465
4525
|
focus() {
|
|
4466
4526
|
internalData.isActivated = true;
|
|
4467
4527
|
return nextTick();
|
|
@@ -4480,7 +4540,7 @@ export default defineComponent({
|
|
|
4480
4540
|
$xeToolbar.syncUpdate({ collectColumn: internalData.collectColumn, $table: $xeTable });
|
|
4481
4541
|
}
|
|
4482
4542
|
else {
|
|
4483
|
-
|
|
4543
|
+
errLog('vxe.error.barUnableLink');
|
|
4484
4544
|
}
|
|
4485
4545
|
return nextTick();
|
|
4486
4546
|
}
|
|
@@ -5283,7 +5343,7 @@ export default defineComponent({
|
|
|
5283
5343
|
const columnWidthStorageMap = getCustomStorageMap(resizableStorageKey);
|
|
5284
5344
|
let columnWidthStorage;
|
|
5285
5345
|
if (!id) {
|
|
5286
|
-
|
|
5346
|
+
errLog('vxe.error.reqProp', ['id']);
|
|
5287
5347
|
return;
|
|
5288
5348
|
}
|
|
5289
5349
|
if (!isReset) {
|
|
@@ -5313,18 +5373,16 @@ export default defineComponent({
|
|
|
5313
5373
|
const columnSortStorageMap = getCustomStorageMap(sortStorageKey);
|
|
5314
5374
|
let columnWidthStorage;
|
|
5315
5375
|
if (!id) {
|
|
5316
|
-
|
|
5376
|
+
errLog('vxe.error.reqProp', ['id']);
|
|
5317
5377
|
return;
|
|
5318
5378
|
}
|
|
5319
5379
|
if (!isReset) {
|
|
5320
5380
|
columnWidthStorage = XEUtils.isPlainObject(columnSortStorageMap[id]) ? columnSortStorageMap[id] : {};
|
|
5321
5381
|
// 排序只支持一级
|
|
5322
5382
|
collectColumn.forEach((column) => {
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
columnWidthStorage[colKey] = column.renderSortNumber;
|
|
5327
|
-
}
|
|
5383
|
+
const colKey = column.getKey();
|
|
5384
|
+
if (colKey) {
|
|
5385
|
+
columnWidthStorage[colKey] = column.renderSortNumber;
|
|
5328
5386
|
}
|
|
5329
5387
|
});
|
|
5330
5388
|
}
|
|
@@ -5344,7 +5402,7 @@ export default defineComponent({
|
|
|
5344
5402
|
const columnFixedStorageMap = getCustomStorageMap(fixedStorageKey);
|
|
5345
5403
|
const colFixeds = [];
|
|
5346
5404
|
if (!id) {
|
|
5347
|
-
|
|
5405
|
+
errLog('vxe.error.reqProp', ['id']);
|
|
5348
5406
|
return;
|
|
5349
5407
|
}
|
|
5350
5408
|
XEUtils.eachTree(collectColumn, (column) => {
|
|
@@ -5372,7 +5430,7 @@ export default defineComponent({
|
|
|
5372
5430
|
const colHides = [];
|
|
5373
5431
|
const colShows = [];
|
|
5374
5432
|
if (!id) {
|
|
5375
|
-
|
|
5433
|
+
errLog('vxe.error.reqProp', ['id']);
|
|
5376
5434
|
return;
|
|
5377
5435
|
}
|
|
5378
5436
|
XEUtils.eachTree(collectColumn, (column) => {
|
|
@@ -5424,7 +5482,7 @@ export default defineComponent({
|
|
|
5424
5482
|
evntList = interceptor.get('event.clearActived');
|
|
5425
5483
|
if (process.env.NODE_ENV === 'development') {
|
|
5426
5484
|
if (evntList.length) {
|
|
5427
|
-
|
|
5485
|
+
warnLog('vxe.error.delEvent', ['event.clearActived', 'event.clearEdit']);
|
|
5428
5486
|
}
|
|
5429
5487
|
}
|
|
5430
5488
|
}
|
|
@@ -6354,12 +6412,12 @@ export default defineComponent({
|
|
|
6354
6412
|
if (process.env.NODE_ENV === 'development') {
|
|
6355
6413
|
'openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',').forEach(name => {
|
|
6356
6414
|
$xeTable[name] = function () {
|
|
6357
|
-
|
|
6415
|
+
errLog('vxe.error.reqModule', ['VxeTableExportModule']);
|
|
6358
6416
|
};
|
|
6359
6417
|
});
|
|
6360
6418
|
'clearValidate,fullValidate,validate'.split(',').forEach(name => {
|
|
6361
6419
|
$xeTable[name] = function () {
|
|
6362
|
-
|
|
6420
|
+
errLog('vxe.error.reqModule', ['VxeTableValidatorModule']);
|
|
6363
6421
|
};
|
|
6364
6422
|
});
|
|
6365
6423
|
}
|
|
@@ -6451,10 +6509,10 @@ export default defineComponent({
|
|
|
6451
6509
|
// const checkboxOpts = computeCheckboxOpts.value
|
|
6452
6510
|
// const checkboxColumn = internalData.tableFullColumn.find(column => column.type === 'checkbox')
|
|
6453
6511
|
// if (checkboxColumn && internalData.tableFullData.length > 300 && !checkboxOpts.checkField) {
|
|
6454
|
-
//
|
|
6512
|
+
// warnLog('vxe.error.checkProp', ['checkbox-config.checkField'])
|
|
6455
6513
|
// }
|
|
6456
6514
|
if ((scrollXLoad || scrollYLoad) && expandColumn) {
|
|
6457
|
-
|
|
6515
|
+
warnLog('vxe.error.scrollErrProp', ['column.type=expand']);
|
|
6458
6516
|
}
|
|
6459
6517
|
}
|
|
6460
6518
|
tableMethods.recalculate();
|
|
@@ -6587,50 +6645,50 @@ export default defineComponent({
|
|
|
6587
6645
|
const rowOpts = computeRowOpts.value;
|
|
6588
6646
|
if (process.env.NODE_ENV === 'development') {
|
|
6589
6647
|
if (props.rowId) {
|
|
6590
|
-
|
|
6648
|
+
warnLog('vxe.error.delProp', ['row-id', 'row-config.keyField']);
|
|
6591
6649
|
}
|
|
6592
6650
|
if (props.rowKey) {
|
|
6593
|
-
|
|
6651
|
+
warnLog('vxe.error.delProp', ['row-key', 'row-config.useKey']);
|
|
6594
6652
|
}
|
|
6595
6653
|
if (props.columnKey) {
|
|
6596
|
-
|
|
6654
|
+
warnLog('vxe.error.delProp', ['column-id', 'column-config.useKey']);
|
|
6597
6655
|
}
|
|
6598
6656
|
if (!(props.rowId || rowOpts.keyField) && (checkboxOpts.reserve || checkboxOpts.checkRowKeys || radioOpts.reserve || radioOpts.checkRowKey || expandOpts.expandRowKeys || treeOpts.expandRowKeys)) {
|
|
6599
|
-
|
|
6657
|
+
warnLog('vxe.error.reqProp', ['row-config.keyField']);
|
|
6600
6658
|
}
|
|
6601
6659
|
if (props.editConfig && (editOpts.showStatus || editOpts.showUpdateStatus || editOpts.showInsertStatus) && !props.keepSource) {
|
|
6602
|
-
|
|
6660
|
+
warnLog('vxe.error.reqProp', ['keep-source']);
|
|
6603
6661
|
}
|
|
6604
6662
|
if (treeConfig && (treeOpts.showLine || treeOpts.line) && (!(props.rowKey || rowOpts.useKey) || !showOverflow)) {
|
|
6605
|
-
|
|
6663
|
+
warnLog('vxe.error.reqProp', ['row-config.useKey | show-overflow']);
|
|
6606
6664
|
}
|
|
6607
6665
|
if (treeConfig && props.stripe) {
|
|
6608
|
-
|
|
6666
|
+
warnLog('vxe.error.noTree', ['stripe']);
|
|
6609
6667
|
}
|
|
6610
6668
|
if (props.showFooter && !(props.footerMethod || props.footerData)) {
|
|
6611
|
-
|
|
6669
|
+
warnLog('vxe.error.reqProp', ['footer-data | footer-method']);
|
|
6612
6670
|
}
|
|
6613
6671
|
// if (props.highlightCurrentRow) {
|
|
6614
|
-
//
|
|
6672
|
+
// warnLog('vxe.error.delProp', ['highlight-current-row', 'row-config.isCurrent'])
|
|
6615
6673
|
// }
|
|
6616
6674
|
// if (props.highlightHoverRow) {
|
|
6617
|
-
//
|
|
6675
|
+
// warnLog('vxe.error.delProp', ['highlight-hover-row', 'row-config.isHover'])
|
|
6618
6676
|
// }
|
|
6619
6677
|
// if (props.highlightCurrentColumn) {
|
|
6620
|
-
//
|
|
6678
|
+
// warnLog('vxe.error.delProp', ['highlight-current-column', 'column-config.isCurrent'])
|
|
6621
6679
|
// }
|
|
6622
6680
|
// if (props.highlightHoverColumn) {
|
|
6623
|
-
//
|
|
6681
|
+
// warnLog('vxe.error.delProp', ['highlight-hover-column', 'column-config.isHover'])
|
|
6624
6682
|
// }
|
|
6625
6683
|
// 检查导入导出类型,如果自定义导入导出方法,则不校验类型
|
|
6626
6684
|
const { exportConfig, importConfig } = props;
|
|
6627
6685
|
const exportOpts = computeExportOpts.value;
|
|
6628
6686
|
const importOpts = computeImportOpts.value;
|
|
6629
6687
|
if (importConfig && importOpts.types && !importOpts.importMethod && !XEUtils.includeArrays(XEUtils.keys(importOpts._typeMaps), importOpts.types)) {
|
|
6630
|
-
|
|
6688
|
+
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(',')]);
|
|
6631
6689
|
}
|
|
6632
6690
|
if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !XEUtils.includeArrays(XEUtils.keys(exportOpts._typeMaps), exportOpts.types)) {
|
|
6633
|
-
|
|
6691
|
+
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(',')]);
|
|
6634
6692
|
}
|
|
6635
6693
|
}
|
|
6636
6694
|
if (process.env.NODE_ENV === 'development') {
|
|
@@ -6638,64 +6696,64 @@ export default defineComponent({
|
|
|
6638
6696
|
const mouseOpts = computeMouseOpts.value;
|
|
6639
6697
|
const rowOpts = computeRowOpts.value;
|
|
6640
6698
|
if (!props.id && props.customConfig && (customOpts.storage === true || (customOpts.storage && customOpts.storage.resizable) || (customOpts.storage && customOpts.storage.visible))) {
|
|
6641
|
-
|
|
6699
|
+
errLog('vxe.error.reqProp', ['id']);
|
|
6642
6700
|
}
|
|
6643
6701
|
if (props.treeConfig && checkboxOpts.range) {
|
|
6644
|
-
|
|
6702
|
+
errLog('vxe.error.noTree', ['checkbox-config.range']);
|
|
6645
6703
|
}
|
|
6646
6704
|
if (rowOpts.height && !props.showOverflow) {
|
|
6647
|
-
|
|
6705
|
+
warnLog('vxe.error.notProp', ['table.show-overflow']);
|
|
6648
6706
|
}
|
|
6649
6707
|
if (!$xeTable.handleUpdateCellAreas) {
|
|
6650
6708
|
if (props.clipConfig) {
|
|
6651
|
-
|
|
6709
|
+
warnLog('vxe.error.notProp', ['clip-config']);
|
|
6652
6710
|
}
|
|
6653
6711
|
if (props.fnrConfig) {
|
|
6654
|
-
|
|
6712
|
+
warnLog('vxe.error.notProp', ['fnr-config']);
|
|
6655
6713
|
}
|
|
6656
6714
|
if (mouseOpts.area) {
|
|
6657
|
-
|
|
6715
|
+
errLog('vxe.error.notProp', ['mouse-config.area']);
|
|
6658
6716
|
return;
|
|
6659
6717
|
}
|
|
6660
6718
|
}
|
|
6661
6719
|
if (props.treeConfig && treeOpts.children) {
|
|
6662
|
-
|
|
6720
|
+
warnLog('vxe.error.delProp', ['tree-config.children', 'tree-config.childrenField']);
|
|
6663
6721
|
}
|
|
6664
6722
|
if (props.treeConfig && treeOpts.line) {
|
|
6665
|
-
|
|
6723
|
+
warnLog('vxe.error.delProp', ['tree-config.line', 'tree-config.showLine']);
|
|
6666
6724
|
}
|
|
6667
6725
|
if (mouseOpts.area && mouseOpts.selected) {
|
|
6668
|
-
|
|
6726
|
+
warnLog('vxe.error.errConflicts', ['mouse-config.area', 'mouse-config.selected']);
|
|
6669
6727
|
}
|
|
6670
6728
|
if (mouseOpts.area && checkboxOpts.range) {
|
|
6671
|
-
|
|
6729
|
+
warnLog('vxe.error.errConflicts', ['mouse-config.area', 'checkbox-config.range']);
|
|
6672
6730
|
}
|
|
6673
6731
|
if (props.treeConfig && mouseOpts.area) {
|
|
6674
|
-
|
|
6732
|
+
errLog('vxe.error.noTree', ['mouse-config.area']);
|
|
6675
6733
|
}
|
|
6676
6734
|
if (props.editConfig && editOpts.activeMethod) {
|
|
6677
|
-
|
|
6735
|
+
warnLog('vxe.error.delProp', ['edit-config.activeMethod', 'edit-config.beforeEditMethod']);
|
|
6678
6736
|
}
|
|
6679
6737
|
if (props.treeConfig && checkboxOpts.isShiftKey) {
|
|
6680
|
-
|
|
6738
|
+
errLog('vxe.error.errConflicts', ['tree-config', 'checkbox-config.isShiftKey']);
|
|
6681
6739
|
}
|
|
6682
6740
|
if (checkboxOpts.halfField) {
|
|
6683
|
-
|
|
6741
|
+
warnLog('vxe.error.delProp', ['checkbox-config.halfField', 'checkbox-config.indeterminateField']);
|
|
6684
6742
|
}
|
|
6685
6743
|
}
|
|
6686
6744
|
// 检查是否有安装需要的模块
|
|
6687
6745
|
if (process.env.NODE_ENV === 'development') {
|
|
6688
6746
|
if (props.editConfig && !$xeTable.insert) {
|
|
6689
|
-
|
|
6747
|
+
errLog('vxe.error.reqModule', ['Edit']);
|
|
6690
6748
|
}
|
|
6691
6749
|
if (props.editRules && !$xeTable.validate) {
|
|
6692
|
-
|
|
6750
|
+
errLog('vxe.error.reqModule', ['Validator']);
|
|
6693
6751
|
}
|
|
6694
6752
|
if ((checkboxOpts.range || props.keyboardConfig || props.mouseConfig) && !$xeTable.triggerCellMousedownEvent) {
|
|
6695
|
-
|
|
6753
|
+
errLog('vxe.error.reqModule', ['Keyboard']);
|
|
6696
6754
|
}
|
|
6697
6755
|
if ((props.printConfig || props.importConfig || props.exportConfig) && !$xeTable.exportData) {
|
|
6698
|
-
|
|
6756
|
+
errLog('vxe.error.reqModule', ['Export']);
|
|
6699
6757
|
}
|
|
6700
6758
|
}
|
|
6701
6759
|
Object.assign(scrollYStore, {
|