vxe-table 3.13.17 → 3.13.18
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 +2 -4
- package/es/table/src/columnInfo.js +30 -32
- package/es/table/src/methods.js +113 -68
- 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 +324 -336
- 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 +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 +121 -65
- 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 +2 -4
- package/packages/table/src/columnInfo.ts +30 -32
- package/packages/table/src/methods.ts +115 -66
- 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.1741140503645.ttf} +0 -0
- /package/es/{iconfont.1741051533862.woff → iconfont.1741140503645.woff} +0 -0
- /package/es/{iconfont.1741051533862.woff2 → iconfont.1741140503645.woff2} +0 -0
- /package/lib/{iconfont.1741051533862.ttf → iconfont.1741140503645.ttf} +0 -0
- /package/lib/{iconfont.1741051533862.woff → iconfont.1741140503645.woff} +0 -0
- /package/lib/{iconfont.1741051533862.woff2 → iconfont.1741140503645.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -3201,7 +3201,7 @@ function getClass(property, params) {
|
|
|
3201
3201
|
;// ./packages/ui/index.ts
|
|
3202
3202
|
|
|
3203
3203
|
|
|
3204
|
-
const version = "3.13.
|
|
3204
|
+
const version = "3.13.18";
|
|
3205
3205
|
core_.VxeUI.version = version;
|
|
3206
3206
|
core_.VxeUI.tableVersion = version;
|
|
3207
3207
|
core_.VxeUI.setConfig({
|
|
@@ -3828,7 +3828,7 @@ var es_iterator_map = __webpack_require__(1701);
|
|
|
3828
3828
|
const {
|
|
3829
3829
|
log: log_log
|
|
3830
3830
|
} = core_.VxeUI;
|
|
3831
|
-
const log_version = `table v${"3.13.
|
|
3831
|
+
const log_version = `table v${"3.13.18"}`;
|
|
3832
3832
|
const warnLog = log_log.create('warn', log_version);
|
|
3833
3833
|
const errLog = log_log.create('error', log_version);
|
|
3834
3834
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -3854,42 +3854,40 @@ class ColumnInfo {
|
|
|
3854
3854
|
const formatter = _vm.formatter;
|
|
3855
3855
|
const visible = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(_vm.visible) ? _vm.visible : true;
|
|
3856
3856
|
const tableProps = $xetable;
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3857
|
+
const types = ['seq', 'checkbox', 'radio', 'expand', 'html'];
|
|
3858
|
+
if (_vm.type && types.indexOf(_vm.type) === -1) {
|
|
3859
|
+
warnLog('vxe.error.errProp', [`type=${_vm.type}`, types.join(', ')]);
|
|
3860
|
+
}
|
|
3861
|
+
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)) {
|
|
3862
|
+
warnLog('vxe.error.errProp', [`column.cell-render=${_vm.cellRender}`, 'column.cell-render={}']);
|
|
3863
|
+
}
|
|
3864
|
+
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)) {
|
|
3865
|
+
warnLog('vxe.error.errProp', [`column.edit-render=${_vm.editRender}`, 'column.edit-render={}']);
|
|
3866
|
+
}
|
|
3867
|
+
if (_vm.type === 'expand') {
|
|
3868
|
+
const {
|
|
3869
|
+
treeConfig
|
|
3870
|
+
} = tableProps;
|
|
3871
|
+
if (treeConfig && ($xetable.treeOpts.showLine || $xetable.treeOpts.line)) {
|
|
3872
|
+
errLog('vxe.error.errConflicts', ['tree-config.line', 'column.type=expand']);
|
|
3867
3873
|
}
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
+
}
|
|
3875
|
+
if (_vm.remoteSort) {
|
|
3876
|
+
warnLog('vxe.error.delProp', ['column.remote-sort', 'sort-config.remote']);
|
|
3877
|
+
}
|
|
3878
|
+
if (_vm.sortMethod) {
|
|
3879
|
+
warnLog('vxe.error.delProp', ['column.sort-method', 'sort-config.sortMethod']);
|
|
3880
|
+
}
|
|
3881
|
+
if (formatter) {
|
|
3882
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(formatter)) {
|
|
3883
|
+
const gFormatOpts = columnInfo_formats.get(formatter) || (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default())[formatter];
|
|
3884
|
+
if (!gFormatOpts || !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod)) {
|
|
3885
|
+
errLog('vxe.error.notFormats', [formatter]);
|
|
3874
3886
|
}
|
|
3875
|
-
}
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
if (_vm.sortMethod) {
|
|
3880
|
-
warnLog('vxe.error.delProp', ['column.sort-method', 'sort-config.sortMethod']);
|
|
3881
|
-
}
|
|
3882
|
-
if (formatter) {
|
|
3883
|
-
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(formatter)) {
|
|
3884
|
-
const gFormatOpts = columnInfo_formats.get(formatter) || (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default())[formatter];
|
|
3885
|
-
if (!gFormatOpts || !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod)) {
|
|
3886
|
-
errLog('vxe.error.notFormats', [formatter]);
|
|
3887
|
-
}
|
|
3888
|
-
} else if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(formatter)) {
|
|
3889
|
-
const gFormatOpts = columnInfo_formats.get(formatter[0]) || (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default())[formatter[0]];
|
|
3890
|
-
if (!gFormatOpts || !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod)) {
|
|
3891
|
-
errLog('vxe.error.notFormats', [formatter[0]]);
|
|
3892
|
-
}
|
|
3887
|
+
} else if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(formatter)) {
|
|
3888
|
+
const gFormatOpts = columnInfo_formats.get(formatter[0]) || (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default())[formatter[0]];
|
|
3889
|
+
if (!gFormatOpts || !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod)) {
|
|
3890
|
+
errLog('vxe.error.notFormats', [formatter[0]]);
|
|
3893
3891
|
}
|
|
3894
3892
|
}
|
|
3895
3893
|
}
|
|
@@ -4150,12 +4148,10 @@ function assembleColumn(_vm) {
|
|
|
4150
4148
|
} = _vm;
|
|
4151
4149
|
const groupConfig = $xecolumn ? $xecolumn.columnConfig : null;
|
|
4152
4150
|
if (groupConfig) {
|
|
4153
|
-
if (
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
warnLog('vxe.error.groupTag', [`<vxe-colgroup title=${$xecolumn.title} ...>`, `<vxe-column title=${$xecolumn.title} ...>`]);
|
|
4158
|
-
}
|
|
4151
|
+
if ($xecolumn.$options._componentTag === 'vxe-table-column') {
|
|
4152
|
+
errLog('vxe.error.groupTag', [`<vxe-table-colgroup title=${$xecolumn.title} ...>`, `<vxe-table-column title=${$xecolumn.title} ...>`]);
|
|
4153
|
+
} else if ($xecolumn.$options._componentTag === 'vxe-column') {
|
|
4154
|
+
warnLog('vxe.error.groupTag', [`<vxe-colgroup title=${$xecolumn.title} ...>`, `<vxe-column title=${$xecolumn.title} ...>`]);
|
|
4159
4155
|
}
|
|
4160
4156
|
if (!groupConfig.children) {
|
|
4161
4157
|
groupConfig.children = [];
|
|
@@ -8751,28 +8747,26 @@ const Methods = {
|
|
|
8751
8747
|
if (treeConfig) {
|
|
8752
8748
|
// 树结构自动转换
|
|
8753
8749
|
if (treeOpts.transform) {
|
|
8754
|
-
if (
|
|
8755
|
-
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
|
|
8765
|
-
|
|
8766
|
-
|
|
8767
|
-
|
|
8768
|
-
errLog('vxe.error.errConflicts', ['tree-config.childrenField', 'tree-config.mapChildrenField']);
|
|
8769
|
-
}
|
|
8770
|
-
// fullData.forEach(row => {
|
|
8771
|
-
// if (row[childrenField] && row[childrenField].length) {
|
|
8772
|
-
// warnLog('vxe.error.errConflicts', ['tree-config.transform', `row.${childrenField}`])
|
|
8773
|
-
// }
|
|
8774
|
-
// })
|
|
8750
|
+
if (!treeOpts.rowField) {
|
|
8751
|
+
errLog('vxe.error.reqProp', ['table.tree-config.rowField']);
|
|
8752
|
+
}
|
|
8753
|
+
if (!treeOpts.parentField) {
|
|
8754
|
+
errLog('vxe.error.reqProp', ['table.tree-config.parentField']);
|
|
8755
|
+
}
|
|
8756
|
+
if (!childrenField) {
|
|
8757
|
+
errLog('vxe.error.reqProp', ['tree-config.childrenField']);
|
|
8758
|
+
}
|
|
8759
|
+
if (!treeOpts.mapChildrenField) {
|
|
8760
|
+
errLog('vxe.error.reqProp', ['tree-config.mapChildrenField']);
|
|
8761
|
+
}
|
|
8762
|
+
if (childrenField === treeOpts.mapChildrenField) {
|
|
8763
|
+
errLog('vxe.error.errConflicts', ['tree-config.childrenField', 'tree-config.mapChildrenField']);
|
|
8775
8764
|
}
|
|
8765
|
+
// fullData.forEach(row => {
|
|
8766
|
+
// if (row[childrenField] && row[childrenField].length) {
|
|
8767
|
+
// warnLog('vxe.error.errConflicts', ['tree-config.transform', `row.${childrenField}`])
|
|
8768
|
+
// }
|
|
8769
|
+
// })
|
|
8776
8770
|
treeData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArrayTree(fullData, {
|
|
8777
8771
|
key: treeOpts.rowField,
|
|
8778
8772
|
parentKey: treeOpts.parentField,
|
|
@@ -8836,16 +8830,14 @@ const Methods = {
|
|
|
8836
8830
|
// }
|
|
8837
8831
|
// }
|
|
8838
8832
|
// }
|
|
8839
|
-
if (
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
warnLog('vxe.error.scrollErrProp', ['table.span-method']);
|
|
8848
|
-
}
|
|
8833
|
+
if (!(this.height || this.maxHeight)) {
|
|
8834
|
+
errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}']);
|
|
8835
|
+
}
|
|
8836
|
+
// if (!this.showOverflow) {
|
|
8837
|
+
// warnLog('vxe.error.reqProp', ['table.show-overflow'])
|
|
8838
|
+
// }
|
|
8839
|
+
if (this.spanMethod) {
|
|
8840
|
+
warnLog('vxe.error.scrollErrProp', ['table.span-method']);
|
|
8849
8841
|
}
|
|
8850
8842
|
}
|
|
8851
8843
|
handleReserveStatus($xeTable);
|
|
@@ -8991,22 +8983,30 @@ const Methods = {
|
|
|
8991
8983
|
cacheRowMap() {
|
|
8992
8984
|
const $xeTable = this;
|
|
8993
8985
|
const props = $xeTable;
|
|
8986
|
+
const reactData = $xeTable;
|
|
8994
8987
|
const internalData = $xeTable;
|
|
8995
8988
|
const {
|
|
8996
8989
|
treeConfig
|
|
8997
8990
|
} = props;
|
|
8998
|
-
const
|
|
8991
|
+
const {
|
|
8992
|
+
treeExpandedMaps
|
|
8993
|
+
} = reactData;
|
|
8999
8994
|
const {
|
|
9000
8995
|
fullAllDataRowIdData,
|
|
9001
8996
|
tableFullData,
|
|
9002
8997
|
tableFullTreeData
|
|
9003
8998
|
} = internalData;
|
|
8999
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
9004
9000
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
9005
9001
|
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
|
|
9006
9002
|
const rowkey = getRowkey($xeTable);
|
|
9007
|
-
const
|
|
9008
|
-
|
|
9003
|
+
const fullAllDataRowIdMaps = {
|
|
9004
|
+
...fullAllDataRowIdData
|
|
9005
|
+
}; // 存在已删除数据
|
|
9009
9006
|
const fullDataRowIdMaps = {};
|
|
9007
|
+
const treeTempExpandedMaps = {
|
|
9008
|
+
...treeExpandedMaps
|
|
9009
|
+
};
|
|
9010
9010
|
const handleRow = (row, index, items, path, parentRow, nodes) => {
|
|
9011
9011
|
let rowid = getRowid($xeTable, row);
|
|
9012
9012
|
const seq = treeConfig && path ? toTreePathSeq(path) : index + 1;
|
|
@@ -9015,8 +9015,16 @@ const Methods = {
|
|
|
9015
9015
|
rowid = getRowUniqueId();
|
|
9016
9016
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, rowkey, rowid);
|
|
9017
9017
|
}
|
|
9018
|
-
if (
|
|
9019
|
-
|
|
9018
|
+
if (treeConfig && treeOpts.lazy) {
|
|
9019
|
+
const treeExpRest = treeExpandedMaps[rowid];
|
|
9020
|
+
if (row[hasChildField] && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(row[childrenField])) {
|
|
9021
|
+
row[childrenField] = null;
|
|
9022
|
+
}
|
|
9023
|
+
if (treeExpRest) {
|
|
9024
|
+
if (!row[childrenField] || !row[childrenField].length) {
|
|
9025
|
+
delete treeTempExpandedMaps[rowid];
|
|
9026
|
+
}
|
|
9027
|
+
}
|
|
9020
9028
|
}
|
|
9021
9029
|
let rowRest = fullAllDataRowIdData[rowid];
|
|
9022
9030
|
if (!rowRest) {
|
|
@@ -9037,6 +9045,8 @@ const Methods = {
|
|
|
9037
9045
|
expandHeight: 0
|
|
9038
9046
|
};
|
|
9039
9047
|
}
|
|
9048
|
+
rowRest.treeLoaded = false;
|
|
9049
|
+
rowRest.expandLoaded = false;
|
|
9040
9050
|
rowRest.row = row;
|
|
9041
9051
|
rowRest.items = items;
|
|
9042
9052
|
rowRest.parent = parentRow;
|
|
@@ -9045,8 +9055,6 @@ const Methods = {
|
|
|
9045
9055
|
fullDataRowIdMaps[rowid] = rowRest;
|
|
9046
9056
|
fullAllDataRowIdMaps[rowid] = rowRest;
|
|
9047
9057
|
};
|
|
9048
|
-
internalData.fullDataRowIdData = fullDataRowIdMaps;
|
|
9049
|
-
internalData.fullAllDataRowIdData = fullAllDataRowIdMaps;
|
|
9050
9058
|
if (treeConfig) {
|
|
9051
9059
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData, handleRow, {
|
|
9052
9060
|
children: childrenField
|
|
@@ -9054,6 +9062,9 @@ const Methods = {
|
|
|
9054
9062
|
} else {
|
|
9055
9063
|
tableFullData.forEach(handleRow);
|
|
9056
9064
|
}
|
|
9065
|
+
internalData.fullDataRowIdData = fullDataRowIdMaps;
|
|
9066
|
+
internalData.fullAllDataRowIdData = fullAllDataRowIdMaps;
|
|
9067
|
+
reactData.treeExpandedMaps = treeTempExpandedMaps;
|
|
9057
9068
|
},
|
|
9058
9069
|
cacheSourceMap(fullData) {
|
|
9059
9070
|
let {
|
|
@@ -9454,16 +9465,30 @@ const Methods = {
|
|
|
9454
9465
|
* 如果还额外传了 field 则还原指定的单元格数据
|
|
9455
9466
|
*/
|
|
9456
9467
|
revertData(rows, field) {
|
|
9468
|
+
const $xeTable = this;
|
|
9469
|
+
const props = $xeTable;
|
|
9470
|
+
const reactData = $xeTable;
|
|
9471
|
+
const internalData = $xeTable;
|
|
9457
9472
|
const {
|
|
9458
9473
|
keepSource,
|
|
9459
|
-
tableSourceData,
|
|
9460
9474
|
treeConfig
|
|
9461
|
-
} =
|
|
9475
|
+
} = props;
|
|
9476
|
+
const {
|
|
9477
|
+
fullAllDataRowIdData,
|
|
9478
|
+
tableSourceData,
|
|
9479
|
+
sourceDataRowIdData,
|
|
9480
|
+
tableFullData,
|
|
9481
|
+
afterFullData
|
|
9482
|
+
} = internalData;
|
|
9483
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
9484
|
+
const {
|
|
9485
|
+
transform
|
|
9486
|
+
} = treeOpts;
|
|
9462
9487
|
if (!keepSource) {
|
|
9463
9488
|
if (true) {
|
|
9464
9489
|
warnLog('vxe.error.reqProp', ['keep-source']);
|
|
9465
9490
|
}
|
|
9466
|
-
return
|
|
9491
|
+
return $xeTable.$nextTick();
|
|
9467
9492
|
}
|
|
9468
9493
|
let targetRows = rows;
|
|
9469
9494
|
if (rows) {
|
|
@@ -9471,30 +9496,52 @@ const Methods = {
|
|
|
9471
9496
|
targetRows = [rows];
|
|
9472
9497
|
}
|
|
9473
9498
|
} else {
|
|
9474
|
-
targetRows = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArray(
|
|
9499
|
+
targetRows = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArray($xeTable.getUpdateRecords());
|
|
9475
9500
|
}
|
|
9501
|
+
let reDelFlag = false;
|
|
9476
9502
|
if (targetRows.length) {
|
|
9477
9503
|
targetRows.forEach(row => {
|
|
9478
|
-
if (
|
|
9479
|
-
const
|
|
9480
|
-
|
|
9481
|
-
errLog('vxe.error.noTree', ['revertData']);
|
|
9482
|
-
}
|
|
9483
|
-
const oRow = tableSourceData[rowIndex];
|
|
9504
|
+
if (!$xeTable.isInsertByRow(row)) {
|
|
9505
|
+
const rowid = getRowid($xeTable, row);
|
|
9506
|
+
const oRow = sourceDataRowIdData[rowid];
|
|
9484
9507
|
if (oRow && row) {
|
|
9485
9508
|
if (field) {
|
|
9486
9509
|
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));
|
|
9487
9510
|
} else {
|
|
9488
9511
|
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));
|
|
9489
9512
|
}
|
|
9513
|
+
if ($xeTable.isRemoveByRow(row)) {
|
|
9514
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
9515
|
+
if (rowRest) {
|
|
9516
|
+
const reRow = rowRest.row;
|
|
9517
|
+
tableFullData.unshift(reRow);
|
|
9518
|
+
afterFullData.unshift(reRow);
|
|
9519
|
+
reDelFlag = true;
|
|
9520
|
+
}
|
|
9521
|
+
}
|
|
9490
9522
|
}
|
|
9491
9523
|
}
|
|
9492
9524
|
});
|
|
9493
9525
|
}
|
|
9494
9526
|
if (rows) {
|
|
9495
|
-
|
|
9527
|
+
if (reDelFlag) {
|
|
9528
|
+
$xeTable.updateFooter();
|
|
9529
|
+
$xeTable.cacheRowMap(false);
|
|
9530
|
+
$xeTable.handleTableData(treeConfig && transform);
|
|
9531
|
+
if (!(treeConfig && transform)) {
|
|
9532
|
+
$xeTable.updateAfterDataIndex();
|
|
9533
|
+
}
|
|
9534
|
+
$xeTable.checkSelectionStatus();
|
|
9535
|
+
if (reactData.scrollYLoad) {
|
|
9536
|
+
$xeTable.updateScrollYSpace();
|
|
9537
|
+
}
|
|
9538
|
+
}
|
|
9539
|
+
return $xeTable.$nextTick().then(() => {
|
|
9540
|
+
$xeTable.updateCellAreas();
|
|
9541
|
+
return $xeTable.recalculate();
|
|
9542
|
+
});
|
|
9496
9543
|
}
|
|
9497
|
-
return
|
|
9544
|
+
return $xeTable.reloadData(tableSourceData);
|
|
9498
9545
|
},
|
|
9499
9546
|
/**
|
|
9500
9547
|
* 清空单元格内容
|
|
@@ -9624,12 +9671,23 @@ const Methods = {
|
|
|
9624
9671
|
* @param {Row} row 行对象
|
|
9625
9672
|
*/
|
|
9626
9673
|
isInsertByRow(row) {
|
|
9674
|
+
const $xeTable = this;
|
|
9675
|
+
const reactData = $xeTable;
|
|
9627
9676
|
const {
|
|
9628
9677
|
editStore
|
|
9629
|
-
} =
|
|
9630
|
-
const rowid = getRowid(
|
|
9678
|
+
} = reactData;
|
|
9679
|
+
const rowid = getRowid($xeTable, row);
|
|
9631
9680
|
return !!editStore.insertMaps[rowid];
|
|
9632
9681
|
},
|
|
9682
|
+
isRemoveByRow(row) {
|
|
9683
|
+
const $xeTable = this;
|
|
9684
|
+
const reactData = $xeTable;
|
|
9685
|
+
const {
|
|
9686
|
+
editStore
|
|
9687
|
+
} = reactData;
|
|
9688
|
+
const rowid = getRowid($xeTable, row);
|
|
9689
|
+
return !!editStore.removeMaps[rowid];
|
|
9690
|
+
},
|
|
9633
9691
|
/**
|
|
9634
9692
|
* 删除所有新增的临时数据
|
|
9635
9693
|
* @returns
|
|
@@ -16424,19 +16482,17 @@ const Methods = {
|
|
|
16424
16482
|
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(',');
|
|
16425
16483
|
funcs.forEach(name => {
|
|
16426
16484
|
Methods[name] = function (...args) {
|
|
16427
|
-
if (
|
|
16428
|
-
if (
|
|
16429
|
-
|
|
16430
|
-
|
|
16431
|
-
|
|
16432
|
-
|
|
16433
|
-
|
|
16434
|
-
|
|
16435
|
-
|
|
16436
|
-
|
|
16437
|
-
|
|
16438
|
-
errLog('vxe.error.reqModule', ['VxeTableCustomModule']);
|
|
16439
|
-
}
|
|
16485
|
+
if (!this[`_${name}`]) {
|
|
16486
|
+
if ('openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',').includes(name)) {
|
|
16487
|
+
errLog('vxe.error.reqModule', ['VxeTableExportModule']);
|
|
16488
|
+
} else if ('fullValidate,validate'.split(',').includes(name)) {
|
|
16489
|
+
errLog('vxe.error.reqModule', ['VxeTableValidatorModule']);
|
|
16490
|
+
} else if ('setFilter,openFilter,clearFilter,getCheckedFilters'.split(',').includes(name)) {
|
|
16491
|
+
errLog('vxe.error.reqModule', ['VxeTableFilterModule']);
|
|
16492
|
+
} else if ('insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell'.split(',').includes(name)) {
|
|
16493
|
+
errLog('vxe.error.reqModule', ['VxeTableEditModule']);
|
|
16494
|
+
} else if ('openCustom'.split(',').includes(name)) {
|
|
16495
|
+
errLog('vxe.error.reqModule', ['VxeTableCustomModule']);
|
|
16440
16496
|
}
|
|
16441
16497
|
}
|
|
16442
16498
|
return this[`_${name}`] ? this[`_${name}`](...args) : null;
|
|
@@ -19289,39 +19345,37 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
19289
19345
|
},
|
|
19290
19346
|
computed: {},
|
|
19291
19347
|
created() {
|
|
19292
|
-
|
|
19293
|
-
|
|
19294
|
-
|
|
19295
|
-
|
|
19296
|
-
|
|
19297
|
-
|
|
19298
|
-
|
|
19299
|
-
|
|
19300
|
-
|
|
19301
|
-
|
|
19302
|
-
|
|
19303
|
-
|
|
19304
|
-
|
|
19305
|
-
|
|
19306
|
-
|
|
19307
|
-
|
|
19308
|
-
|
|
19309
|
-
|
|
19310
|
-
|
|
19311
|
-
|
|
19312
|
-
|
|
19313
|
-
|
|
19314
|
-
|
|
19315
|
-
|
|
19316
|
-
|
|
19317
|
-
|
|
19318
|
-
|
|
19319
|
-
|
|
19320
|
-
|
|
19321
|
-
|
|
19322
|
-
|
|
19323
|
-
});
|
|
19324
|
-
}
|
|
19348
|
+
const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
|
|
19349
|
+
const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
|
|
19350
|
+
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
19351
|
+
const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeNumberInput');
|
|
19352
|
+
const VxeUIRadioGroupComponent = core_.VxeUI.getComponent('VxeRadioGroup');
|
|
19353
|
+
this.$nextTick(() => {
|
|
19354
|
+
const {
|
|
19355
|
+
$xetable
|
|
19356
|
+
} = this;
|
|
19357
|
+
const {
|
|
19358
|
+
customOpts
|
|
19359
|
+
} = $xetable;
|
|
19360
|
+
const {
|
|
19361
|
+
mode
|
|
19362
|
+
} = customOpts;
|
|
19363
|
+
if (!VxeUIModalComponent) {
|
|
19364
|
+
errLog('vxe.error.reqComp', ['vxe-modal']);
|
|
19365
|
+
}
|
|
19366
|
+
if (!VxeUIDrawerComponent && mode === 'drawer') {
|
|
19367
|
+
errLog('vxe.error.reqComp', ['vxe-drawer']);
|
|
19368
|
+
}
|
|
19369
|
+
if (!VxeUIButtonComponent) {
|
|
19370
|
+
errLog('vxe.error.reqComp', ['vxe-button']);
|
|
19371
|
+
}
|
|
19372
|
+
if (!VxeUINumberInputComponent) {
|
|
19373
|
+
errLog('vxe.error.reqComp', ['vxe-input']);
|
|
19374
|
+
}
|
|
19375
|
+
if (!VxeUIRadioGroupComponent) {
|
|
19376
|
+
errLog('vxe.error.reqComp', ['vxe-radio-group']);
|
|
19377
|
+
}
|
|
19378
|
+
});
|
|
19325
19379
|
},
|
|
19326
19380
|
render(h) {
|
|
19327
19381
|
const $xeTable = this.$xeTable;
|
|
@@ -20066,22 +20120,20 @@ const {
|
|
|
20066
20120
|
},
|
|
20067
20121
|
created() {
|
|
20068
20122
|
const $xeTableImportPanel = this;
|
|
20069
|
-
|
|
20070
|
-
|
|
20071
|
-
|
|
20072
|
-
|
|
20073
|
-
|
|
20074
|
-
|
|
20075
|
-
|
|
20076
|
-
|
|
20077
|
-
|
|
20078
|
-
|
|
20079
|
-
|
|
20080
|
-
|
|
20081
|
-
|
|
20082
|
-
|
|
20083
|
-
});
|
|
20084
|
-
}
|
|
20123
|
+
const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
|
|
20124
|
+
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
20125
|
+
const VxeUISelectComponent = core_.VxeUI.getComponent('VxeSelect');
|
|
20126
|
+
$xeTableImportPanel.$nextTick(() => {
|
|
20127
|
+
if (!VxeUIModalComponent) {
|
|
20128
|
+
errLog('vxe.error.reqComp', ['vxe-modal']);
|
|
20129
|
+
}
|
|
20130
|
+
if (!VxeUIButtonComponent) {
|
|
20131
|
+
errLog('vxe.error.reqComp', ['vxe-button']);
|
|
20132
|
+
}
|
|
20133
|
+
if (!VxeUISelectComponent) {
|
|
20134
|
+
errLog('vxe.error.reqComp', ['vxe-select']);
|
|
20135
|
+
}
|
|
20136
|
+
});
|
|
20085
20137
|
},
|
|
20086
20138
|
render(h) {
|
|
20087
20139
|
const $xeTable = this.$xeTable;
|
|
@@ -20317,30 +20369,28 @@ const {
|
|
|
20317
20369
|
},
|
|
20318
20370
|
created() {
|
|
20319
20371
|
const $xeTableExportPanel = this;
|
|
20320
|
-
|
|
20321
|
-
|
|
20322
|
-
|
|
20323
|
-
|
|
20324
|
-
|
|
20325
|
-
|
|
20326
|
-
|
|
20327
|
-
|
|
20328
|
-
|
|
20329
|
-
|
|
20330
|
-
|
|
20331
|
-
|
|
20332
|
-
|
|
20333
|
-
|
|
20334
|
-
|
|
20335
|
-
|
|
20336
|
-
|
|
20337
|
-
|
|
20338
|
-
|
|
20339
|
-
|
|
20340
|
-
|
|
20341
|
-
|
|
20342
|
-
});
|
|
20343
|
-
}
|
|
20372
|
+
const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
|
|
20373
|
+
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
20374
|
+
const VxeUISelectComponent = core_.VxeUI.getComponent('VxeSelect');
|
|
20375
|
+
const VxeUIInputComponent = core_.VxeUI.getComponent('VxeInput');
|
|
20376
|
+
const VxeUICheckboxComponent = core_.VxeUI.getComponent('VxeCheckbox');
|
|
20377
|
+
$xeTableExportPanel.$nextTick(() => {
|
|
20378
|
+
if (!VxeUIModalComponent) {
|
|
20379
|
+
errLog('vxe.error.reqComp', ['vxe-modal']);
|
|
20380
|
+
}
|
|
20381
|
+
if (!VxeUIButtonComponent) {
|
|
20382
|
+
errLog('vxe.error.reqComp', ['vxe-button']);
|
|
20383
|
+
}
|
|
20384
|
+
if (!VxeUISelectComponent) {
|
|
20385
|
+
errLog('vxe.error.reqComp', ['vxe-select']);
|
|
20386
|
+
}
|
|
20387
|
+
if (!VxeUIInputComponent) {
|
|
20388
|
+
errLog('vxe.error.reqComp', ['vxe-input']);
|
|
20389
|
+
}
|
|
20390
|
+
if (!VxeUICheckboxComponent) {
|
|
20391
|
+
errLog('vxe.error.reqComp', ['vxe-checkbox']);
|
|
20392
|
+
}
|
|
20393
|
+
});
|
|
20344
20394
|
},
|
|
20345
20395
|
render(h) {
|
|
20346
20396
|
const $xeTable = this.$xeTable;
|
|
@@ -21892,11 +21942,9 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
|
|
|
21892
21942
|
const parentLevel = parentRest ? parentRest.level : 0;
|
|
21893
21943
|
newRecords.forEach((item, i) => {
|
|
21894
21944
|
const rowid = getRowid($xeTable, item);
|
|
21895
|
-
if (
|
|
21896
|
-
if (item[treeOpts.parentField]) {
|
|
21897
|
-
|
|
21898
|
-
errLog('vxe.error.errProp', [`${treeOpts.parentField}=${item[treeOpts.parentField]}`, `${treeOpts.parentField}=${parentRow[rowField]}`]);
|
|
21899
|
-
}
|
|
21945
|
+
if (item[treeOpts.parentField]) {
|
|
21946
|
+
if (parentRow && item[treeOpts.parentField] !== parentRow[rowField]) {
|
|
21947
|
+
errLog('vxe.error.errProp', [`${treeOpts.parentField}=${item[treeOpts.parentField]}`, `${treeOpts.parentField}=${parentRow[rowField]}`]);
|
|
21900
21948
|
}
|
|
21901
21949
|
}
|
|
21902
21950
|
if (parentRow) {
|
|
@@ -23530,10 +23578,8 @@ function downloadFile($xetable, opts, content) {
|
|
|
23530
23578
|
}).then(() => {
|
|
23531
23579
|
if (opts.message !== false) {
|
|
23532
23580
|
// 检测弹窗模块
|
|
23533
|
-
if (
|
|
23534
|
-
|
|
23535
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
23536
|
-
}
|
|
23581
|
+
if (!core_.VxeUI.modal) {
|
|
23582
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
23537
23583
|
}
|
|
23538
23584
|
core_.VxeUI.modal.message({
|
|
23539
23585
|
content: export_mixin_getI18n('vxe.table.expSuccess'),
|
|
@@ -23814,10 +23860,8 @@ function handleImport($xeTable, content, opts) {
|
|
|
23814
23860
|
}
|
|
23815
23861
|
if (opts.message !== false) {
|
|
23816
23862
|
// 检测弹窗模块
|
|
23817
|
-
if (
|
|
23818
|
-
|
|
23819
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
23820
|
-
}
|
|
23863
|
+
if (!core_.VxeUI.modal) {
|
|
23864
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
23821
23865
|
}
|
|
23822
23866
|
core_.VxeUI.modal.message({
|
|
23823
23867
|
content: export_mixin_getI18n('vxe.table.impSuccess', [rows.length]),
|
|
@@ -23834,10 +23878,8 @@ function handleImport($xeTable, content, opts) {
|
|
|
23834
23878
|
});
|
|
23835
23879
|
} else if (opts.message !== false) {
|
|
23836
23880
|
// 检测弹窗模块
|
|
23837
|
-
if (
|
|
23838
|
-
|
|
23839
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
23840
|
-
}
|
|
23881
|
+
if (!core_.VxeUI.modal) {
|
|
23882
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
23841
23883
|
}
|
|
23842
23884
|
core_.VxeUI.modal.message({
|
|
23843
23885
|
content: export_mixin_getI18n('vxe.error.impFields'),
|
|
@@ -23866,10 +23908,8 @@ function handleFileImport($xetable, file, opts) {
|
|
|
23866
23908
|
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)) {
|
|
23867
23909
|
if (opts.message !== false) {
|
|
23868
23910
|
// 检测弹窗模块
|
|
23869
|
-
if (
|
|
23870
|
-
|
|
23871
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
23872
|
-
}
|
|
23911
|
+
if (!core_.VxeUI.modal) {
|
|
23912
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
23873
23913
|
}
|
|
23874
23914
|
core_.VxeUI.modal.message({
|
|
23875
23915
|
content: export_mixin_getI18n('vxe.error.notType', [type]),
|
|
@@ -23942,9 +23982,7 @@ function handleFileImport($xetable, file, opts) {
|
|
|
23942
23982
|
}
|
|
23943
23983
|
} else {
|
|
23944
23984
|
// 不支持的浏览器
|
|
23945
|
-
|
|
23946
|
-
errLog('vxe.error.notExp');
|
|
23947
|
-
}
|
|
23985
|
+
errLog('vxe.error.notExp');
|
|
23948
23986
|
_importResolve({
|
|
23949
23987
|
status: true
|
|
23950
23988
|
});
|
|
@@ -24021,10 +24059,8 @@ function readLocalFile(options = {}) {
|
|
|
24021
24059
|
} else {
|
|
24022
24060
|
if (options.message !== false) {
|
|
24023
24061
|
// 检测弹窗模块
|
|
24024
|
-
if (
|
|
24025
|
-
|
|
24026
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
24027
|
-
}
|
|
24062
|
+
if (!core_.VxeUI.modal) {
|
|
24063
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
24028
24064
|
}
|
|
24029
24065
|
core_.VxeUI.modal.message({
|
|
24030
24066
|
content: export_mixin_getI18n('vxe.error.notType', [errType]),
|
|
@@ -24790,10 +24826,8 @@ const convertToRows = originColumns => {
|
|
|
24790
24826
|
const {
|
|
24791
24827
|
exportOpts
|
|
24792
24828
|
} = this;
|
|
24793
|
-
if (
|
|
24794
|
-
|
|
24795
|
-
errLog('vxe.error.reqProp', ['export-config']);
|
|
24796
|
-
}
|
|
24829
|
+
if (!this.exportConfig) {
|
|
24830
|
+
errLog('vxe.error.reqProp', ['export-config']);
|
|
24797
24831
|
}
|
|
24798
24832
|
return handleExportAndPrint(this, Object.assign({}, exportOpts, options));
|
|
24799
24833
|
},
|
|
@@ -24802,10 +24836,8 @@ const convertToRows = originColumns => {
|
|
|
24802
24836
|
const {
|
|
24803
24837
|
printOpts
|
|
24804
24838
|
} = this;
|
|
24805
|
-
if (
|
|
24806
|
-
|
|
24807
|
-
errLog('vxe.error.reqProp', ['print-config']);
|
|
24808
|
-
}
|
|
24839
|
+
if (!this.printConfig) {
|
|
24840
|
+
errLog('vxe.error.reqProp', ['print-config']);
|
|
24809
24841
|
}
|
|
24810
24842
|
return handleExportAndPrint(this, Object.assign({}, printOpts, options), true);
|
|
24811
24843
|
}
|
|
@@ -25697,9 +25729,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
25697
25729
|
}
|
|
25698
25730
|
}
|
|
25699
25731
|
} else {
|
|
25700
|
-
|
|
25701
|
-
errLog('vxe.error.notValidators', [validator]);
|
|
25702
|
-
}
|
|
25732
|
+
errLog('vxe.error.notValidators', [validator]);
|
|
25703
25733
|
}
|
|
25704
25734
|
} else {
|
|
25705
25735
|
customValid = validator(validParams);
|
|
@@ -27806,23 +27836,21 @@ function renderBody(h, $xeTable) {
|
|
|
27806
27836
|
warnLog('vxe.error.reqProp', ['tooltip-config']);
|
|
27807
27837
|
}
|
|
27808
27838
|
}
|
|
27809
|
-
|
|
27810
|
-
|
|
27811
|
-
|
|
27812
|
-
|
|
27813
|
-
|
|
27814
|
-
if (
|
|
27815
|
-
|
|
27816
|
-
errLog('vxe.error.reqComp', ['vxe-loading']);
|
|
27817
|
-
}
|
|
27839
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
27840
|
+
const VxeUILoadingComponent = core_.VxeUI.getComponent('VxeLoading');
|
|
27841
|
+
const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
|
|
27842
|
+
$xeTable.$nextTick(() => {
|
|
27843
|
+
if (props.loading) {
|
|
27844
|
+
if (!VxeUILoadingComponent && !this.$scopedSlots.loading) {
|
|
27845
|
+
errLog('vxe.error.reqComp', ['vxe-loading']);
|
|
27818
27846
|
}
|
|
27819
|
-
|
|
27820
|
-
|
|
27821
|
-
|
|
27822
|
-
|
|
27847
|
+
}
|
|
27848
|
+
if (props.showOverflow === true || props.showOverflow === 'tooltip' || props.showHeaderOverflow === true || props.showHeaderOverflow === 'tooltip' || props.showFooterOverflow === true || props.showFooterOverflow === 'tooltip' || props.tooltipConfig || props.editRules) {
|
|
27849
|
+
if (!VxeUITooltipComponent) {
|
|
27850
|
+
errLog('vxe.error.reqComp', ['vxe-tooltip']);
|
|
27823
27851
|
}
|
|
27824
|
-
}
|
|
27825
|
-
}
|
|
27852
|
+
}
|
|
27853
|
+
});
|
|
27826
27854
|
if (this.autoResize) {
|
|
27827
27855
|
const resizeObserver = table_globalResize.create(() => {
|
|
27828
27856
|
if (this.autoResize) {
|
|
@@ -28442,9 +28470,7 @@ const {
|
|
|
28442
28470
|
if (tCommandMethod) {
|
|
28443
28471
|
tCommandMethod(params);
|
|
28444
28472
|
} else {
|
|
28445
|
-
|
|
28446
|
-
errLog('vxe.error.notCommands', [code]);
|
|
28447
|
-
}
|
|
28473
|
+
errLog('vxe.error.notCommands', [code]);
|
|
28448
28474
|
}
|
|
28449
28475
|
}
|
|
28450
28476
|
$xeToolbar.dispatchEvent('button-click', params, evnt);
|
|
@@ -28479,9 +28505,7 @@ const {
|
|
|
28479
28505
|
if (tCommandMethod) {
|
|
28480
28506
|
tCommandMethod(params);
|
|
28481
28507
|
} else {
|
|
28482
|
-
|
|
28483
|
-
errLog('vxe.error.notCommands', [code]);
|
|
28484
|
-
}
|
|
28508
|
+
errLog('vxe.error.notCommands', [code]);
|
|
28485
28509
|
}
|
|
28486
28510
|
}
|
|
28487
28511
|
$xeToolbar.dispatchEvent('tool-click', params, evnt);
|
|
@@ -28934,28 +28958,24 @@ const {
|
|
|
28934
28958
|
$xetable.connect(this);
|
|
28935
28959
|
}
|
|
28936
28960
|
const customOpts = $xeToolbar.computeCustomOpts;
|
|
28937
|
-
if (
|
|
28938
|
-
|
|
28939
|
-
|
|
28940
|
-
|
|
28941
|
-
|
|
28942
|
-
|
|
28943
|
-
|
|
28944
|
-
|
|
28945
|
-
|
|
28946
|
-
|
|
28947
|
-
|
|
28948
|
-
warnLog('vxe.error.delProp', ['toolbar.custom.trigger', 'table.custom-config.trigger']);
|
|
28949
|
-
}
|
|
28961
|
+
if (customOpts.isFooter) {
|
|
28962
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.isFooter', 'table.custom-config.showFooter']);
|
|
28963
|
+
}
|
|
28964
|
+
if (customOpts.showFooter) {
|
|
28965
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.showFooter', 'table.custom-config.showFooter']);
|
|
28966
|
+
}
|
|
28967
|
+
if (customOpts.immediate) {
|
|
28968
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.immediate', 'table.custom-config.immediate']);
|
|
28969
|
+
}
|
|
28970
|
+
if (customOpts.trigger) {
|
|
28971
|
+
warnLog('vxe.error.delProp', ['toolbar.custom.trigger', 'table.custom-config.trigger']);
|
|
28950
28972
|
}
|
|
28951
28973
|
});
|
|
28952
|
-
|
|
28953
|
-
|
|
28954
|
-
|
|
28955
|
-
if (
|
|
28956
|
-
|
|
28957
|
-
errLog('vxe.error.reqComp', ['vxe-button']);
|
|
28958
|
-
}
|
|
28974
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
28975
|
+
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
28976
|
+
if (props.refresh || props.import || props.export || props.print || props.zoom) {
|
|
28977
|
+
if (!VxeUIButtonComponent) {
|
|
28978
|
+
errLog('vxe.error.reqComp', ['vxe-button']);
|
|
28959
28979
|
}
|
|
28960
28980
|
}
|
|
28961
28981
|
},
|
|
@@ -29049,9 +29069,7 @@ function getFuncSlot($xeGrid, optSlots, slotKey) {
|
|
|
29049
29069
|
if (slots[funcSlot]) {
|
|
29050
29070
|
return slots[funcSlot];
|
|
29051
29071
|
} else {
|
|
29052
|
-
|
|
29053
|
-
errLog('vxe.error.notSlot', [funcSlot]);
|
|
29054
|
-
}
|
|
29072
|
+
errLog('vxe.error.notSlot', [funcSlot]);
|
|
29055
29073
|
}
|
|
29056
29074
|
} else {
|
|
29057
29075
|
return funcSlot;
|
|
@@ -29570,34 +29588,30 @@ Object.keys(table.methods).forEach(name => {
|
|
|
29570
29588
|
// if (proxyConfig && (data || (proxyOpts.form && formOpts.data))) {
|
|
29571
29589
|
// errLog('vxe.error.errConflicts', ['grid.data', 'grid.proxy-config'])
|
|
29572
29590
|
// }
|
|
29573
|
-
if (
|
|
29574
|
-
|
|
29575
|
-
warnLog('vxe.error.delProp', ['grid.toolbar', 'grid.toolbar-config']);
|
|
29576
|
-
}
|
|
29577
|
-
if (this.toolbarConfig && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isObject(this.toolbarConfig)) {
|
|
29578
|
-
warnLog('vxe.error.errProp', [`grid.toolbar-config=${this.toolbarConfig}`, 'grid.toolbar-config={}']);
|
|
29579
|
-
}
|
|
29580
|
-
// if (proxyOpts.props) {
|
|
29581
|
-
// warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
|
|
29582
|
-
// }
|
|
29591
|
+
if (this.toolbar) {
|
|
29592
|
+
warnLog('vxe.error.delProp', ['grid.toolbar', 'grid.toolbar-config']);
|
|
29583
29593
|
}
|
|
29584
|
-
if (
|
|
29585
|
-
|
|
29586
|
-
|
|
29587
|
-
|
|
29588
|
-
|
|
29589
|
-
|
|
29590
|
-
|
|
29591
|
-
|
|
29592
|
-
|
|
29594
|
+
if (this.toolbarConfig && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isObject(this.toolbarConfig)) {
|
|
29595
|
+
warnLog('vxe.error.errProp', [`grid.toolbar-config=${this.toolbarConfig}`, 'grid.toolbar-config={}']);
|
|
29596
|
+
}
|
|
29597
|
+
// if (proxyOpts.props) {
|
|
29598
|
+
// warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
|
|
29599
|
+
// }
|
|
29600
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
29601
|
+
const VxeUIFormComponent = core_.VxeUI.getComponent('VxeForm');
|
|
29602
|
+
const VxeUIPagerComponent = core_.VxeUI.getComponent('VxePager');
|
|
29603
|
+
$xeGrid.$nextTick(() => {
|
|
29604
|
+
if (props.formConfig) {
|
|
29605
|
+
if (!VxeUIFormComponent) {
|
|
29606
|
+
errLog('vxe.error.reqComp', ['vxe-form']);
|
|
29593
29607
|
}
|
|
29594
|
-
|
|
29595
|
-
|
|
29596
|
-
|
|
29597
|
-
|
|
29608
|
+
}
|
|
29609
|
+
if (props.pagerConfig) {
|
|
29610
|
+
if (!VxeUIPagerComponent) {
|
|
29611
|
+
errLog('vxe.error.reqComp', ['vxe-pager']);
|
|
29598
29612
|
}
|
|
29599
|
-
}
|
|
29600
|
-
}
|
|
29613
|
+
}
|
|
29614
|
+
});
|
|
29601
29615
|
this.initPages();
|
|
29602
29616
|
grid_globalEvents.on(this, 'keydown', this.handleGlobalKeydownEvent);
|
|
29603
29617
|
},
|
|
@@ -29962,9 +29976,7 @@ Object.keys(table.methods).forEach(name => {
|
|
|
29962
29976
|
};
|
|
29963
29977
|
});
|
|
29964
29978
|
} else {
|
|
29965
|
-
|
|
29966
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.query']);
|
|
29967
|
-
}
|
|
29979
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.query']);
|
|
29968
29980
|
}
|
|
29969
29981
|
break;
|
|
29970
29982
|
}
|
|
@@ -29999,10 +30011,8 @@ Object.keys(table.methods).forEach(name => {
|
|
|
29999
30011
|
$xetable.setPendingRow(removeRecords, false);
|
|
30000
30012
|
if (isRespMsg) {
|
|
30001
30013
|
// 检测弹窗模块
|
|
30002
|
-
if (
|
|
30003
|
-
|
|
30004
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
30005
|
-
}
|
|
30014
|
+
if (!core_.VxeUI.modal) {
|
|
30015
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
30006
30016
|
}
|
|
30007
30017
|
core_.VxeUI.modal.message({
|
|
30008
30018
|
content: this.getRespMsg(rest, 'vxe.grid.delSuccess'),
|
|
@@ -30027,10 +30037,8 @@ Object.keys(table.methods).forEach(name => {
|
|
|
30027
30037
|
this.tableLoading = false;
|
|
30028
30038
|
if (isRespMsg) {
|
|
30029
30039
|
// 检测弹窗模块
|
|
30030
|
-
if (
|
|
30031
|
-
|
|
30032
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
30033
|
-
}
|
|
30040
|
+
if (!core_.VxeUI.modal) {
|
|
30041
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
30034
30042
|
}
|
|
30035
30043
|
core_.VxeUI.modal.message({
|
|
30036
30044
|
id: code,
|
|
@@ -30052,10 +30060,8 @@ Object.keys(table.methods).forEach(name => {
|
|
|
30052
30060
|
} else {
|
|
30053
30061
|
if (isActiveMsg) {
|
|
30054
30062
|
// 检测弹窗模块
|
|
30055
|
-
if (
|
|
30056
|
-
|
|
30057
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
30058
|
-
}
|
|
30063
|
+
if (!core_.VxeUI.modal) {
|
|
30064
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
30059
30065
|
}
|
|
30060
30066
|
core_.VxeUI.modal.message({
|
|
30061
30067
|
id: code,
|
|
@@ -30065,9 +30071,7 @@ Object.keys(table.methods).forEach(name => {
|
|
|
30065
30071
|
}
|
|
30066
30072
|
}
|
|
30067
30073
|
} else {
|
|
30068
|
-
|
|
30069
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete']);
|
|
30070
|
-
}
|
|
30074
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete']);
|
|
30071
30075
|
}
|
|
30072
30076
|
break;
|
|
30073
30077
|
}
|
|
@@ -30118,10 +30122,8 @@ Object.keys(table.methods).forEach(name => {
|
|
|
30118
30122
|
$xetable.clearPendingRow();
|
|
30119
30123
|
if (isRespMsg) {
|
|
30120
30124
|
// 检测弹窗模块
|
|
30121
|
-
if (
|
|
30122
|
-
|
|
30123
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
30124
|
-
}
|
|
30125
|
+
if (!core_.VxeUI.modal) {
|
|
30126
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
30125
30127
|
}
|
|
30126
30128
|
core_.VxeUI.modal.message({
|
|
30127
30129
|
content: this.getRespMsg(rest, 'vxe.grid.saveSuccess'),
|
|
@@ -30146,10 +30148,8 @@ Object.keys(table.methods).forEach(name => {
|
|
|
30146
30148
|
this.tableLoading = false;
|
|
30147
30149
|
if (isRespMsg) {
|
|
30148
30150
|
// 检测弹窗模块
|
|
30149
|
-
if (
|
|
30150
|
-
|
|
30151
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
30152
|
-
}
|
|
30151
|
+
if (!core_.VxeUI.modal) {
|
|
30152
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
30153
30153
|
}
|
|
30154
30154
|
core_.VxeUI.modal.message({
|
|
30155
30155
|
id: code,
|
|
@@ -30170,10 +30170,8 @@ Object.keys(table.methods).forEach(name => {
|
|
|
30170
30170
|
} else {
|
|
30171
30171
|
if (isActiveMsg) {
|
|
30172
30172
|
// 检测弹窗模块
|
|
30173
|
-
if (
|
|
30174
|
-
|
|
30175
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
30176
|
-
}
|
|
30173
|
+
if (!core_.VxeUI.modal) {
|
|
30174
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
30177
30175
|
}
|
|
30178
30176
|
core_.VxeUI.modal.message({
|
|
30179
30177
|
id: code,
|
|
@@ -30184,9 +30182,7 @@ Object.keys(table.methods).forEach(name => {
|
|
|
30184
30182
|
}
|
|
30185
30183
|
});
|
|
30186
30184
|
} else {
|
|
30187
|
-
|
|
30188
|
-
errLog('vxe.error.notFunc', ['proxy-config.ajax.save']);
|
|
30189
|
-
}
|
|
30185
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.save']);
|
|
30190
30186
|
}
|
|
30191
30187
|
break;
|
|
30192
30188
|
}
|
|
@@ -30202,9 +30198,7 @@ Object.keys(table.methods).forEach(name => {
|
|
|
30202
30198
|
$table: $xetable
|
|
30203
30199
|
}, ...args);
|
|
30204
30200
|
} else {
|
|
30205
|
-
|
|
30206
|
-
errLog('vxe.error.notCommands', [code]);
|
|
30207
|
-
}
|
|
30201
|
+
errLog('vxe.error.notCommands', [code]);
|
|
30208
30202
|
}
|
|
30209
30203
|
}
|
|
30210
30204
|
}
|
|
@@ -30237,10 +30231,8 @@ Object.keys(table.methods).forEach(name => {
|
|
|
30237
30231
|
});
|
|
30238
30232
|
} else {
|
|
30239
30233
|
// 检测弹窗模块
|
|
30240
|
-
if (
|
|
30241
|
-
|
|
30242
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
30243
|
-
}
|
|
30234
|
+
if (!core_.VxeUI.modal) {
|
|
30235
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
30244
30236
|
}
|
|
30245
30237
|
core_.VxeUI.modal.message({
|
|
30246
30238
|
id: `msg_${code}`,
|
|
@@ -30321,10 +30313,8 @@ Object.keys(table.methods).forEach(name => {
|
|
|
30321
30313
|
} else {
|
|
30322
30314
|
if (isActiveMsg) {
|
|
30323
30315
|
// 检测弹窗模块
|
|
30324
|
-
if (
|
|
30325
|
-
|
|
30326
|
-
errLog('vxe.error.reqModule', ['Modal']);
|
|
30327
|
-
}
|
|
30316
|
+
if (!core_.VxeUI.modal) {
|
|
30317
|
+
errLog('vxe.error.reqModule', ['Modal']);
|
|
30328
30318
|
}
|
|
30329
30319
|
core_.VxeUI.modal.message({
|
|
30330
30320
|
id: code,
|
|
@@ -30750,10 +30740,8 @@ function getComponentOns(renderOpts, params, eFns) {
|
|
|
30750
30740
|
const ons = {};
|
|
30751
30741
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().objectEach(events, (func, key) => {
|
|
30752
30742
|
ons[getOnName(key)] = function (...args) {
|
|
30753
|
-
if (
|
|
30754
|
-
|
|
30755
|
-
errLog('vxe.error.errFunc', [func]);
|
|
30756
|
-
}
|
|
30743
|
+
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(func)) {
|
|
30744
|
+
errLog('vxe.error.errFunc', [func]);
|
|
30757
30745
|
}
|
|
30758
30746
|
func(params, ...args);
|
|
30759
30747
|
};
|