vxe-table 3.14.0-beta.1 → 3.14.0-beta.2
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 +34 -62
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +25 -27
- 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 +2 -4
- package/es/table/src/columnInfo.js +30 -32
- package/es/table/src/methods.js +121 -94
- 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 +34 -62
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +323 -340
- 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/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 +2 -4
- 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 +129 -91
- 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 +34 -62
- package/packages/table/module/custom/panel.ts +25 -27
- 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 +2 -4
- package/packages/table/src/columnInfo.ts +30 -32
- package/packages/table/src/methods.ts +126 -95
- 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.1741051885975.ttf → iconfont.1741079977180.ttf} +0 -0
- /package/es/{iconfont.1741051885975.woff → iconfont.1741079977180.woff} +0 -0
- /package/es/{iconfont.1741051885975.woff2 → iconfont.1741079977180.woff2} +0 -0
- /package/lib/{iconfont.1741051885975.ttf → iconfont.1741079977180.ttf} +0 -0
- /package/lib/{iconfont.1741051885975.woff → iconfont.1741079977180.woff} +0 -0
- /package/lib/{iconfont.1741051885975.woff2 → iconfont.1741079977180.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
|
|
|
2220
2220
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2221
2221
|
|
|
2222
2222
|
|
|
2223
|
-
const version = "3.14.0-beta.
|
|
2223
|
+
const version = "3.14.0-beta.2";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2843,7 +2843,7 @@ function isNodeElement(elem) {
|
|
|
2843
2843
|
const {
|
|
2844
2844
|
log: log_log
|
|
2845
2845
|
} = core_.VxeUI;
|
|
2846
|
-
const log_version = `table v${"3.14.0-beta.
|
|
2846
|
+
const log_version = `table v${"3.14.0-beta.2"}`;
|
|
2847
2847
|
const warnLog = log_log.create('warn', log_version);
|
|
2848
2848
|
const errLog = log_log.create('error', log_version);
|
|
2849
2849
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -2869,42 +2869,40 @@ class ColumnInfo {
|
|
|
2869
2869
|
const formatter = _vm.formatter;
|
|
2870
2870
|
const visible = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(_vm.visible) ? _vm.visible : true;
|
|
2871
2871
|
const tableProps = $xetable;
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2872
|
+
const types = ['seq', 'checkbox', 'radio', 'expand', 'html'];
|
|
2873
|
+
if (_vm.type && types.indexOf(_vm.type) === -1) {
|
|
2874
|
+
warnLog('vxe.error.errProp', [`type=${_vm.type}`, types.join(', ')]);
|
|
2875
|
+
}
|
|
2876
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(_vm.cellRender) || _vm.cellRender && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isObject(_vm.cellRender)) {
|
|
2877
|
+
warnLog('vxe.error.errProp', [`column.cell-render=${_vm.cellRender}`, 'column.cell-render={}']);
|
|
2878
|
+
}
|
|
2879
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(_vm.editRender) || _vm.editRender && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isObject(_vm.editRender)) {
|
|
2880
|
+
warnLog('vxe.error.errProp', [`column.edit-render=${_vm.editRender}`, 'column.edit-render={}']);
|
|
2881
|
+
}
|
|
2882
|
+
if (_vm.type === 'expand') {
|
|
2883
|
+
const {
|
|
2884
|
+
treeConfig
|
|
2885
|
+
} = tableProps;
|
|
2886
|
+
if (treeConfig && ($xetable.treeOpts.showLine || $xetable.treeOpts.line)) {
|
|
2887
|
+
errLog('vxe.error.errConflicts', ['tree-config.line', 'column.type=expand']);
|
|
2882
2888
|
}
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
+
}
|
|
2890
|
+
if (_vm.remoteSort) {
|
|
2891
|
+
warnLog('vxe.error.delProp', ['column.remote-sort', 'sort-config.remote']);
|
|
2892
|
+
}
|
|
2893
|
+
if (_vm.sortMethod) {
|
|
2894
|
+
warnLog('vxe.error.delProp', ['column.sort-method', 'sort-config.sortMethod']);
|
|
2895
|
+
}
|
|
2896
|
+
if (formatter) {
|
|
2897
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(formatter)) {
|
|
2898
|
+
const gFormatOpts = columnInfo_formats.get(formatter) || (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default())[formatter];
|
|
2899
|
+
if (!gFormatOpts || !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod)) {
|
|
2900
|
+
errLog('vxe.error.notFormats', [formatter]);
|
|
2889
2901
|
}
|
|
2890
|
-
}
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
if (_vm.sortMethod) {
|
|
2895
|
-
warnLog('vxe.error.delProp', ['column.sort-method', 'sort-config.sortMethod']);
|
|
2896
|
-
}
|
|
2897
|
-
if (formatter) {
|
|
2898
|
-
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(formatter)) {
|
|
2899
|
-
const gFormatOpts = columnInfo_formats.get(formatter) || (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default())[formatter];
|
|
2900
|
-
if (!gFormatOpts || !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod)) {
|
|
2901
|
-
errLog('vxe.error.notFormats', [formatter]);
|
|
2902
|
-
}
|
|
2903
|
-
} else if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(formatter)) {
|
|
2904
|
-
const gFormatOpts = columnInfo_formats.get(formatter[0]) || (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default())[formatter[0]];
|
|
2905
|
-
if (!gFormatOpts || !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod)) {
|
|
2906
|
-
errLog('vxe.error.notFormats', [formatter[0]]);
|
|
2907
|
-
}
|
|
2902
|
+
} else if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(formatter)) {
|
|
2903
|
+
const gFormatOpts = columnInfo_formats.get(formatter[0]) || (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default())[formatter[0]];
|
|
2904
|
+
if (!gFormatOpts || !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod)) {
|
|
2905
|
+
errLog('vxe.error.notFormats', [formatter[0]]);
|
|
2908
2906
|
}
|
|
2909
2907
|
}
|
|
2910
2908
|
}
|
|
@@ -3161,12 +3159,10 @@ function assembleColumn(_vm) {
|
|
|
3161
3159
|
} = _vm;
|
|
3162
3160
|
const groupConfig = $xecolumn ? $xecolumn.columnConfig : null;
|
|
3163
3161
|
if (groupConfig) {
|
|
3164
|
-
if (
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
warnLog('vxe.error.groupTag', [`<vxe-colgroup title=${$xecolumn.title} ...>`, `<vxe-column title=${$xecolumn.title} ...>`]);
|
|
3169
|
-
}
|
|
3162
|
+
if ($xecolumn.$options._componentTag === 'vxe-table-column') {
|
|
3163
|
+
errLog('vxe.error.groupTag', [`<vxe-table-colgroup title=${$xecolumn.title} ...>`, `<vxe-table-column title=${$xecolumn.title} ...>`]);
|
|
3164
|
+
} else if ($xecolumn.$options._componentTag === 'vxe-column') {
|
|
3165
|
+
warnLog('vxe.error.groupTag', [`<vxe-colgroup title=${$xecolumn.title} ...>`, `<vxe-column title=${$xecolumn.title} ...>`]);
|
|
3170
3166
|
}
|
|
3171
3167
|
if (!groupConfig.children) {
|
|
3172
3168
|
groupConfig.children = [];
|
|
@@ -5419,7 +5415,14 @@ function cacheColumnMap($xeTable) {
|
|
|
5419
5415
|
if (expandColumn && expandOpts.mode !== 'fixed' && mouseOpts.area) {
|
|
5420
5416
|
errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand']);
|
|
5421
5417
|
}
|
|
5422
|
-
if (
|
|
5418
|
+
if (htmlColumn) {
|
|
5419
|
+
if (!columnOpts.useKey) {
|
|
5420
|
+
errLog('vxe.error.reqProp', ['column-config.useKey & column.type=html']);
|
|
5421
|
+
}
|
|
5422
|
+
if (!rowOpts.useKey) {
|
|
5423
|
+
errLog('vxe.error.reqProp', ['row-config.useKey & column.type=html']);
|
|
5424
|
+
}
|
|
5425
|
+
}
|
|
5423
5426
|
reactData.isGroup = isGroup;
|
|
5424
5427
|
reactData.treeNodeColumn = treeNodeColumn;
|
|
5425
5428
|
reactData.expandColumn = expandColumn;
|
|
@@ -7826,28 +7829,26 @@ const Methods = {
|
|
|
7826
7829
|
if (treeConfig) {
|
|
7827
7830
|
// 树结构自动转换
|
|
7828
7831
|
if (treeOpts.transform) {
|
|
7829
|
-
if (
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
errLog('vxe.error.reqProp', ['table.tree-config.parentField']);
|
|
7835
|
-
}
|
|
7836
|
-
if (!childrenField) {
|
|
7837
|
-
errLog('vxe.error.reqProp', ['tree-config.childrenField']);
|
|
7838
|
-
}
|
|
7839
|
-
if (!treeOpts.mapChildrenField) {
|
|
7840
|
-
errLog('vxe.error.reqProp', ['tree-config.mapChildrenField']);
|
|
7841
|
-
}
|
|
7842
|
-
if (childrenField === treeOpts.mapChildrenField) {
|
|
7843
|
-
errLog('vxe.error.errConflicts', ['tree-config.childrenField', 'tree-config.mapChildrenField']);
|
|
7844
|
-
}
|
|
7845
|
-
// fullData.forEach(row => {
|
|
7846
|
-
// if (row[childrenField] && row[childrenField].length) {
|
|
7847
|
-
// warnLog('vxe.error.errConflicts', ['tree-config.transform', `row.${childrenField}`])
|
|
7848
|
-
// }
|
|
7849
|
-
// })
|
|
7832
|
+
if (!treeOpts.rowField) {
|
|
7833
|
+
errLog('vxe.error.reqProp', ['table.tree-config.rowField']);
|
|
7834
|
+
}
|
|
7835
|
+
if (!treeOpts.parentField) {
|
|
7836
|
+
errLog('vxe.error.reqProp', ['table.tree-config.parentField']);
|
|
7850
7837
|
}
|
|
7838
|
+
if (!childrenField) {
|
|
7839
|
+
errLog('vxe.error.reqProp', ['tree-config.childrenField']);
|
|
7840
|
+
}
|
|
7841
|
+
if (!treeOpts.mapChildrenField) {
|
|
7842
|
+
errLog('vxe.error.reqProp', ['tree-config.mapChildrenField']);
|
|
7843
|
+
}
|
|
7844
|
+
if (childrenField === treeOpts.mapChildrenField) {
|
|
7845
|
+
errLog('vxe.error.errConflicts', ['tree-config.childrenField', 'tree-config.mapChildrenField']);
|
|
7846
|
+
}
|
|
7847
|
+
// fullData.forEach(row => {
|
|
7848
|
+
// if (row[childrenField] && row[childrenField].length) {
|
|
7849
|
+
// warnLog('vxe.error.errConflicts', ['tree-config.transform', `row.${childrenField}`])
|
|
7850
|
+
// }
|
|
7851
|
+
// })
|
|
7851
7852
|
treeData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArrayTree(fullData, {
|
|
7852
7853
|
key: treeOpts.rowField,
|
|
7853
7854
|
parentKey: treeOpts.parentField,
|
|
@@ -7911,16 +7912,14 @@ const Methods = {
|
|
|
7911
7912
|
// }
|
|
7912
7913
|
// }
|
|
7913
7914
|
// }
|
|
7914
|
-
if (
|
|
7915
|
-
|
|
7916
|
-
|
|
7917
|
-
|
|
7918
|
-
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
warnLog('vxe.error.scrollErrProp', ['table.span-method']);
|
|
7923
|
-
}
|
|
7915
|
+
if (!(this.height || this.maxHeight)) {
|
|
7916
|
+
errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}']);
|
|
7917
|
+
}
|
|
7918
|
+
// if (!this.showOverflow) {
|
|
7919
|
+
// warnLog('vxe.error.reqProp', ['table.show-overflow'])
|
|
7920
|
+
// }
|
|
7921
|
+
if (this.spanMethod) {
|
|
7922
|
+
warnLog('vxe.error.scrollErrProp', ['table.span-method']);
|
|
7924
7923
|
}
|
|
7925
7924
|
}
|
|
7926
7925
|
handleReserveStatus($xeTable);
|
|
@@ -8066,22 +8065,30 @@ const Methods = {
|
|
|
8066
8065
|
cacheRowMap() {
|
|
8067
8066
|
const $xeTable = this;
|
|
8068
8067
|
const props = $xeTable;
|
|
8068
|
+
const reactData = $xeTable;
|
|
8069
8069
|
const internalData = $xeTable;
|
|
8070
8070
|
const {
|
|
8071
8071
|
treeConfig
|
|
8072
8072
|
} = props;
|
|
8073
|
-
const
|
|
8073
|
+
const {
|
|
8074
|
+
treeExpandedMaps
|
|
8075
|
+
} = reactData;
|
|
8074
8076
|
const {
|
|
8075
8077
|
fullAllDataRowIdData,
|
|
8076
8078
|
tableFullData,
|
|
8077
8079
|
tableFullTreeData
|
|
8078
8080
|
} = internalData;
|
|
8081
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
8079
8082
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
8080
8083
|
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
|
|
8081
8084
|
const rowkey = getRowkey($xeTable);
|
|
8082
|
-
const
|
|
8083
|
-
|
|
8085
|
+
const fullAllDataRowIdMaps = {
|
|
8086
|
+
...fullAllDataRowIdData
|
|
8087
|
+
}; // 存在已删除数据
|
|
8084
8088
|
const fullDataRowIdMaps = {};
|
|
8089
|
+
const treeTempExpandedMaps = {
|
|
8090
|
+
...treeExpandedMaps
|
|
8091
|
+
};
|
|
8085
8092
|
const handleRow = (row, index, items, path, parentRow, nodes) => {
|
|
8086
8093
|
let rowid = getRowid($xeTable, row);
|
|
8087
8094
|
const seq = treeConfig && path ? toTreePathSeq(path) : index + 1;
|
|
@@ -8090,8 +8097,16 @@ const Methods = {
|
|
|
8090
8097
|
rowid = getRowUniqueId();
|
|
8091
8098
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, rowkey, rowid);
|
|
8092
8099
|
}
|
|
8093
|
-
if (
|
|
8094
|
-
|
|
8100
|
+
if (treeConfig && treeOpts.lazy) {
|
|
8101
|
+
const treeExpRest = treeExpandedMaps[rowid];
|
|
8102
|
+
if (row[hasChildField] && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(row[childrenField])) {
|
|
8103
|
+
row[childrenField] = null;
|
|
8104
|
+
}
|
|
8105
|
+
if (treeExpRest) {
|
|
8106
|
+
if (!row[childrenField] || !row[childrenField].length) {
|
|
8107
|
+
delete treeTempExpandedMaps[rowid];
|
|
8108
|
+
}
|
|
8109
|
+
}
|
|
8095
8110
|
}
|
|
8096
8111
|
let rowRest = fullAllDataRowIdData[rowid];
|
|
8097
8112
|
if (!rowRest) {
|
|
@@ -8112,6 +8127,8 @@ const Methods = {
|
|
|
8112
8127
|
expandHeight: 0
|
|
8113
8128
|
};
|
|
8114
8129
|
}
|
|
8130
|
+
rowRest.treeLoaded = false;
|
|
8131
|
+
rowRest.expandLoaded = false;
|
|
8115
8132
|
rowRest.row = row;
|
|
8116
8133
|
rowRest.items = items;
|
|
8117
8134
|
rowRest.parent = parentRow;
|
|
@@ -8120,8 +8137,6 @@ const Methods = {
|
|
|
8120
8137
|
fullDataRowIdMaps[rowid] = rowRest;
|
|
8121
8138
|
fullAllDataRowIdMaps[rowid] = rowRest;
|
|
8122
8139
|
};
|
|
8123
|
-
internalData.fullDataRowIdData = fullDataRowIdMaps;
|
|
8124
|
-
internalData.fullAllDataRowIdData = fullAllDataRowIdMaps;
|
|
8125
8140
|
if (treeConfig) {
|
|
8126
8141
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData, handleRow, {
|
|
8127
8142
|
children: childrenField
|
|
@@ -8129,6 +8144,9 @@ const Methods = {
|
|
|
8129
8144
|
} else {
|
|
8130
8145
|
tableFullData.forEach(handleRow);
|
|
8131
8146
|
}
|
|
8147
|
+
internalData.fullDataRowIdData = fullDataRowIdMaps;
|
|
8148
|
+
internalData.fullAllDataRowIdData = fullAllDataRowIdMaps;
|
|
8149
|
+
reactData.treeExpandedMaps = treeTempExpandedMaps;
|
|
8132
8150
|
},
|
|
8133
8151
|
cacheSourceMap(fullData) {
|
|
8134
8152
|
let {
|
|
@@ -8504,23 +8522,6 @@ const Methods = {
|
|
|
8504
8522
|
}
|
|
8505
8523
|
return this.createData(records).then(rows => isArr ? rows : rows[0]);
|
|
8506
8524
|
},
|
|
8507
|
-
// toOriginalRecords (rows: any[]) {
|
|
8508
|
-
// const { treeConfig } = props
|
|
8509
|
-
// const treeOpts = computeTreeOpts.value
|
|
8510
|
-
// const { transform, mapChildrenField } = treeOpts
|
|
8511
|
-
// const rowkey = getRowkey($xeTable)
|
|
8512
|
-
// if (treeConfig) {
|
|
8513
|
-
// if (transform) {
|
|
8514
|
-
// return []
|
|
8515
|
-
// }
|
|
8516
|
-
// return []
|
|
8517
|
-
// }
|
|
8518
|
-
// return rows.map(item => {
|
|
8519
|
-
// const obj = Object.assign({}, item)
|
|
8520
|
-
// delete obj.rowkey
|
|
8521
|
-
// return obj
|
|
8522
|
-
// })
|
|
8523
|
-
// },
|
|
8524
8525
|
/**
|
|
8525
8526
|
* 还原数据
|
|
8526
8527
|
* 如果不传任何参数,则还原整个表格
|
|
@@ -8529,16 +8530,30 @@ const Methods = {
|
|
|
8529
8530
|
* 如果还额外传了 field 则还原指定的单元格数据
|
|
8530
8531
|
*/
|
|
8531
8532
|
revertData(rows, field) {
|
|
8533
|
+
const $xeTable = this;
|
|
8534
|
+
const props = $xeTable;
|
|
8535
|
+
const reactData = $xeTable;
|
|
8536
|
+
const internalData = $xeTable;
|
|
8532
8537
|
const {
|
|
8533
8538
|
keepSource,
|
|
8534
|
-
tableSourceData,
|
|
8535
8539
|
treeConfig
|
|
8536
|
-
} =
|
|
8540
|
+
} = props;
|
|
8541
|
+
const {
|
|
8542
|
+
fullAllDataRowIdData,
|
|
8543
|
+
tableSourceData,
|
|
8544
|
+
sourceDataRowIdData,
|
|
8545
|
+
tableFullData,
|
|
8546
|
+
afterFullData
|
|
8547
|
+
} = internalData;
|
|
8548
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
8549
|
+
const {
|
|
8550
|
+
transform
|
|
8551
|
+
} = treeOpts;
|
|
8537
8552
|
if (!keepSource) {
|
|
8538
8553
|
if (true) {
|
|
8539
8554
|
warnLog('vxe.error.reqProp', ['keep-source']);
|
|
8540
8555
|
}
|
|
8541
|
-
return
|
|
8556
|
+
return $xeTable.$nextTick();
|
|
8542
8557
|
}
|
|
8543
8558
|
let targetRows = rows;
|
|
8544
8559
|
if (rows) {
|
|
@@ -8546,30 +8561,52 @@ const Methods = {
|
|
|
8546
8561
|
targetRows = [rows];
|
|
8547
8562
|
}
|
|
8548
8563
|
} else {
|
|
8549
|
-
targetRows = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArray(
|
|
8564
|
+
targetRows = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArray($xeTable.getUpdateRecords());
|
|
8550
8565
|
}
|
|
8566
|
+
let reDelFlag = false;
|
|
8551
8567
|
if (targetRows.length) {
|
|
8552
8568
|
targetRows.forEach(row => {
|
|
8553
|
-
if (
|
|
8554
|
-
const
|
|
8555
|
-
|
|
8556
|
-
errLog('vxe.error.noTree', ['revertData']);
|
|
8557
|
-
}
|
|
8558
|
-
const oRow = tableSourceData[rowIndex];
|
|
8569
|
+
if (!$xeTable.isInsertByRow(row)) {
|
|
8570
|
+
const rowid = getRowid($xeTable, row);
|
|
8571
|
+
const oRow = sourceDataRowIdData[rowid];
|
|
8559
8572
|
if (oRow && row) {
|
|
8560
8573
|
if (field) {
|
|
8561
8574
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, field, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(oRow, field), true));
|
|
8562
8575
|
} else {
|
|
8563
8576
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().destructuring(row, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(oRow, true));
|
|
8564
8577
|
}
|
|
8578
|
+
if ($xeTable.isRemoveByRow(row)) {
|
|
8579
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
8580
|
+
if (rowRest) {
|
|
8581
|
+
const reRow = rowRest.row;
|
|
8582
|
+
tableFullData.unshift(reRow);
|
|
8583
|
+
afterFullData.unshift(reRow);
|
|
8584
|
+
reDelFlag = true;
|
|
8585
|
+
}
|
|
8586
|
+
}
|
|
8565
8587
|
}
|
|
8566
8588
|
}
|
|
8567
8589
|
});
|
|
8568
8590
|
}
|
|
8569
8591
|
if (rows) {
|
|
8570
|
-
|
|
8592
|
+
if (reDelFlag) {
|
|
8593
|
+
$xeTable.updateFooter();
|
|
8594
|
+
$xeTable.cacheRowMap(false);
|
|
8595
|
+
$xeTable.handleTableData(treeConfig && transform);
|
|
8596
|
+
if (!(treeConfig && transform)) {
|
|
8597
|
+
$xeTable.updateAfterDataIndex();
|
|
8598
|
+
}
|
|
8599
|
+
$xeTable.checkSelectionStatus();
|
|
8600
|
+
if (reactData.scrollYLoad) {
|
|
8601
|
+
$xeTable.updateScrollYSpace();
|
|
8602
|
+
}
|
|
8603
|
+
}
|
|
8604
|
+
return $xeTable.$nextTick().then(() => {
|
|
8605
|
+
$xeTable.updateCellAreas();
|
|
8606
|
+
return $xeTable.recalculate();
|
|
8607
|
+
});
|
|
8571
8608
|
}
|
|
8572
|
-
return
|
|
8609
|
+
return $xeTable.reloadData(tableSourceData);
|
|
8573
8610
|
},
|
|
8574
8611
|
/**
|
|
8575
8612
|
* 清空单元格内容
|
|
@@ -8641,6 +8678,7 @@ const Methods = {
|
|
|
8641
8678
|
},
|
|
8642
8679
|
getCellLabel(row, fieldOrColumn) {
|
|
8643
8680
|
const $xeTable = this;
|
|
8681
|
+
const internalData = $xeTable;
|
|
8644
8682
|
const column = handleFieldOrColumn(this, fieldOrColumn);
|
|
8645
8683
|
if (!column) {
|
|
8646
8684
|
return null;
|
|
@@ -8652,7 +8690,7 @@ const Methods = {
|
|
|
8652
8690
|
let formatData;
|
|
8653
8691
|
const {
|
|
8654
8692
|
fullAllDataRowIdData
|
|
8655
|
-
} =
|
|
8693
|
+
} = internalData;
|
|
8656
8694
|
const rowid = getRowid($xeTable, row);
|
|
8657
8695
|
const colid = column.id;
|
|
8658
8696
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
@@ -8699,12 +8737,23 @@ const Methods = {
|
|
|
8699
8737
|
* @param {Row} row 行对象
|
|
8700
8738
|
*/
|
|
8701
8739
|
isInsertByRow(row) {
|
|
8740
|
+
const $xeTable = this;
|
|
8741
|
+
const reactData = $xeTable;
|
|
8702
8742
|
const {
|
|
8703
8743
|
editStore
|
|
8704
|
-
} =
|
|
8705
|
-
const rowid = getRowid(
|
|
8744
|
+
} = reactData;
|
|
8745
|
+
const rowid = getRowid($xeTable, row);
|
|
8706
8746
|
return !!editStore.insertMaps[rowid];
|
|
8707
8747
|
},
|
|
8748
|
+
isRemoveByRow(row) {
|
|
8749
|
+
const $xeTable = this;
|
|
8750
|
+
const reactData = $xeTable;
|
|
8751
|
+
const {
|
|
8752
|
+
editStore
|
|
8753
|
+
} = reactData;
|
|
8754
|
+
const rowid = getRowid($xeTable, row);
|
|
8755
|
+
return !!editStore.removeMaps[rowid];
|
|
8756
|
+
},
|
|
8708
8757
|
/**
|
|
8709
8758
|
* 删除所有新增的临时数据
|
|
8710
8759
|
* @returns
|
|
@@ -15541,19 +15590,17 @@ const Methods = {
|
|
|
15541
15590
|
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(',');
|
|
15542
15591
|
funcs.forEach(name => {
|
|
15543
15592
|
Methods[name] = function (...args) {
|
|
15544
|
-
if (
|
|
15545
|
-
if (
|
|
15546
|
-
|
|
15547
|
-
|
|
15548
|
-
|
|
15549
|
-
|
|
15550
|
-
|
|
15551
|
-
|
|
15552
|
-
|
|
15553
|
-
|
|
15554
|
-
|
|
15555
|
-
errLog('vxe.error.reqModule', ['VxeTableCustomModule']);
|
|
15556
|
-
}
|
|
15593
|
+
if (!this[`_${name}`]) {
|
|
15594
|
+
if ('openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',').includes(name)) {
|
|
15595
|
+
errLog('vxe.error.reqModule', ['VxeTableExportModule']);
|
|
15596
|
+
} else if ('fullValidate,validate'.split(',').includes(name)) {
|
|
15597
|
+
errLog('vxe.error.reqModule', ['VxeTableValidatorModule']);
|
|
15598
|
+
} else if ('setFilter,openFilter,clearFilter,getCheckedFilters'.split(',').includes(name)) {
|
|
15599
|
+
errLog('vxe.error.reqModule', ['VxeTableFilterModule']);
|
|
15600
|
+
} else if ('insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell'.split(',').includes(name)) {
|
|
15601
|
+
errLog('vxe.error.reqModule', ['VxeTableEditModule']);
|
|
15602
|
+
} else if ('openCustom'.split(',').includes(name)) {
|
|
15603
|
+
errLog('vxe.error.reqModule', ['VxeTableCustomModule']);
|
|
15557
15604
|
}
|
|
15558
15605
|
}
|
|
15559
15606
|
return this[`_${name}`] ? this[`_${name}`](...args) : null;
|
|
@@ -18394,39 +18441,37 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
18394
18441
|
},
|
|
18395
18442
|
computed: {},
|
|
18396
18443
|
created() {
|
|
18397
|
-
|
|
18398
|
-
|
|
18399
|
-
|
|
18400
|
-
|
|
18401
|
-
|
|
18402
|
-
|
|
18403
|
-
|
|
18404
|
-
|
|
18405
|
-
|
|
18406
|
-
|
|
18407
|
-
|
|
18408
|
-
|
|
18409
|
-
|
|
18410
|
-
|
|
18411
|
-
|
|
18412
|
-
|
|
18413
|
-
|
|
18414
|
-
|
|
18415
|
-
|
|
18416
|
-
|
|
18417
|
-
|
|
18418
|
-
|
|
18419
|
-
|
|
18420
|
-
|
|
18421
|
-
|
|
18422
|
-
|
|
18423
|
-
|
|
18424
|
-
|
|
18425
|
-
|
|
18426
|
-
|
|
18427
|
-
|
|
18428
|
-
});
|
|
18429
|
-
}
|
|
18444
|
+
const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
|
|
18445
|
+
const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
|
|
18446
|
+
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
18447
|
+
const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeNumberInput');
|
|
18448
|
+
const VxeUIRadioGroupComponent = core_.VxeUI.getComponent('VxeRadioGroup');
|
|
18449
|
+
this.$nextTick(() => {
|
|
18450
|
+
const {
|
|
18451
|
+
$xetable
|
|
18452
|
+
} = this;
|
|
18453
|
+
const {
|
|
18454
|
+
customOpts
|
|
18455
|
+
} = $xetable;
|
|
18456
|
+
const {
|
|
18457
|
+
mode
|
|
18458
|
+
} = customOpts;
|
|
18459
|
+
if (!VxeUIModalComponent) {
|
|
18460
|
+
errLog('vxe.error.reqComp', ['vxe-modal']);
|
|
18461
|
+
}
|
|
18462
|
+
if (!VxeUIDrawerComponent && mode === 'drawer') {
|
|
18463
|
+
errLog('vxe.error.reqComp', ['vxe-drawer']);
|
|
18464
|
+
}
|
|
18465
|
+
if (!VxeUIButtonComponent) {
|
|
18466
|
+
errLog('vxe.error.reqComp', ['vxe-button']);
|
|
18467
|
+
}
|
|
18468
|
+
if (!VxeUINumberInputComponent) {
|
|
18469
|
+
errLog('vxe.error.reqComp', ['vxe-input']);
|
|
18470
|
+
}
|
|
18471
|
+
if (!VxeUIRadioGroupComponent) {
|
|
18472
|
+
errLog('vxe.error.reqComp', ['vxe-radio-group']);
|
|
18473
|
+
}
|
|
18474
|
+
});
|
|
18430
18475
|
},
|
|
18431
18476
|
render(h) {
|
|
18432
18477
|
const $xeTable = this.$xeTable;
|
|
@@ -19163,22 +19208,20 @@ const {
|
|
|
19163
19208
|
},
|
|
19164
19209
|
created() {
|
|
19165
19210
|
const $xeTableImportPanel = this;
|
|
19166
|
-
|
|
19167
|
-
|
|
19168
|
-
|
|
19169
|
-
|
|
19170
|
-
|
|
19171
|
-
|
|
19172
|
-
|
|
19173
|
-
|
|
19174
|
-
|
|
19175
|
-
|
|
19176
|
-
|
|
19177
|
-
|
|
19178
|
-
|
|
19179
|
-
|
|
19180
|
-
});
|
|
19181
|
-
}
|
|
19211
|
+
const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
|
|
19212
|
+
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
19213
|
+
const VxeUISelectComponent = core_.VxeUI.getComponent('VxeSelect');
|
|
19214
|
+
$xeTableImportPanel.$nextTick(() => {
|
|
19215
|
+
if (!VxeUIModalComponent) {
|
|
19216
|
+
errLog('vxe.error.reqComp', ['vxe-modal']);
|
|
19217
|
+
}
|
|
19218
|
+
if (!VxeUIButtonComponent) {
|
|
19219
|
+
errLog('vxe.error.reqComp', ['vxe-button']);
|
|
19220
|
+
}
|
|
19221
|
+
if (!VxeUISelectComponent) {
|
|
19222
|
+
errLog('vxe.error.reqComp', ['vxe-select']);
|
|
19223
|
+
}
|
|
19224
|
+
});
|
|
19182
19225
|
},
|
|
19183
19226
|
render(h) {
|
|
19184
19227
|
const $xeTable = this.$xeTable;
|
|
@@ -19411,30 +19454,28 @@ const {
|
|
|
19411
19454
|
},
|
|
19412
19455
|
created() {
|
|
19413
19456
|
const $xeTableExportPanel = this;
|
|
19414
|
-
|
|
19415
|
-
|
|
19416
|
-
|
|
19417
|
-
|
|
19418
|
-
|
|
19419
|
-
|
|
19420
|
-
|
|
19421
|
-
|
|
19422
|
-
|
|
19423
|
-
|
|
19424
|
-
|
|
19425
|
-
|
|
19426
|
-
|
|
19427
|
-
|
|
19428
|
-
|
|
19429
|
-
|
|
19430
|
-
|
|
19431
|
-
|
|
19432
|
-
|
|
19433
|
-
|
|
19434
|
-
|
|
19435
|
-
|
|
19436
|
-
});
|
|
19437
|
-
}
|
|
19457
|
+
const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
|
|
19458
|
+
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
19459
|
+
const VxeUISelectComponent = core_.VxeUI.getComponent('VxeSelect');
|
|
19460
|
+
const VxeUIInputComponent = core_.VxeUI.getComponent('VxeInput');
|
|
19461
|
+
const VxeUICheckboxComponent = core_.VxeUI.getComponent('VxeCheckbox');
|
|
19462
|
+
$xeTableExportPanel.$nextTick(() => {
|
|
19463
|
+
if (!VxeUIModalComponent) {
|
|
19464
|
+
errLog('vxe.error.reqComp', ['vxe-modal']);
|
|
19465
|
+
}
|
|
19466
|
+
if (!VxeUIButtonComponent) {
|
|
19467
|
+
errLog('vxe.error.reqComp', ['vxe-button']);
|
|
19468
|
+
}
|
|
19469
|
+
if (!VxeUISelectComponent) {
|
|
19470
|
+
errLog('vxe.error.reqComp', ['vxe-select']);
|
|
19471
|
+
}
|
|
19472
|
+
if (!VxeUIInputComponent) {
|
|
19473
|
+
errLog('vxe.error.reqComp', ['vxe-input']);
|
|
19474
|
+
}
|
|
19475
|
+
if (!VxeUICheckboxComponent) {
|
|
19476
|
+
errLog('vxe.error.reqComp', ['vxe-checkbox']);
|
|
19477
|
+
}
|
|
19478
|
+
});
|
|
19438
19479
|
},
|
|
19439
19480
|
render(h) {
|
|
19440
19481
|
const $xeTable = this.$xeTable;
|
|
@@ -22603,10 +22644,8 @@ function downloadFile($xetable, opts, content) {
|
|
|
22603
22644
|
}).then(() => {
|
|
22604
22645
|
if (opts.message !== false) {
|
|
22605
22646
|
// 检测弹窗模块
|
|
22606
|
-
if (
|
|
22607
|
-
|
|
22608
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
22609
|
-
}
|
|
22647
|
+
if (!core_.VxeUI.modal) {
|
|
22648
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
22610
22649
|
}
|
|
22611
22650
|
core_.VxeUI.modal.message({
|
|
22612
22651
|
content: export_mixin_getI18n('vxe.table.expSuccess'),
|
|
@@ -22887,10 +22926,8 @@ function handleImport($xeTable, content, opts) {
|
|
|
22887
22926
|
}
|
|
22888
22927
|
if (opts.message !== false) {
|
|
22889
22928
|
// 检测弹窗模块
|
|
22890
|
-
if (
|
|
22891
|
-
|
|
22892
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
22893
|
-
}
|
|
22929
|
+
if (!core_.VxeUI.modal) {
|
|
22930
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
22894
22931
|
}
|
|
22895
22932
|
core_.VxeUI.modal.message({
|
|
22896
22933
|
content: export_mixin_getI18n('vxe.table.impSuccess', [rows.length]),
|
|
@@ -22907,10 +22944,8 @@ function handleImport($xeTable, content, opts) {
|
|
|
22907
22944
|
});
|
|
22908
22945
|
} else if (opts.message !== false) {
|
|
22909
22946
|
// 检测弹窗模块
|
|
22910
|
-
if (
|
|
22911
|
-
|
|
22912
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
22913
|
-
}
|
|
22947
|
+
if (!core_.VxeUI.modal) {
|
|
22948
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
22914
22949
|
}
|
|
22915
22950
|
core_.VxeUI.modal.message({
|
|
22916
22951
|
content: export_mixin_getI18n('vxe.error.impFields'),
|
|
@@ -22939,10 +22974,8 @@ function handleFileImport($xetable, file, opts) {
|
|
|
22939
22974
|
if (!importMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(importOpts._typeMaps), type)) {
|
|
22940
22975
|
if (opts.message !== false) {
|
|
22941
22976
|
// 检测弹窗模块
|
|
22942
|
-
if (
|
|
22943
|
-
|
|
22944
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
22945
|
-
}
|
|
22977
|
+
if (!core_.VxeUI.modal) {
|
|
22978
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
22946
22979
|
}
|
|
22947
22980
|
core_.VxeUI.modal.message({
|
|
22948
22981
|
content: export_mixin_getI18n('vxe.error.notType', [type]),
|
|
@@ -23015,9 +23048,7 @@ function handleFileImport($xetable, file, opts) {
|
|
|
23015
23048
|
}
|
|
23016
23049
|
} else {
|
|
23017
23050
|
// 不支持的浏览器
|
|
23018
|
-
|
|
23019
|
-
errLog('vxe.error.notExp');
|
|
23020
|
-
}
|
|
23051
|
+
errLog('vxe.error.notExp');
|
|
23021
23052
|
_importResolve({
|
|
23022
23053
|
status: true
|
|
23023
23054
|
});
|
|
@@ -23094,10 +23125,8 @@ function readLocalFile(options = {}) {
|
|
|
23094
23125
|
} else {
|
|
23095
23126
|
if (options.message !== false) {
|
|
23096
23127
|
// 检测弹窗模块
|
|
23097
|
-
if (
|
|
23098
|
-
|
|
23099
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
23100
|
-
}
|
|
23128
|
+
if (!core_.VxeUI.modal) {
|
|
23129
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
23101
23130
|
}
|
|
23102
23131
|
core_.VxeUI.modal.message({
|
|
23103
23132
|
content: export_mixin_getI18n('vxe.error.notType', [errType]),
|
|
@@ -23863,10 +23892,8 @@ const convertToRows = originColumns => {
|
|
|
23863
23892
|
const {
|
|
23864
23893
|
exportOpts
|
|
23865
23894
|
} = this;
|
|
23866
|
-
if (
|
|
23867
|
-
|
|
23868
|
-
errLog('vxe.error.reqProp', ['export-config']);
|
|
23869
|
-
}
|
|
23895
|
+
if (!this.exportConfig) {
|
|
23896
|
+
errLog('vxe.error.reqProp', ['export-config']);
|
|
23870
23897
|
}
|
|
23871
23898
|
return handleExportAndPrint(this, Object.assign({}, exportOpts, options));
|
|
23872
23899
|
},
|
|
@@ -23875,10 +23902,8 @@ const convertToRows = originColumns => {
|
|
|
23875
23902
|
const {
|
|
23876
23903
|
printOpts
|
|
23877
23904
|
} = this;
|
|
23878
|
-
if (
|
|
23879
|
-
|
|
23880
|
-
errLog('vxe.error.reqProp', ['print-config']);
|
|
23881
|
-
}
|
|
23905
|
+
if (!this.printConfig) {
|
|
23906
|
+
errLog('vxe.error.reqProp', ['print-config']);
|
|
23882
23907
|
}
|
|
23883
23908
|
return handleExportAndPrint(this, Object.assign({}, printOpts, options), true);
|
|
23884
23909
|
}
|
|
@@ -24764,9 +24789,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
24764
24789
|
}
|
|
24765
24790
|
}
|
|
24766
24791
|
} else {
|
|
24767
|
-
|
|
24768
|
-
errLog('vxe.error.notValidators', [validator]);
|
|
24769
|
-
}
|
|
24792
|
+
errLog('vxe.error.notValidators', [validator]);
|
|
24770
24793
|
}
|
|
24771
24794
|
} else {
|
|
24772
24795
|
customValid = validator(validParams);
|
|
@@ -26866,23 +26889,21 @@ function renderBody(h, $xeTable) {
|
|
|
26866
26889
|
warnLog('vxe.error.reqProp', ['tooltip-config']);
|
|
26867
26890
|
}
|
|
26868
26891
|
}
|
|
26869
|
-
|
|
26870
|
-
|
|
26871
|
-
|
|
26872
|
-
|
|
26873
|
-
|
|
26874
|
-
if (
|
|
26875
|
-
|
|
26876
|
-
errLog('vxe.error.reqComp', ['vxe-loading']);
|
|
26877
|
-
}
|
|
26892
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
26893
|
+
const VxeUILoadingComponent = core_.VxeUI.getComponent('VxeLoading');
|
|
26894
|
+
const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
|
|
26895
|
+
$xeTable.$nextTick(() => {
|
|
26896
|
+
if (props.loading) {
|
|
26897
|
+
if (!VxeUILoadingComponent && !this.$scopedSlots.loading) {
|
|
26898
|
+
errLog('vxe.error.reqComp', ['vxe-loading']);
|
|
26878
26899
|
}
|
|
26879
|
-
|
|
26880
|
-
|
|
26881
|
-
|
|
26882
|
-
|
|
26900
|
+
}
|
|
26901
|
+
if (props.showOverflow === true || props.showOverflow === 'tooltip' || props.showHeaderOverflow === true || props.showHeaderOverflow === 'tooltip' || props.showFooterOverflow === true || props.showFooterOverflow === 'tooltip' || props.tooltipConfig || props.editRules) {
|
|
26902
|
+
if (!VxeUITooltipComponent) {
|
|
26903
|
+
errLog('vxe.error.reqComp', ['vxe-tooltip']);
|
|
26883
26904
|
}
|
|
26884
|
-
}
|
|
26885
|
-
}
|
|
26905
|
+
}
|
|
26906
|
+
});
|
|
26886
26907
|
if (this.autoResize) {
|
|
26887
26908
|
const resizeObserver = table_globalResize.create(() => {
|
|
26888
26909
|
if (this.autoResize) {
|
|
@@ -27499,9 +27520,7 @@ const {
|
|
|
27499
27520
|
if (tCommandMethod) {
|
|
27500
27521
|
tCommandMethod(params);
|
|
27501
27522
|
} else {
|
|
27502
|
-
|
|
27503
|
-
errLog('vxe.error.notCommands', [code]);
|
|
27504
|
-
}
|
|
27523
|
+
errLog('vxe.error.notCommands', [code]);
|
|
27505
27524
|
}
|
|
27506
27525
|
}
|
|
27507
27526
|
$xeToolbar.dispatchEvent('button-click', params, evnt);
|
|
@@ -27536,9 +27555,7 @@ const {
|
|
|
27536
27555
|
if (tCommandMethod) {
|
|
27537
27556
|
tCommandMethod(params);
|
|
27538
27557
|
} else {
|
|
27539
|
-
|
|
27540
|
-
errLog('vxe.error.notCommands', [code]);
|
|
27541
|
-
}
|
|
27558
|
+
errLog('vxe.error.notCommands', [code]);
|
|
27542
27559
|
}
|
|
27543
27560
|
}
|
|
27544
27561
|
$xeToolbar.dispatchEvent('tool-click', params, evnt);
|
|
@@ -27991,28 +28008,24 @@ const {
|
|
|
27991
28008
|
$xetable.connect(this);
|
|
27992
28009
|
}
|
|
27993
28010
|
const customOpts = $xeToolbar.computeCustomOpts;
|
|
27994
|
-
if (
|
|
27995
|
-
|
|
27996
|
-
|
|
27997
|
-
|
|
27998
|
-
|
|
27999
|
-
|
|
28000
|
-
|
|
28001
|
-
|
|
28002
|
-
|
|
28003
|
-
|
|
28004
|
-
|
|
28005
|
-
warnLog('vxe.error.delProp', ['toolbar.custom.trigger', 'table.custom-config.trigger']);
|
|
28006
|
-
}
|
|
28011
|
+
if (customOpts.isFooter) {
|
|
28012
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.isFooter', 'table.custom-config.showFooter']);
|
|
28013
|
+
}
|
|
28014
|
+
if (customOpts.showFooter) {
|
|
28015
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.showFooter', 'table.custom-config.showFooter']);
|
|
28016
|
+
}
|
|
28017
|
+
if (customOpts.immediate) {
|
|
28018
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.immediate', 'table.custom-config.immediate']);
|
|
28019
|
+
}
|
|
28020
|
+
if (customOpts.trigger) {
|
|
28021
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.trigger', 'table.custom-config.trigger']);
|
|
28007
28022
|
}
|
|
28008
28023
|
});
|
|
28009
|
-
|
|
28010
|
-
|
|
28011
|
-
|
|
28012
|
-
if (
|
|
28013
|
-
|
|
28014
|
-
errLog('vxe.error.reqComp', ['vxe-button']);
|
|
28015
|
-
}
|
|
28024
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
28025
|
+
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
28026
|
+
if (props.refresh || props.import || props.export || props.print || props.zoom) {
|
|
28027
|
+
if (!VxeUIButtonComponent) {
|
|
28028
|
+
errLog('vxe.error.reqComp', ['vxe-button']);
|
|
28016
28029
|
}
|
|
28017
28030
|
}
|
|
28018
28031
|
},
|
|
@@ -28102,9 +28115,7 @@ function getFuncSlot($xeGrid, optSlots, slotKey) {
|
|
|
28102
28115
|
if (slots[funcSlot]) {
|
|
28103
28116
|
return slots[funcSlot];
|
|
28104
28117
|
} else {
|
|
28105
|
-
|
|
28106
|
-
errLog('vxe.error.notSlot', [funcSlot]);
|
|
28107
|
-
}
|
|
28118
|
+
errLog('vxe.error.notSlot', [funcSlot]);
|
|
28108
28119
|
}
|
|
28109
28120
|
} else {
|
|
28110
28121
|
return funcSlot;
|
|
@@ -28635,23 +28646,21 @@ Object.keys(table.methods).forEach(name => {
|
|
|
28635
28646
|
// warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
|
|
28636
28647
|
// }
|
|
28637
28648
|
}
|
|
28638
|
-
|
|
28639
|
-
|
|
28640
|
-
|
|
28641
|
-
|
|
28642
|
-
|
|
28643
|
-
if (
|
|
28644
|
-
|
|
28645
|
-
errLog('vxe.error.reqComp', ['vxe-form']);
|
|
28646
|
-
}
|
|
28649
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
28650
|
+
const VxeUIFormComponent = core_.VxeUI.getComponent('VxeForm');
|
|
28651
|
+
const VxeUIPagerComponent = core_.VxeUI.getComponent('VxePager');
|
|
28652
|
+
$xeGrid.$nextTick(() => {
|
|
28653
|
+
if (props.formConfig) {
|
|
28654
|
+
if (!VxeUIFormComponent) {
|
|
28655
|
+
errLog('vxe.error.reqComp', ['vxe-form']);
|
|
28647
28656
|
}
|
|
28648
|
-
|
|
28649
|
-
|
|
28650
|
-
|
|
28651
|
-
|
|
28657
|
+
}
|
|
28658
|
+
if (props.pagerConfig) {
|
|
28659
|
+
if (!VxeUIPagerComponent) {
|
|
28660
|
+
errLog('vxe.error.reqComp', ['vxe-pager']);
|
|
28652
28661
|
}
|
|
28653
|
-
}
|
|
28654
|
-
}
|
|
28662
|
+
}
|
|
28663
|
+
});
|
|
28655
28664
|
this.initPages();
|
|
28656
28665
|
grid_globalEvents.on(this, 'keydown', this.handleGlobalKeydownEvent);
|
|
28657
28666
|
},
|
|
@@ -29024,9 +29033,7 @@ Object.keys(table.methods).forEach(name => {
|
|
|
29024
29033
|
};
|
|
29025
29034
|
});
|
|
29026
29035
|
} else {
|
|
29027
|
-
|
|
29028
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.query']);
|
|
29029
|
-
}
|
|
29036
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.query']);
|
|
29030
29037
|
}
|
|
29031
29038
|
break;
|
|
29032
29039
|
}
|
|
@@ -29061,10 +29068,8 @@ Object.keys(table.methods).forEach(name => {
|
|
|
29061
29068
|
$xeTable.setPendingRow(removeRecords, false);
|
|
29062
29069
|
if (isRespMsg) {
|
|
29063
29070
|
// 检测弹窗模块
|
|
29064
|
-
if (
|
|
29065
|
-
|
|
29066
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
29067
|
-
}
|
|
29071
|
+
if (!core_.VxeUI.modal) {
|
|
29072
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
29068
29073
|
}
|
|
29069
29074
|
core_.VxeUI.modal.message({
|
|
29070
29075
|
content: this.getRespMsg(rest, 'vxe.grid.delSuccess'),
|
|
@@ -29089,10 +29094,8 @@ Object.keys(table.methods).forEach(name => {
|
|
|
29089
29094
|
this.tableLoading = false;
|
|
29090
29095
|
if (isRespMsg) {
|
|
29091
29096
|
// 检测弹窗模块
|
|
29092
|
-
if (
|
|
29093
|
-
|
|
29094
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
29095
|
-
}
|
|
29097
|
+
if (!core_.VxeUI.modal) {
|
|
29098
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
29096
29099
|
}
|
|
29097
29100
|
core_.VxeUI.modal.message({
|
|
29098
29101
|
id: code,
|
|
@@ -29114,10 +29117,8 @@ Object.keys(table.methods).forEach(name => {
|
|
|
29114
29117
|
} else {
|
|
29115
29118
|
if (isActiveMsg) {
|
|
29116
29119
|
// 检测弹窗模块
|
|
29117
|
-
if (
|
|
29118
|
-
|
|
29119
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
29120
|
-
}
|
|
29120
|
+
if (!core_.VxeUI.modal) {
|
|
29121
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
29121
29122
|
}
|
|
29122
29123
|
core_.VxeUI.modal.message({
|
|
29123
29124
|
id: code,
|
|
@@ -29127,9 +29128,7 @@ Object.keys(table.methods).forEach(name => {
|
|
|
29127
29128
|
}
|
|
29128
29129
|
}
|
|
29129
29130
|
} else {
|
|
29130
|
-
|
|
29131
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete']);
|
|
29132
|
-
}
|
|
29131
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete']);
|
|
29133
29132
|
}
|
|
29134
29133
|
break;
|
|
29135
29134
|
}
|
|
@@ -29180,10 +29179,8 @@ Object.keys(table.methods).forEach(name => {
|
|
|
29180
29179
|
$xeTable.clearPendingRow();
|
|
29181
29180
|
if (isRespMsg) {
|
|
29182
29181
|
// 检测弹窗模块
|
|
29183
|
-
if (
|
|
29184
|
-
|
|
29185
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
29186
|
-
}
|
|
29182
|
+
if (!core_.VxeUI.modal) {
|
|
29183
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
29187
29184
|
}
|
|
29188
29185
|
core_.VxeUI.modal.message({
|
|
29189
29186
|
content: this.getRespMsg(rest, 'vxe.grid.saveSuccess'),
|
|
@@ -29208,10 +29205,8 @@ Object.keys(table.methods).forEach(name => {
|
|
|
29208
29205
|
this.tableLoading = false;
|
|
29209
29206
|
if (isRespMsg) {
|
|
29210
29207
|
// 检测弹窗模块
|
|
29211
|
-
if (
|
|
29212
|
-
|
|
29213
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
29214
|
-
}
|
|
29208
|
+
if (!core_.VxeUI.modal) {
|
|
29209
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
29215
29210
|
}
|
|
29216
29211
|
core_.VxeUI.modal.message({
|
|
29217
29212
|
id: code,
|
|
@@ -29232,10 +29227,8 @@ Object.keys(table.methods).forEach(name => {
|
|
|
29232
29227
|
} else {
|
|
29233
29228
|
if (isActiveMsg) {
|
|
29234
29229
|
// 检测弹窗模块
|
|
29235
|
-
if (
|
|
29236
|
-
|
|
29237
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
29238
|
-
}
|
|
29230
|
+
if (!core_.VxeUI.modal) {
|
|
29231
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
29239
29232
|
}
|
|
29240
29233
|
core_.VxeUI.modal.message({
|
|
29241
29234
|
id: code,
|
|
@@ -29246,9 +29239,7 @@ Object.keys(table.methods).forEach(name => {
|
|
|
29246
29239
|
}
|
|
29247
29240
|
});
|
|
29248
29241
|
} else {
|
|
29249
|
-
|
|
29250
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.save']);
|
|
29251
|
-
}
|
|
29242
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.save']);
|
|
29252
29243
|
}
|
|
29253
29244
|
break;
|
|
29254
29245
|
}
|
|
@@ -29264,9 +29255,7 @@ Object.keys(table.methods).forEach(name => {
|
|
|
29264
29255
|
$table: $xeTable
|
|
29265
29256
|
}, ...args);
|
|
29266
29257
|
} else {
|
|
29267
|
-
|
|
29268
|
-
errLog('vxe.error.notCommands', [code]);
|
|
29269
|
-
}
|
|
29258
|
+
errLog('vxe.error.notCommands', [code]);
|
|
29270
29259
|
}
|
|
29271
29260
|
}
|
|
29272
29261
|
}
|
|
@@ -29299,10 +29288,8 @@ Object.keys(table.methods).forEach(name => {
|
|
|
29299
29288
|
});
|
|
29300
29289
|
} else {
|
|
29301
29290
|
// 检测弹窗模块
|
|
29302
|
-
if (
|
|
29303
|
-
|
|
29304
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
29305
|
-
}
|
|
29291
|
+
if (!core_.VxeUI.modal) {
|
|
29292
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
29306
29293
|
}
|
|
29307
29294
|
core_.VxeUI.modal.message({
|
|
29308
29295
|
id: `msg_${code}`,
|
|
@@ -29383,10 +29370,8 @@ Object.keys(table.methods).forEach(name => {
|
|
|
29383
29370
|
} else {
|
|
29384
29371
|
if (isActiveMsg) {
|
|
29385
29372
|
// 检测弹窗模块
|
|
29386
|
-
if (
|
|
29387
|
-
|
|
29388
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
29389
|
-
}
|
|
29373
|
+
if (!core_.VxeUI.modal) {
|
|
29374
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
29390
29375
|
}
|
|
29391
29376
|
core_.VxeUI.modal.message({
|
|
29392
29377
|
id: code,
|
|
@@ -29809,10 +29794,8 @@ function getComponentOns(renderOpts, params, eFns) {
|
|
|
29809
29794
|
const ons = {};
|
|
29810
29795
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().objectEach(events, (func, key) => {
|
|
29811
29796
|
ons[getOnName(key)] = function (...args) {
|
|
29812
|
-
if (
|
|
29813
|
-
|
|
29814
|
-
errLog('vxe.error.errFunc', [func]);
|
|
29815
|
-
}
|
|
29797
|
+
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(func)) {
|
|
29798
|
+
errLog('vxe.error.errFunc', [func]);
|
|
29816
29799
|
}
|
|
29817
29800
|
func(params, ...args);
|
|
29818
29801
|
};
|