vxe-table 3.13.17 → 3.13.19
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 +42 -72
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +25 -27
- package/es/table/module/edit/mixin.js +3 -5
- package/es/table/module/export/export-panel.js +22 -24
- package/es/table/module/export/import-panel.js +14 -16
- package/es/table/module/export/mixin.js +15 -31
- package/es/table/module/validator/mixin.js +1 -3
- package/es/table/render/index.js +90 -61
- package/es/table/src/columnInfo.js +30 -32
- package/es/table/src/methods.js +141 -80
- package/es/table/src/table.js +16 -18
- package/es/table/src/util.js +5 -7
- package/es/toolbar/src/toolbar.js +18 -26
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +42 -72
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +447 -411
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +31 -33
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +3 -5
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/export-panel.js +22 -24
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +14 -16
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +15 -31
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/validator/mixin.js +1 -3
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/render/index.js +98 -66
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/columnInfo.js +32 -34
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +148 -78
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +13 -15
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +4 -6
- package/lib/table/src/util.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +18 -26
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +42 -72
- package/packages/table/module/custom/panel.ts +25 -27
- package/packages/table/module/edit/mixin.ts +3 -5
- package/packages/table/module/export/export-panel.ts +22 -24
- package/packages/table/module/export/import-panel.ts +14 -16
- package/packages/table/module/export/mixin.ts +15 -31
- package/packages/table/module/validator/mixin.ts +1 -3
- package/packages/table/render/index.ts +89 -59
- package/packages/table/src/columnInfo.ts +30 -32
- package/packages/table/src/methods.ts +143 -78
- package/packages/table/src/table.ts +13 -15
- package/packages/table/src/util.ts +4 -6
- package/packages/toolbar/src/toolbar.ts +18 -26
- /package/es/{iconfont.1741051533862.ttf → iconfont.1741224103306.ttf} +0 -0
- /package/es/{iconfont.1741051533862.woff → iconfont.1741224103306.woff} +0 -0
- /package/es/{iconfont.1741051533862.woff2 → iconfont.1741224103306.woff2} +0 -0
- /package/lib/{iconfont.1741051533862.ttf → iconfont.1741224103306.ttf} +0 -0
- /package/lib/{iconfont.1741051533862.woff → iconfont.1741224103306.woff} +0 -0
- /package/lib/{iconfont.1741051533862.woff2 → iconfont.1741224103306.woff2} +0 -0
package/es/table/src/methods.js
CHANGED
|
@@ -2201,10 +2201,26 @@ const Methods = {
|
|
|
2201
2201
|
* 获取父容器的高度
|
|
2202
2202
|
*/
|
|
2203
2203
|
getParentHeight() {
|
|
2204
|
-
const
|
|
2205
|
-
const
|
|
2206
|
-
const
|
|
2207
|
-
|
|
2204
|
+
const $xeTable = this;
|
|
2205
|
+
const $xeGrid = $xeTable.$xeGrid;
|
|
2206
|
+
const props = $xeTable;
|
|
2207
|
+
const { height } = props;
|
|
2208
|
+
const el = $xeTable.$refs.refElem;
|
|
2209
|
+
if (el) {
|
|
2210
|
+
const parentElem = el.parentNode;
|
|
2211
|
+
const parentPaddingSize = height === '100%' || height === 'auto' ? getPaddingTopBottomSize(parentElem) : 0;
|
|
2212
|
+
let parentWrapperHeight = 0;
|
|
2213
|
+
if (parentElem) {
|
|
2214
|
+
if ($xeGrid && hasClass(parentElem, 'vxe-grid--table-wrapper')) {
|
|
2215
|
+
parentWrapperHeight = $xeGrid.getParentHeight();
|
|
2216
|
+
}
|
|
2217
|
+
else {
|
|
2218
|
+
parentWrapperHeight = parentElem.clientHeight;
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
return Math.floor(parentWrapperHeight - parentPaddingSize);
|
|
2222
|
+
}
|
|
2223
|
+
return 0;
|
|
2208
2224
|
},
|
|
2209
2225
|
/**
|
|
2210
2226
|
* 获取需要排除的高度
|
|
@@ -2295,28 +2311,26 @@ const Methods = {
|
|
|
2295
2311
|
if (treeConfig) {
|
|
2296
2312
|
// 树结构自动转换
|
|
2297
2313
|
if (treeOpts.transform) {
|
|
2298
|
-
if (
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
errLog('vxe.error.reqProp', ['table.tree-config.parentField']);
|
|
2304
|
-
}
|
|
2305
|
-
if (!childrenField) {
|
|
2306
|
-
errLog('vxe.error.reqProp', ['tree-config.childrenField']);
|
|
2307
|
-
}
|
|
2308
|
-
if (!treeOpts.mapChildrenField) {
|
|
2309
|
-
errLog('vxe.error.reqProp', ['tree-config.mapChildrenField']);
|
|
2310
|
-
}
|
|
2311
|
-
if (childrenField === treeOpts.mapChildrenField) {
|
|
2312
|
-
errLog('vxe.error.errConflicts', ['tree-config.childrenField', 'tree-config.mapChildrenField']);
|
|
2313
|
-
}
|
|
2314
|
-
// fullData.forEach(row => {
|
|
2315
|
-
// if (row[childrenField] && row[childrenField].length) {
|
|
2316
|
-
// warnLog('vxe.error.errConflicts', ['tree-config.transform', `row.${childrenField}`])
|
|
2317
|
-
// }
|
|
2318
|
-
// })
|
|
2314
|
+
if (!treeOpts.rowField) {
|
|
2315
|
+
errLog('vxe.error.reqProp', ['table.tree-config.rowField']);
|
|
2316
|
+
}
|
|
2317
|
+
if (!treeOpts.parentField) {
|
|
2318
|
+
errLog('vxe.error.reqProp', ['table.tree-config.parentField']);
|
|
2319
2319
|
}
|
|
2320
|
+
if (!childrenField) {
|
|
2321
|
+
errLog('vxe.error.reqProp', ['tree-config.childrenField']);
|
|
2322
|
+
}
|
|
2323
|
+
if (!treeOpts.mapChildrenField) {
|
|
2324
|
+
errLog('vxe.error.reqProp', ['tree-config.mapChildrenField']);
|
|
2325
|
+
}
|
|
2326
|
+
if (childrenField === treeOpts.mapChildrenField) {
|
|
2327
|
+
errLog('vxe.error.errConflicts', ['tree-config.childrenField', 'tree-config.mapChildrenField']);
|
|
2328
|
+
}
|
|
2329
|
+
// fullData.forEach(row => {
|
|
2330
|
+
// if (row[childrenField] && row[childrenField].length) {
|
|
2331
|
+
// warnLog('vxe.error.errConflicts', ['tree-config.transform', `row.${childrenField}`])
|
|
2332
|
+
// }
|
|
2333
|
+
// })
|
|
2320
2334
|
treeData = XEUtils.toArrayTree(fullData, {
|
|
2321
2335
|
key: treeOpts.rowField,
|
|
2322
2336
|
parentKey: treeOpts.parentField,
|
|
@@ -2381,16 +2395,14 @@ const Methods = {
|
|
|
2381
2395
|
// }
|
|
2382
2396
|
// }
|
|
2383
2397
|
// }
|
|
2384
|
-
if (
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
warnLog('vxe.error.scrollErrProp', ['table.span-method']);
|
|
2393
|
-
}
|
|
2398
|
+
if (!(this.height || this.maxHeight)) {
|
|
2399
|
+
errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}']);
|
|
2400
|
+
}
|
|
2401
|
+
// if (!this.showOverflow) {
|
|
2402
|
+
// warnLog('vxe.error.reqProp', ['table.show-overflow'])
|
|
2403
|
+
// }
|
|
2404
|
+
if (this.spanMethod) {
|
|
2405
|
+
errLog('vxe.error.scrollErrProp', ['table.span-method']);
|
|
2394
2406
|
}
|
|
2395
2407
|
}
|
|
2396
2408
|
handleReserveStatus($xeTable);
|
|
@@ -2535,16 +2547,18 @@ const Methods = {
|
|
|
2535
2547
|
cacheRowMap() {
|
|
2536
2548
|
const $xeTable = this;
|
|
2537
2549
|
const props = $xeTable;
|
|
2550
|
+
const reactData = $xeTable;
|
|
2538
2551
|
const internalData = $xeTable;
|
|
2539
2552
|
const { treeConfig } = props;
|
|
2540
|
-
const
|
|
2553
|
+
const { treeExpandedMaps } = reactData;
|
|
2541
2554
|
const { fullAllDataRowIdData, tableFullData, tableFullTreeData } = internalData;
|
|
2555
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
2542
2556
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
2543
2557
|
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
|
|
2544
2558
|
const rowkey = getRowkey($xeTable);
|
|
2545
|
-
const
|
|
2546
|
-
const fullAllDataRowIdMaps = {};
|
|
2559
|
+
const fullAllDataRowIdMaps = Object.assign({}, fullAllDataRowIdData); // 存在已删除数据
|
|
2547
2560
|
const fullDataRowIdMaps = {};
|
|
2561
|
+
const treeTempExpandedMaps = Object.assign({}, treeExpandedMaps);
|
|
2548
2562
|
const handleRow = (row, index, items, path, parentRow, nodes) => {
|
|
2549
2563
|
let rowid = getRowid($xeTable, row);
|
|
2550
2564
|
const seq = treeConfig && path ? toTreePathSeq(path) : index + 1;
|
|
@@ -2553,13 +2567,23 @@ const Methods = {
|
|
|
2553
2567
|
rowid = getRowUniqueId();
|
|
2554
2568
|
XEUtils.set(row, rowkey, rowid);
|
|
2555
2569
|
}
|
|
2556
|
-
if (
|
|
2557
|
-
|
|
2570
|
+
if (treeConfig && treeOpts.lazy) {
|
|
2571
|
+
const treeExpRest = treeExpandedMaps[rowid];
|
|
2572
|
+
if (row[hasChildField] && XEUtils.isUndefined(row[childrenField])) {
|
|
2573
|
+
row[childrenField] = null;
|
|
2574
|
+
}
|
|
2575
|
+
if (treeExpRest) {
|
|
2576
|
+
if (!row[childrenField] || !row[childrenField].length) {
|
|
2577
|
+
delete treeTempExpandedMaps[rowid];
|
|
2578
|
+
}
|
|
2579
|
+
}
|
|
2558
2580
|
}
|
|
2559
2581
|
let rowRest = fullAllDataRowIdData[rowid];
|
|
2560
2582
|
if (!rowRest) {
|
|
2561
2583
|
rowRest = { row, rowid, seq, index: -1, _index: -1, $index: -1, treeIndex: index, items, parent: parentRow, level, height: 0, resizeHeight: 0, oTop: 0, expandHeight: 0 };
|
|
2562
2584
|
}
|
|
2585
|
+
rowRest.treeLoaded = false;
|
|
2586
|
+
rowRest.expandLoaded = false;
|
|
2563
2587
|
rowRest.row = row;
|
|
2564
2588
|
rowRest.items = items;
|
|
2565
2589
|
rowRest.parent = parentRow;
|
|
@@ -2568,14 +2592,15 @@ const Methods = {
|
|
|
2568
2592
|
fullDataRowIdMaps[rowid] = rowRest;
|
|
2569
2593
|
fullAllDataRowIdMaps[rowid] = rowRest;
|
|
2570
2594
|
};
|
|
2571
|
-
internalData.fullDataRowIdData = fullDataRowIdMaps;
|
|
2572
|
-
internalData.fullAllDataRowIdData = fullAllDataRowIdMaps;
|
|
2573
2595
|
if (treeConfig) {
|
|
2574
2596
|
XEUtils.eachTree(tableFullTreeData, handleRow, { children: childrenField });
|
|
2575
2597
|
}
|
|
2576
2598
|
else {
|
|
2577
2599
|
tableFullData.forEach(handleRow);
|
|
2578
2600
|
}
|
|
2601
|
+
internalData.fullDataRowIdData = fullDataRowIdMaps;
|
|
2602
|
+
internalData.fullAllDataRowIdData = fullAllDataRowIdMaps;
|
|
2603
|
+
reactData.treeExpandedMaps = treeTempExpandedMaps;
|
|
2579
2604
|
},
|
|
2580
2605
|
cacheSourceMap(fullData) {
|
|
2581
2606
|
let { treeConfig, treeOpts, sourceDataRowIdData } = this;
|
|
@@ -2912,12 +2937,19 @@ const Methods = {
|
|
|
2912
2937
|
* 如果还额外传了 field 则还原指定的单元格数据
|
|
2913
2938
|
*/
|
|
2914
2939
|
revertData(rows, field) {
|
|
2915
|
-
const
|
|
2940
|
+
const $xeTable = this;
|
|
2941
|
+
const props = $xeTable;
|
|
2942
|
+
const reactData = $xeTable;
|
|
2943
|
+
const internalData = $xeTable;
|
|
2944
|
+
const { keepSource, treeConfig } = props;
|
|
2945
|
+
const { fullAllDataRowIdData, fullDataRowIdData, tableSourceData, sourceDataRowIdData, tableFullData, afterFullData } = internalData;
|
|
2946
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
2947
|
+
const { transform } = treeOpts;
|
|
2916
2948
|
if (!keepSource) {
|
|
2917
2949
|
if (process.env.NODE_ENV === 'development') {
|
|
2918
|
-
|
|
2950
|
+
errLog('vxe.error.reqProp', ['keep-source']);
|
|
2919
2951
|
}
|
|
2920
|
-
return
|
|
2952
|
+
return $xeTable.$nextTick();
|
|
2921
2953
|
}
|
|
2922
2954
|
let targetRows = rows;
|
|
2923
2955
|
if (rows) {
|
|
@@ -2926,31 +2958,53 @@ const Methods = {
|
|
|
2926
2958
|
}
|
|
2927
2959
|
}
|
|
2928
2960
|
else {
|
|
2929
|
-
targetRows = XEUtils.toArray(
|
|
2961
|
+
targetRows = XEUtils.toArray($xeTable.getUpdateRecords());
|
|
2930
2962
|
}
|
|
2963
|
+
let reDelFlag = false;
|
|
2931
2964
|
if (targetRows.length) {
|
|
2932
|
-
targetRows.forEach((
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2965
|
+
targetRows.forEach((item) => {
|
|
2966
|
+
const rowid = getRowid($xeTable, item);
|
|
2967
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
2968
|
+
if (rowRest) {
|
|
2969
|
+
const row = rowRest.row;
|
|
2970
|
+
if (!$xeTable.isInsertByRow(row)) {
|
|
2971
|
+
const oRow = sourceDataRowIdData[rowid];
|
|
2972
|
+
if (oRow && row) {
|
|
2973
|
+
if (field) {
|
|
2974
|
+
XEUtils.set(row, field, XEUtils.clone(XEUtils.get(oRow, field), true));
|
|
2975
|
+
}
|
|
2976
|
+
else {
|
|
2977
|
+
XEUtils.destructuring(row, XEUtils.clone(oRow, true));
|
|
2978
|
+
}
|
|
2979
|
+
if (!fullDataRowIdData[rowid] && $xeTable.isRemoveByRow(row)) {
|
|
2980
|
+
tableFullData.unshift(row);
|
|
2981
|
+
afterFullData.unshift(row);
|
|
2982
|
+
reDelFlag = true;
|
|
2983
|
+
}
|
|
2945
2984
|
}
|
|
2946
2985
|
}
|
|
2947
2986
|
}
|
|
2948
2987
|
});
|
|
2949
2988
|
}
|
|
2950
2989
|
if (rows) {
|
|
2951
|
-
|
|
2990
|
+
if (reDelFlag) {
|
|
2991
|
+
$xeTable.updateFooter();
|
|
2992
|
+
$xeTable.cacheRowMap(false);
|
|
2993
|
+
$xeTable.handleTableData(treeConfig && transform);
|
|
2994
|
+
if (!(treeConfig && transform)) {
|
|
2995
|
+
$xeTable.updateAfterDataIndex();
|
|
2996
|
+
}
|
|
2997
|
+
$xeTable.checkSelectionStatus();
|
|
2998
|
+
if (reactData.scrollYLoad) {
|
|
2999
|
+
$xeTable.updateScrollYSpace();
|
|
3000
|
+
}
|
|
3001
|
+
}
|
|
3002
|
+
return $xeTable.$nextTick().then(() => {
|
|
3003
|
+
$xeTable.updateCellAreas();
|
|
3004
|
+
return $xeTable.recalculate();
|
|
3005
|
+
});
|
|
2952
3006
|
}
|
|
2953
|
-
return
|
|
3007
|
+
return $xeTable.reloadData(tableSourceData);
|
|
2954
3008
|
},
|
|
2955
3009
|
/**
|
|
2956
3010
|
* 清空单元格内容
|
|
@@ -3069,10 +3123,19 @@ const Methods = {
|
|
|
3069
3123
|
* @param {Row} row 行对象
|
|
3070
3124
|
*/
|
|
3071
3125
|
isInsertByRow(row) {
|
|
3072
|
-
const
|
|
3073
|
-
const
|
|
3126
|
+
const $xeTable = this;
|
|
3127
|
+
const reactData = $xeTable;
|
|
3128
|
+
const { editStore } = reactData;
|
|
3129
|
+
const rowid = getRowid($xeTable, row);
|
|
3074
3130
|
return !!editStore.insertMaps[rowid];
|
|
3075
3131
|
},
|
|
3132
|
+
isRemoveByRow(row) {
|
|
3133
|
+
const $xeTable = this;
|
|
3134
|
+
const reactData = $xeTable;
|
|
3135
|
+
const { editStore } = reactData;
|
|
3136
|
+
const rowid = getRowid($xeTable, row);
|
|
3137
|
+
return !!editStore.removeMaps[rowid];
|
|
3138
|
+
},
|
|
3076
3139
|
/**
|
|
3077
3140
|
* 删除所有新增的临时数据
|
|
3078
3141
|
* @returns
|
|
@@ -8829,23 +8892,21 @@ const Methods = {
|
|
|
8829
8892
|
const funcs = 'setFilter,openFilter,clearFilter,saveFilterPanel,resetFilterPanel,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,insertChild,insertChildAt,insertChildNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,fullValidateField,validateField,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom,saveCustom,cancelCustom,resetCustom,toggleCustomAllCheckbox,setCustomAllCheckbox'.split(',');
|
|
8830
8893
|
funcs.forEach(name => {
|
|
8831
8894
|
Methods[name] = function (...args) {
|
|
8832
|
-
if (
|
|
8833
|
-
if (
|
|
8834
|
-
|
|
8835
|
-
|
|
8836
|
-
|
|
8837
|
-
|
|
8838
|
-
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
errLog('vxe.error.reqModule', ['VxeTableCustomModule']);
|
|
8848
|
-
}
|
|
8895
|
+
if (!this[`_${name}`]) {
|
|
8896
|
+
if ('openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',').includes(name)) {
|
|
8897
|
+
errLog('vxe.error.reqModule', ['VxeTableExportModule']);
|
|
8898
|
+
}
|
|
8899
|
+
else if ('fullValidate,validate'.split(',').includes(name)) {
|
|
8900
|
+
errLog('vxe.error.reqModule', ['VxeTableValidatorModule']);
|
|
8901
|
+
}
|
|
8902
|
+
else if ('setFilter,openFilter,clearFilter,getCheckedFilters'.split(',').includes(name)) {
|
|
8903
|
+
errLog('vxe.error.reqModule', ['VxeTableFilterModule']);
|
|
8904
|
+
}
|
|
8905
|
+
else if ('insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell'.split(',').includes(name)) {
|
|
8906
|
+
errLog('vxe.error.reqModule', ['VxeTableEditModule']);
|
|
8907
|
+
}
|
|
8908
|
+
else if ('openCustom'.split(',').includes(name)) {
|
|
8909
|
+
errLog('vxe.error.reqModule', ['VxeTableCustomModule']);
|
|
8849
8910
|
}
|
|
8850
8911
|
}
|
|
8851
8912
|
return this[`_${name}`] ? this[`_${name}`](...args) : null;
|
package/es/table/src/table.js
CHANGED
|
@@ -1492,26 +1492,24 @@ export default {
|
|
|
1492
1492
|
warnLog('vxe.error.reqProp', ['tooltip-config']);
|
|
1493
1493
|
}
|
|
1494
1494
|
}
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
if (
|
|
1501
|
-
|
|
1502
|
-
errLog('vxe.error.reqComp', ['vxe-loading']);
|
|
1503
|
-
}
|
|
1495
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
1496
|
+
const VxeUILoadingComponent = VxeUI.getComponent('VxeLoading');
|
|
1497
|
+
const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip');
|
|
1498
|
+
$xeTable.$nextTick(() => {
|
|
1499
|
+
if (props.loading) {
|
|
1500
|
+
if (!VxeUILoadingComponent && !this.$scopedSlots.loading) {
|
|
1501
|
+
errLog('vxe.error.reqComp', ['vxe-loading']);
|
|
1504
1502
|
}
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1503
|
+
}
|
|
1504
|
+
if ((props.showOverflow === true || props.showOverflow === 'tooltip') ||
|
|
1505
|
+
(props.showHeaderOverflow === true || props.showHeaderOverflow === 'tooltip') ||
|
|
1506
|
+
(props.showFooterOverflow === true || props.showFooterOverflow === 'tooltip') ||
|
|
1507
|
+
props.tooltipConfig || props.editRules) {
|
|
1508
|
+
if (!VxeUITooltipComponent) {
|
|
1509
|
+
errLog('vxe.error.reqComp', ['vxe-tooltip']);
|
|
1512
1510
|
}
|
|
1513
|
-
}
|
|
1514
|
-
}
|
|
1511
|
+
}
|
|
1512
|
+
});
|
|
1515
1513
|
if (this.autoResize) {
|
|
1516
1514
|
const resizeObserver = globalResize.create(() => {
|
|
1517
1515
|
if (this.autoResize) {
|
package/es/table/src/util.js
CHANGED
|
@@ -133,13 +133,11 @@ export function assembleColumn(_vm) {
|
|
|
133
133
|
const { $el, $xetable, $xecolumn, columnConfig } = _vm;
|
|
134
134
|
const groupConfig = $xecolumn ? $xecolumn.columnConfig : null;
|
|
135
135
|
if (groupConfig) {
|
|
136
|
-
if (
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
warnLog('vxe.error.groupTag', [`<vxe-colgroup title=${$xecolumn.title} ...>`, `<vxe-column title=${$xecolumn.title} ...>`]);
|
|
142
|
-
}
|
|
136
|
+
if ($xecolumn.$options._componentTag === 'vxe-table-column') {
|
|
137
|
+
errLog('vxe.error.groupTag', [`<vxe-table-colgroup title=${$xecolumn.title} ...>`, `<vxe-table-column title=${$xecolumn.title} ...>`]);
|
|
138
|
+
}
|
|
139
|
+
else if ($xecolumn.$options._componentTag === 'vxe-column') {
|
|
140
|
+
warnLog('vxe.error.groupTag', [`<vxe-colgroup title=${$xecolumn.title} ...>`, `<vxe-column title=${$xecolumn.title} ...>`]);
|
|
143
141
|
}
|
|
144
142
|
if (!groupConfig.children) {
|
|
145
143
|
groupConfig.children = [];
|
|
@@ -230,9 +230,7 @@ export default {
|
|
|
230
230
|
tCommandMethod(params);
|
|
231
231
|
}
|
|
232
232
|
else {
|
|
233
|
-
|
|
234
|
-
errLog('vxe.error.notCommands', [code]);
|
|
235
|
-
}
|
|
233
|
+
errLog('vxe.error.notCommands', [code]);
|
|
236
234
|
}
|
|
237
235
|
}
|
|
238
236
|
$xeToolbar.dispatchEvent('button-click', params, evnt);
|
|
@@ -259,9 +257,7 @@ export default {
|
|
|
259
257
|
tCommandMethod(params);
|
|
260
258
|
}
|
|
261
259
|
else {
|
|
262
|
-
|
|
263
|
-
errLog('vxe.error.notCommands', [code]);
|
|
264
|
-
}
|
|
260
|
+
errLog('vxe.error.notCommands', [code]);
|
|
265
261
|
}
|
|
266
262
|
}
|
|
267
263
|
$xeToolbar.dispatchEvent('tool-click', params, evnt);
|
|
@@ -676,28 +672,24 @@ export default {
|
|
|
676
672
|
$xetable.connect(this);
|
|
677
673
|
}
|
|
678
674
|
const customOpts = $xeToolbar.computeCustomOpts;
|
|
679
|
-
if (
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
warnLog('vxe.error.delProp', ['toolbar.custom.trigger', 'table.custom-config.trigger']);
|
|
691
|
-
}
|
|
675
|
+
if (customOpts.isFooter) {
|
|
676
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.isFooter', 'table.custom-config.showFooter']);
|
|
677
|
+
}
|
|
678
|
+
if (customOpts.showFooter) {
|
|
679
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.showFooter', 'table.custom-config.showFooter']);
|
|
680
|
+
}
|
|
681
|
+
if (customOpts.immediate) {
|
|
682
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.immediate', 'table.custom-config.immediate']);
|
|
683
|
+
}
|
|
684
|
+
if (customOpts.trigger) {
|
|
685
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.trigger', 'table.custom-config.trigger']);
|
|
692
686
|
}
|
|
693
687
|
});
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
if (
|
|
698
|
-
|
|
699
|
-
errLog('vxe.error.reqComp', ['vxe-button']);
|
|
700
|
-
}
|
|
688
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
689
|
+
const VxeUIButtonComponent = VxeUI.getComponent('VxeButton');
|
|
690
|
+
if (props.refresh || props.import || props.export || props.print || props.zoom) {
|
|
691
|
+
if (!VxeUIButtonComponent) {
|
|
692
|
+
errLog('vxe.error.reqComp', ['vxe-button']);
|
|
701
693
|
}
|
|
702
694
|
}
|
|
703
695
|
},
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED