vxe-table 3.13.16 → 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.
Files changed (76) hide show
  1. package/es/grid/src/grid.js +68 -85
  2. package/es/style.css +1 -1
  3. package/es/table/module/custom/panel.js +25 -27
  4. package/es/table/module/edit/mixin.js +3 -5
  5. package/es/table/module/export/export-panel.js +22 -24
  6. package/es/table/module/export/import-panel.js +14 -16
  7. package/es/table/module/export/mixin.js +15 -31
  8. package/es/table/module/keyboard/mixin.js +3 -2
  9. package/es/table/module/validator/mixin.js +1 -3
  10. package/es/table/render/index.js +2 -4
  11. package/es/table/src/body.js +2 -2
  12. package/es/table/src/columnInfo.js +30 -32
  13. package/es/table/src/methods.js +113 -68
  14. package/es/table/src/table.js +16 -18
  15. package/es/table/src/util.js +5 -7
  16. package/es/toolbar/src/toolbar.js +18 -26
  17. package/es/ui/index.js +1 -1
  18. package/es/ui/src/log.js +1 -1
  19. package/lib/grid/src/grid.js +69 -98
  20. package/lib/grid/src/grid.min.js +1 -1
  21. package/lib/index.umd.js +356 -365
  22. package/lib/index.umd.min.js +1 -1
  23. package/lib/style.css +1 -1
  24. package/lib/table/module/custom/panel.js +31 -33
  25. package/lib/table/module/custom/panel.min.js +1 -1
  26. package/lib/table/module/edit/mixin.js +3 -5
  27. package/lib/table/module/edit/mixin.min.js +1 -1
  28. package/lib/table/module/export/export-panel.js +22 -24
  29. package/lib/table/module/export/export-panel.min.js +1 -1
  30. package/lib/table/module/export/import-panel.js +14 -16
  31. package/lib/table/module/export/import-panel.min.js +1 -1
  32. package/lib/table/module/export/mixin.js +15 -31
  33. package/lib/table/module/export/mixin.min.js +1 -1
  34. package/lib/table/module/keyboard/mixin.js +3 -2
  35. package/lib/table/module/validator/mixin.js +1 -3
  36. package/lib/table/module/validator/mixin.min.js +1 -1
  37. package/lib/table/render/index.js +2 -4
  38. package/lib/table/render/index.min.js +1 -1
  39. package/lib/table/src/body.js +2 -1
  40. package/lib/table/src/body.min.js +1 -1
  41. package/lib/table/src/columnInfo.js +32 -34
  42. package/lib/table/src/columnInfo.min.js +1 -1
  43. package/lib/table/src/methods.js +121 -65
  44. package/lib/table/src/methods.min.js +1 -1
  45. package/lib/table/src/table.js +13 -15
  46. package/lib/table/src/table.min.js +1 -1
  47. package/lib/table/src/util.js +4 -6
  48. package/lib/table/src/util.min.js +1 -1
  49. package/lib/toolbar/src/toolbar.js +18 -26
  50. package/lib/toolbar/src/toolbar.min.js +1 -1
  51. package/lib/ui/index.js +1 -1
  52. package/lib/ui/index.min.js +1 -1
  53. package/lib/ui/src/log.js +1 -1
  54. package/lib/ui/src/log.min.js +1 -1
  55. package/package.json +2 -2
  56. package/packages/grid/src/grid.ts +70 -85
  57. package/packages/table/module/custom/panel.ts +25 -27
  58. package/packages/table/module/edit/mixin.ts +3 -5
  59. package/packages/table/module/export/export-panel.ts +22 -24
  60. package/packages/table/module/export/import-panel.ts +14 -16
  61. package/packages/table/module/export/mixin.ts +15 -31
  62. package/packages/table/module/keyboard/mixin.ts +6 -2
  63. package/packages/table/module/validator/mixin.ts +1 -3
  64. package/packages/table/render/index.ts +2 -4
  65. package/packages/table/src/body.ts +2 -2
  66. package/packages/table/src/columnInfo.ts +30 -32
  67. package/packages/table/src/methods.ts +115 -66
  68. package/packages/table/src/table.ts +13 -15
  69. package/packages/table/src/util.ts +4 -6
  70. package/packages/toolbar/src/toolbar.ts +18 -26
  71. /package/es/{iconfont.1740799948632.ttf → iconfont.1741140503645.ttf} +0 -0
  72. /package/es/{iconfont.1740799948632.woff → iconfont.1741140503645.woff} +0 -0
  73. /package/es/{iconfont.1740799948632.woff2 → iconfont.1741140503645.woff2} +0 -0
  74. /package/lib/{iconfont.1740799948632.ttf → iconfont.1741140503645.ttf} +0 -0
  75. /package/lib/{iconfont.1740799948632.woff → iconfont.1741140503645.woff} +0 -0
  76. /package/lib/{iconfont.1740799948632.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.16";
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.16"}`;
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
- if (true) {
3858
- const types = ['seq', 'checkbox', 'radio', 'expand', 'html'];
3859
- if (_vm.type && types.indexOf(_vm.type) === -1) {
3860
- warnLog('vxe.error.errProp', [`type=${_vm.type}`, types.join(', ')]);
3861
- }
3862
- 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)) {
3863
- warnLog('vxe.error.errProp', [`column.cell-render=${_vm.cellRender}`, 'column.cell-render={}']);
3864
- }
3865
- 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)) {
3866
- warnLog('vxe.error.errProp', [`column.edit-render=${_vm.editRender}`, 'column.edit-render={}']);
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
- if (_vm.type === 'expand') {
3869
- const {
3870
- treeConfig
3871
- } = tableProps;
3872
- if (treeConfig && ($xetable.treeOpts.showLine || $xetable.treeOpts.line)) {
3873
- errLog('vxe.error.errConflicts', ['tree-config.line', 'column.type=expand']);
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
- if (_vm.remoteSort) {
3877
- warnLog('vxe.error.delProp', ['column.remote-sort', 'sort-config.remote']);
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 (true) {
4154
- if ($xecolumn.$options._componentTag === 'vxe-table-column') {
4155
- errLog('vxe.error.groupTag', [`<vxe-table-colgroup title=${$xecolumn.title} ...>`, `<vxe-table-column title=${$xecolumn.title} ...>`]);
4156
- } else if ($xecolumn.$options._componentTag === 'vxe-column') {
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 (true) {
8755
- if (!treeOpts.rowField) {
8756
- errLog('vxe.error.reqProp', ['table.tree-config.rowField']);
8757
- }
8758
- if (!treeOpts.parentField) {
8759
- errLog('vxe.error.reqProp', ['table.tree-config.parentField']);
8760
- }
8761
- if (!childrenField) {
8762
- errLog('vxe.error.reqProp', ['tree-config.childrenField']);
8763
- }
8764
- if (!treeOpts.mapChildrenField) {
8765
- errLog('vxe.error.reqProp', ['tree-config.mapChildrenField']);
8766
- }
8767
- if (childrenField === treeOpts.mapChildrenField) {
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']);
8775
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']);
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 (true) {
8840
- if (!(this.height || this.maxHeight)) {
8841
- errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}']);
8842
- }
8843
- // if (!this.showOverflow) {
8844
- // warnLog('vxe.error.reqProp', ['table.show-overflow'])
8845
- // }
8846
- if (this.spanMethod) {
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 treeOpts = $xeTable.computeTreeOpts;
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 isLazy = treeConfig && treeOpts.lazy;
9008
- const fullAllDataRowIdMaps = {};
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 (isLazy && row[hasChildField] && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(row[childrenField])) {
9019
- row[childrenField] = null;
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
- } = this;
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 this.$nextTick();
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(this.getUpdateRecords());
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 (!this.isInsertByRow(row)) {
9479
- const rowIndex = this.getRowIndex(row);
9480
- if (treeConfig && rowIndex === -1) {
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
- return this.$nextTick();
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 this.reloadData(tableSourceData);
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
- } = this;
9630
- const rowid = getRowid(this, row);
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 (true) {
16428
- if (!this[`_${name}`]) {
16429
- if ('openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',').includes(name)) {
16430
- errLog('vxe.error.reqModule', ['VxeTableExportModule']);
16431
- } else if ('fullValidate,validate'.split(',').includes(name)) {
16432
- errLog('vxe.error.reqModule', ['VxeTableValidatorModule']);
16433
- } else if ('setFilter,openFilter,clearFilter,getCheckedFilters'.split(',').includes(name)) {
16434
- errLog('vxe.error.reqModule', ['VxeTableFilterModule']);
16435
- } else if ('insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell'.split(',').includes(name)) {
16436
- errLog('vxe.error.reqModule', ['VxeTableEditModule']);
16437
- } else if ('openCustom'.split(',').includes(name)) {
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;
@@ -16536,6 +16592,7 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
16536
16592
  const {
16537
16593
  columnKey,
16538
16594
  resizable: allResizable,
16595
+ showOverflow: allShowOverflow,
16539
16596
  border,
16540
16597
  height,
16541
16598
  cellClassName: allCellClassName,
@@ -16623,7 +16680,7 @@ function renderTdColumn(h, _vm, seq, rowid, fixedType, isOptimizeMode, rowLevel,
16623
16680
  const resizeHeight = resizeHeightFlag ? rowRest.resizeHeight : 0;
16624
16681
  let fixedHiddenColumn = fixedType ? column.fixed !== fixedType : column.fixed && overflowX;
16625
16682
  const isCellPadding = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(padding) ? allPadding === null ? cellOpts.padding : allPadding : padding;
16626
- const cellOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(showOverflow) ? isAllOverflow : showOverflow;
16683
+ const cellOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(showOverflow) ? allShowOverflow : showOverflow;
16627
16684
  const showEllipsis = cellOverflow === 'ellipsis';
16628
16685
  const showTitle = cellOverflow === 'title';
16629
16686
  const showTooltip = cellOverflow === true || cellOverflow === 'tooltip';
@@ -19288,39 +19345,37 @@ const renderPopupPanel = (h, _vm) => {
19288
19345
  },
19289
19346
  computed: {},
19290
19347
  created() {
19291
- if (true) {
19292
- const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
19293
- const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
19294
- const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
19295
- const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeNumberInput');
19296
- const VxeUIRadioGroupComponent = core_.VxeUI.getComponent('VxeRadioGroup');
19297
- this.$nextTick(() => {
19298
- const {
19299
- $xetable
19300
- } = this;
19301
- const {
19302
- customOpts
19303
- } = $xetable;
19304
- const {
19305
- mode
19306
- } = customOpts;
19307
- if (!VxeUIModalComponent) {
19308
- errLog('vxe.error.reqComp', ['vxe-modal']);
19309
- }
19310
- if (!VxeUIDrawerComponent && mode === 'drawer') {
19311
- errLog('vxe.error.reqComp', ['vxe-drawer']);
19312
- }
19313
- if (!VxeUIButtonComponent) {
19314
- errLog('vxe.error.reqComp', ['vxe-button']);
19315
- }
19316
- if (!VxeUINumberInputComponent) {
19317
- errLog('vxe.error.reqComp', ['vxe-input']);
19318
- }
19319
- if (!VxeUIRadioGroupComponent) {
19320
- errLog('vxe.error.reqComp', ['vxe-radio-group']);
19321
- }
19322
- });
19323
- }
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
+ });
19324
19379
  },
19325
19380
  render(h) {
19326
19381
  const $xeTable = this.$xeTable;
@@ -20065,22 +20120,20 @@ const {
20065
20120
  },
20066
20121
  created() {
20067
20122
  const $xeTableImportPanel = this;
20068
- if (true) {
20069
- const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
20070
- const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
20071
- const VxeUISelectComponent = core_.VxeUI.getComponent('VxeSelect');
20072
- $xeTableImportPanel.$nextTick(() => {
20073
- if (!VxeUIModalComponent) {
20074
- errLog('vxe.error.reqComp', ['vxe-modal']);
20075
- }
20076
- if (!VxeUIButtonComponent) {
20077
- errLog('vxe.error.reqComp', ['vxe-button']);
20078
- }
20079
- if (!VxeUISelectComponent) {
20080
- errLog('vxe.error.reqComp', ['vxe-select']);
20081
- }
20082
- });
20083
- }
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
+ });
20084
20137
  },
20085
20138
  render(h) {
20086
20139
  const $xeTable = this.$xeTable;
@@ -20316,30 +20369,28 @@ const {
20316
20369
  },
20317
20370
  created() {
20318
20371
  const $xeTableExportPanel = this;
20319
- if (true) {
20320
- const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
20321
- const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
20322
- const VxeUISelectComponent = core_.VxeUI.getComponent('VxeSelect');
20323
- const VxeUIInputComponent = core_.VxeUI.getComponent('VxeInput');
20324
- const VxeUICheckboxComponent = core_.VxeUI.getComponent('VxeCheckbox');
20325
- $xeTableExportPanel.$nextTick(() => {
20326
- if (!VxeUIModalComponent) {
20327
- errLog('vxe.error.reqComp', ['vxe-modal']);
20328
- }
20329
- if (!VxeUIButtonComponent) {
20330
- errLog('vxe.error.reqComp', ['vxe-button']);
20331
- }
20332
- if (!VxeUISelectComponent) {
20333
- errLog('vxe.error.reqComp', ['vxe-select']);
20334
- }
20335
- if (!VxeUIInputComponent) {
20336
- errLog('vxe.error.reqComp', ['vxe-input']);
20337
- }
20338
- if (!VxeUICheckboxComponent) {
20339
- errLog('vxe.error.reqComp', ['vxe-checkbox']);
20340
- }
20341
- });
20342
- }
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
+ });
20343
20394
  },
20344
20395
  render(h) {
20345
20396
  const $xeTable = this.$xeTable;
@@ -21891,11 +21942,9 @@ function handleInsertRowAt($xeTable, records, targetRow, isInsertNextRow) {
21891
21942
  const parentLevel = parentRest ? parentRest.level : 0;
21892
21943
  newRecords.forEach((item, i) => {
21893
21944
  const rowid = getRowid($xeTable, item);
21894
- if (true) {
21895
- if (item[treeOpts.parentField]) {
21896
- if (parentRow && item[treeOpts.parentField] !== parentRow[rowField]) {
21897
- errLog('vxe.error.errProp', [`${treeOpts.parentField}=${item[treeOpts.parentField]}`, `${treeOpts.parentField}=${parentRow[rowField]}`]);
21898
- }
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]}`]);
21899
21948
  }
21900
21949
  }
21901
21950
  if (parentRow) {
@@ -23529,10 +23578,8 @@ function downloadFile($xetable, opts, content) {
23529
23578
  }).then(() => {
23530
23579
  if (opts.message !== false) {
23531
23580
  // 检测弹窗模块
23532
- if (true) {
23533
- if (!core_.VxeUI.modal) {
23534
- errLog('vxe.error.reqModule', ['Modal']);
23535
- }
23581
+ if (!core_.VxeUI.modal) {
23582
+ errLog('vxe.error.reqModule', ['Modal']);
23536
23583
  }
23537
23584
  core_.VxeUI.modal.message({
23538
23585
  content: export_mixin_getI18n('vxe.table.expSuccess'),
@@ -23813,10 +23860,8 @@ function handleImport($xeTable, content, opts) {
23813
23860
  }
23814
23861
  if (opts.message !== false) {
23815
23862
  // 检测弹窗模块
23816
- if (true) {
23817
- if (!core_.VxeUI.modal) {
23818
- errLog('vxe.error.reqModule', ['Modal']);
23819
- }
23863
+ if (!core_.VxeUI.modal) {
23864
+ errLog('vxe.error.reqModule', ['Modal']);
23820
23865
  }
23821
23866
  core_.VxeUI.modal.message({
23822
23867
  content: export_mixin_getI18n('vxe.table.impSuccess', [rows.length]),
@@ -23833,10 +23878,8 @@ function handleImport($xeTable, content, opts) {
23833
23878
  });
23834
23879
  } else if (opts.message !== false) {
23835
23880
  // 检测弹窗模块
23836
- if (true) {
23837
- if (!core_.VxeUI.modal) {
23838
- errLog('vxe.error.reqModule', ['Modal']);
23839
- }
23881
+ if (!core_.VxeUI.modal) {
23882
+ errLog('vxe.error.reqModule', ['Modal']);
23840
23883
  }
23841
23884
  core_.VxeUI.modal.message({
23842
23885
  content: export_mixin_getI18n('vxe.error.impFields'),
@@ -23865,10 +23908,8 @@ function handleFileImport($xetable, file, opts) {
23865
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)) {
23866
23909
  if (opts.message !== false) {
23867
23910
  // 检测弹窗模块
23868
- if (true) {
23869
- if (!core_.VxeUI.modal) {
23870
- errLog('vxe.error.reqModule', ['Modal']);
23871
- }
23911
+ if (!core_.VxeUI.modal) {
23912
+ errLog('vxe.error.reqModule', ['Modal']);
23872
23913
  }
23873
23914
  core_.VxeUI.modal.message({
23874
23915
  content: export_mixin_getI18n('vxe.error.notType', [type]),
@@ -23941,9 +23982,7 @@ function handleFileImport($xetable, file, opts) {
23941
23982
  }
23942
23983
  } else {
23943
23984
  // 不支持的浏览器
23944
- if (true) {
23945
- errLog('vxe.error.notExp');
23946
- }
23985
+ errLog('vxe.error.notExp');
23947
23986
  _importResolve({
23948
23987
  status: true
23949
23988
  });
@@ -24020,10 +24059,8 @@ function readLocalFile(options = {}) {
24020
24059
  } else {
24021
24060
  if (options.message !== false) {
24022
24061
  // 检测弹窗模块
24023
- if (true) {
24024
- if (!core_.VxeUI.modal) {
24025
- errLog('vxe.error.reqModule', ['Modal']);
24026
- }
24062
+ if (!core_.VxeUI.modal) {
24063
+ errLog('vxe.error.reqModule', ['Modal']);
24027
24064
  }
24028
24065
  core_.VxeUI.modal.message({
24029
24066
  content: export_mixin_getI18n('vxe.error.notType', [errType]),
@@ -24789,10 +24826,8 @@ const convertToRows = originColumns => {
24789
24826
  const {
24790
24827
  exportOpts
24791
24828
  } = this;
24792
- if (true) {
24793
- if (!this.exportConfig) {
24794
- errLog('vxe.error.reqProp', ['export-config']);
24795
- }
24829
+ if (!this.exportConfig) {
24830
+ errLog('vxe.error.reqProp', ['export-config']);
24796
24831
  }
24797
24832
  return handleExportAndPrint(this, Object.assign({}, exportOpts, options));
24798
24833
  },
@@ -24801,10 +24836,8 @@ const convertToRows = originColumns => {
24801
24836
  const {
24802
24837
  printOpts
24803
24838
  } = this;
24804
- if (true) {
24805
- if (!this.printConfig) {
24806
- errLog('vxe.error.reqProp', ['print-config']);
24807
- }
24839
+ if (!this.printConfig) {
24840
+ errLog('vxe.error.reqProp', ['print-config']);
24808
24841
  }
24809
24842
  return handleExportAndPrint(this, Object.assign({}, printOpts, options), true);
24810
24843
  }
@@ -25061,6 +25094,7 @@ function getCheckboxRangeRows($xeTable, evnt, params, targetTrElem, trRect, offs
25061
25094
  });
25062
25095
  },
25063
25096
  handleCellMousedownEvent(evnt, params) {
25097
+ const $xeTable = this;
25064
25098
  const {
25065
25099
  editConfig,
25066
25100
  editOpts,
@@ -25070,8 +25104,8 @@ function getCheckboxRangeRows($xeTable, evnt, params, targetTrElem, trRect, offs
25070
25104
  mouseConfig,
25071
25105
  mouseOpts
25072
25106
  } = this;
25073
- if (mouseConfig && mouseOpts.area && this.handleMousedownCellAreaEvent) {
25074
- return this.handleMousedownCellAreaEvent(evnt, params);
25107
+ if (mouseConfig && mouseOpts.area && $xeTable.handleMousedownCellAreaEvent) {
25108
+ return $xeTable.handleMousedownCellAreaEvent(evnt, params);
25075
25109
  } else {
25076
25110
  if (checkboxConfig && checkboxOpts.range) {
25077
25111
  this.handleCheckboxRangeEvent(evnt, params);
@@ -25695,9 +25729,7 @@ function validErrorRuleValue(rule, val) {
25695
25729
  }
25696
25730
  }
25697
25731
  } else {
25698
- if (true) {
25699
- errLog('vxe.error.notValidators', [validator]);
25700
- }
25732
+ errLog('vxe.error.notValidators', [validator]);
25701
25733
  }
25702
25734
  } else {
25703
25735
  customValid = validator(validParams);
@@ -27804,23 +27836,21 @@ function renderBody(h, $xeTable) {
27804
27836
  warnLog('vxe.error.reqProp', ['tooltip-config']);
27805
27837
  }
27806
27838
  }
27807
- if (true) {
27808
- // 使用已安装的组件,如果未安装则不渲染
27809
- const VxeUILoadingComponent = core_.VxeUI.getComponent('VxeLoading');
27810
- const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
27811
- $xeTable.$nextTick(() => {
27812
- if (props.loading) {
27813
- if (!VxeUILoadingComponent && !this.$scopedSlots.loading) {
27814
- errLog('vxe.error.reqComp', ['vxe-loading']);
27815
- }
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']);
27816
27846
  }
27817
- if (props.showOverflow === true || props.showOverflow === 'tooltip' || props.showHeaderOverflow === true || props.showHeaderOverflow === 'tooltip' || props.showFooterOverflow === true || props.showFooterOverflow === 'tooltip' || props.tooltipConfig || props.editRules) {
27818
- if (!VxeUITooltipComponent) {
27819
- errLog('vxe.error.reqComp', ['vxe-tooltip']);
27820
- }
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']);
27821
27851
  }
27822
- });
27823
- }
27852
+ }
27853
+ });
27824
27854
  if (this.autoResize) {
27825
27855
  const resizeObserver = table_globalResize.create(() => {
27826
27856
  if (this.autoResize) {
@@ -28440,9 +28470,7 @@ const {
28440
28470
  if (tCommandMethod) {
28441
28471
  tCommandMethod(params);
28442
28472
  } else {
28443
- if (true) {
28444
- errLog('vxe.error.notCommands', [code]);
28445
- }
28473
+ errLog('vxe.error.notCommands', [code]);
28446
28474
  }
28447
28475
  }
28448
28476
  $xeToolbar.dispatchEvent('button-click', params, evnt);
@@ -28477,9 +28505,7 @@ const {
28477
28505
  if (tCommandMethod) {
28478
28506
  tCommandMethod(params);
28479
28507
  } else {
28480
- if (true) {
28481
- errLog('vxe.error.notCommands', [code]);
28482
- }
28508
+ errLog('vxe.error.notCommands', [code]);
28483
28509
  }
28484
28510
  }
28485
28511
  $xeToolbar.dispatchEvent('tool-click', params, evnt);
@@ -28932,28 +28958,24 @@ const {
28932
28958
  $xetable.connect(this);
28933
28959
  }
28934
28960
  const customOpts = $xeToolbar.computeCustomOpts;
28935
- if (true) {
28936
- if (customOpts.isFooter) {
28937
- warnLog('vxe.error.delProp', ['toolbar.custom.isFooter', 'table.custom-config.showFooter']);
28938
- }
28939
- if (customOpts.showFooter) {
28940
- warnLog('vxe.error.delProp', ['toolbar.custom.showFooter', 'table.custom-config.showFooter']);
28941
- }
28942
- if (customOpts.immediate) {
28943
- warnLog('vxe.error.delProp', ['toolbar.custom.immediate', 'table.custom-config.immediate']);
28944
- }
28945
- if (customOpts.trigger) {
28946
- warnLog('vxe.error.delProp', ['toolbar.custom.trigger', 'table.custom-config.trigger']);
28947
- }
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']);
28948
28972
  }
28949
28973
  });
28950
- if (true) {
28951
- // 使用已安装的组件,如果未安装则不渲染
28952
- const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
28953
- if (props.refresh || props.import || props.export || props.print || props.zoom) {
28954
- if (!VxeUIButtonComponent) {
28955
- errLog('vxe.error.reqComp', ['vxe-button']);
28956
- }
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']);
28957
28979
  }
28958
28980
  }
28959
28981
  },
@@ -29047,9 +29069,7 @@ function getFuncSlot($xeGrid, optSlots, slotKey) {
29047
29069
  if (slots[funcSlot]) {
29048
29070
  return slots[funcSlot];
29049
29071
  } else {
29050
- if (true) {
29051
- errLog('vxe.error.notSlot', [funcSlot]);
29052
- }
29072
+ errLog('vxe.error.notSlot', [funcSlot]);
29053
29073
  }
29054
29074
  } else {
29055
29075
  return funcSlot;
@@ -29142,7 +29162,7 @@ function renderForm(h, _vm) {
29142
29162
  if (hasForm) {
29143
29163
  return h('div', {
29144
29164
  key: 'form',
29145
- ref: 'formWrapper',
29165
+ ref: 'refFormWrapper',
29146
29166
  class: 'vxe-grid--form-wrapper'
29147
29167
  }, formSlot ? formSlot.call(_vm, {
29148
29168
  $grid: _vm
@@ -29165,7 +29185,7 @@ function renderToolbar(h, _vm) {
29165
29185
  if (hasToolbar) {
29166
29186
  return h('div', {
29167
29187
  key: 'toolbar',
29168
- ref: 'toolbarWrapper',
29188
+ ref: 'refToolbarWrapper',
29169
29189
  class: 'vxe-grid--toolbar-wrapper'
29170
29190
  }, toolbarSlot ? toolbarSlot.call(_vm, {
29171
29191
  $grid: _vm
@@ -29188,7 +29208,7 @@ function renderTop(h, _vm) {
29188
29208
  const topSlot = $scopedSlots.top;
29189
29209
  return topSlot ? h('div', {
29190
29210
  key: 'top',
29191
- ref: 'topWrapper',
29211
+ ref: 'refTopWrapper',
29192
29212
  class: 'vxe-grid--top-wrapper'
29193
29213
  }, topSlot.call(_vm, {
29194
29214
  $grid: _vm
@@ -29253,7 +29273,7 @@ function renderBottom(h, _vm) {
29253
29273
  const bottomSlot = $scopedSlots.bottom;
29254
29274
  return bottomSlot ? h('div', {
29255
29275
  key: 'bottom',
29256
- ref: 'bottomWrapper',
29276
+ ref: 'refBottomWrapper',
29257
29277
  class: 'vxe-grid--bottom-wrapper'
29258
29278
  }, bottomSlot.call(_vm, {
29259
29279
  $grid: _vm
@@ -29278,7 +29298,7 @@ function renderPager(h, $xeGrid) {
29278
29298
  if (hasPager) {
29279
29299
  return h('div', {
29280
29300
  key: 'pager',
29281
- ref: 'pagerWrapper',
29301
+ ref: 'refPagerWrapper',
29282
29302
  class: 'vxe-grid--pager-wrapper'
29283
29303
  }, pagerSlot ? pagerSlot.call($xeGrid, {
29284
29304
  $grid: $xeGrid
@@ -29568,34 +29588,30 @@ Object.keys(table.methods).forEach(name => {
29568
29588
  // if (proxyConfig && (data || (proxyOpts.form && formOpts.data))) {
29569
29589
  // errLog('vxe.error.errConflicts', ['grid.data', 'grid.proxy-config'])
29570
29590
  // }
29571
- if (true) {
29572
- if (this.toolbar) {
29573
- warnLog('vxe.error.delProp', ['grid.toolbar', 'grid.toolbar-config']);
29574
- }
29575
- if (this.toolbarConfig && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isObject(this.toolbarConfig)) {
29576
- warnLog('vxe.error.errProp', [`grid.toolbar-config=${this.toolbarConfig}`, 'grid.toolbar-config={}']);
29577
- }
29578
- // if (proxyOpts.props) {
29579
- // warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
29580
- // }
29591
+ if (this.toolbar) {
29592
+ warnLog('vxe.error.delProp', ['grid.toolbar', 'grid.toolbar-config']);
29581
29593
  }
29582
- if (true) {
29583
- // 使用已安装的组件,如果未安装则不渲染
29584
- const VxeUIFormComponent = core_.VxeUI.getComponent('VxeForm');
29585
- const VxeUIPagerComponent = core_.VxeUI.getComponent('VxePager');
29586
- $xeGrid.$nextTick(() => {
29587
- if (props.formConfig) {
29588
- if (!VxeUIFormComponent) {
29589
- errLog('vxe.error.reqComp', ['vxe-form']);
29590
- }
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']);
29591
29607
  }
29592
- if (props.pagerConfig) {
29593
- if (!VxeUIPagerComponent) {
29594
- errLog('vxe.error.reqComp', ['vxe-pager']);
29595
- }
29608
+ }
29609
+ if (props.pagerConfig) {
29610
+ if (!VxeUIPagerComponent) {
29611
+ errLog('vxe.error.reqComp', ['vxe-pager']);
29596
29612
  }
29597
- });
29598
- }
29613
+ }
29614
+ });
29599
29615
  this.initPages();
29600
29616
  grid_globalEvents.on(this, 'keydown', this.handleGlobalKeydownEvent);
29601
29617
  },
@@ -29616,6 +29632,7 @@ Object.keys(table.methods).forEach(name => {
29616
29632
  const vSize = $xeGrid.computeSize;
29617
29633
  const styles = $xeGrid.computeStyles;
29618
29634
  return h('div', {
29635
+ ref: 'refElem',
29619
29636
  class: ['vxe-grid', {
29620
29637
  [`size--${vSize}`]: vSize,
29621
29638
  'is--animat': !!this.animat,
@@ -29642,32 +29659,32 @@ Object.keys(table.methods).forEach(name => {
29642
29659
  }
29643
29660
  return [];
29644
29661
  },
29645
- getParentHeight() {
29646
- const {
29647
- $el,
29648
- isZMax
29649
- } = this;
29650
- return (isZMax ? getDomNode().visibleHeight : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getComputedStyle($el.parentNode).height)) - this.getExcludeHeight();
29651
- },
29652
29662
  /**
29653
29663
  * 获取需要排除的高度
29654
29664
  */
29655
29665
  getExcludeHeight() {
29666
+ const $xeGrid = this;
29667
+ const reactData = $xeGrid;
29656
29668
  const {
29657
- $refs,
29658
- $el,
29659
- isZMax,
29660
- height
29661
- } = this;
29662
- const {
29663
- formWrapper,
29664
- toolbarWrapper,
29665
- topWrapper,
29666
- bottomWrapper,
29667
- pagerWrapper
29668
- } = $refs;
29669
- const parentPaddingSize = isZMax || !(height === 'auto' || height === '100%') ? 0 : getPaddingTopBottomSize($el.parentNode);
29670
- return parentPaddingSize + getPaddingTopBottomSize($el) + getOffsetHeight(formWrapper) + getOffsetHeight(toolbarWrapper) + getOffsetHeight(topWrapper) + getOffsetHeight(bottomWrapper) + getOffsetHeight(pagerWrapper);
29669
+ isZMax
29670
+ } = reactData;
29671
+ const el = $xeGrid.$refs.refElem;
29672
+ const formWrapper = $xeGrid.$refs.refFormWrapper;
29673
+ const toolbarWrapper = $xeGrid.$refs.refToolbarWrapper;
29674
+ const topWrapper = $xeGrid.$refs.refTopWrapper;
29675
+ const bottomWrapper = $xeGrid.$refs.refBottomWrapper;
29676
+ const pagerWrapper = $xeGrid.$refs.refPagerWrapper;
29677
+ const parentPaddingSize = isZMax ? 0 : getPaddingTopBottomSize(el.parentNode);
29678
+ return parentPaddingSize + getPaddingTopBottomSize(el) + getOffsetHeight(formWrapper) + getOffsetHeight(toolbarWrapper) + getOffsetHeight(topWrapper) + getOffsetHeight(bottomWrapper) + getOffsetHeight(pagerWrapper);
29679
+ },
29680
+ getParentHeight() {
29681
+ const $xeGrid = this;
29682
+ const reactData = $xeGrid;
29683
+ const el = $xeGrid.$refs.refElem;
29684
+ if (el) {
29685
+ return (reactData.isZMax ? getDomNode().visibleHeight : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getComputedStyle(el.parentNode).height)) - $xeGrid.getExcludeHeight();
29686
+ }
29687
+ return 0;
29671
29688
  },
29672
29689
  initToolbar() {
29673
29690
  this.$nextTick(() => {
@@ -29959,9 +29976,7 @@ Object.keys(table.methods).forEach(name => {
29959
29976
  };
29960
29977
  });
29961
29978
  } else {
29962
- if (true) {
29963
- errLog('vxe.error.notFunc', ['proxy-config.ajax.query']);
29964
- }
29979
+ errLog('vxe.error.notFunc', ['proxy-config.ajax.query']);
29965
29980
  }
29966
29981
  break;
29967
29982
  }
@@ -29996,10 +30011,8 @@ Object.keys(table.methods).forEach(name => {
29996
30011
  $xetable.setPendingRow(removeRecords, false);
29997
30012
  if (isRespMsg) {
29998
30013
  // 检测弹窗模块
29999
- if (true) {
30000
- if (!core_.VxeUI.modal) {
30001
- errLog('vxe.error.reqModule', ['Modal']);
30002
- }
30014
+ if (!core_.VxeUI.modal) {
30015
+ errLog('vxe.error.reqModule', ['Modal']);
30003
30016
  }
30004
30017
  core_.VxeUI.modal.message({
30005
30018
  content: this.getRespMsg(rest, 'vxe.grid.delSuccess'),
@@ -30024,10 +30037,8 @@ Object.keys(table.methods).forEach(name => {
30024
30037
  this.tableLoading = false;
30025
30038
  if (isRespMsg) {
30026
30039
  // 检测弹窗模块
30027
- if (true) {
30028
- if (!core_.VxeUI.modal) {
30029
- errLog('vxe.error.reqModule', ['Modal']);
30030
- }
30040
+ if (!core_.VxeUI.modal) {
30041
+ errLog('vxe.error.reqModule', ['Modal']);
30031
30042
  }
30032
30043
  core_.VxeUI.modal.message({
30033
30044
  id: code,
@@ -30049,10 +30060,8 @@ Object.keys(table.methods).forEach(name => {
30049
30060
  } else {
30050
30061
  if (isActiveMsg) {
30051
30062
  // 检测弹窗模块
30052
- if (true) {
30053
- if (!core_.VxeUI.modal) {
30054
- errLog('vxe.error.reqModule', ['Modal']);
30055
- }
30063
+ if (!core_.VxeUI.modal) {
30064
+ errLog('vxe.error.reqModule', ['Modal']);
30056
30065
  }
30057
30066
  core_.VxeUI.modal.message({
30058
30067
  id: code,
@@ -30062,9 +30071,7 @@ Object.keys(table.methods).forEach(name => {
30062
30071
  }
30063
30072
  }
30064
30073
  } else {
30065
- if (true) {
30066
- errLog('vxe.error.notFunc', ['proxy-config.ajax.delete']);
30067
- }
30074
+ errLog('vxe.error.notFunc', ['proxy-config.ajax.delete']);
30068
30075
  }
30069
30076
  break;
30070
30077
  }
@@ -30115,10 +30122,8 @@ Object.keys(table.methods).forEach(name => {
30115
30122
  $xetable.clearPendingRow();
30116
30123
  if (isRespMsg) {
30117
30124
  // 检测弹窗模块
30118
- if (true) {
30119
- if (!core_.VxeUI.modal) {
30120
- errLog('vxe.error.reqModule', ['Modal']);
30121
- }
30125
+ if (!core_.VxeUI.modal) {
30126
+ errLog('vxe.error.reqModule', ['Modal']);
30122
30127
  }
30123
30128
  core_.VxeUI.modal.message({
30124
30129
  content: this.getRespMsg(rest, 'vxe.grid.saveSuccess'),
@@ -30143,10 +30148,8 @@ Object.keys(table.methods).forEach(name => {
30143
30148
  this.tableLoading = false;
30144
30149
  if (isRespMsg) {
30145
30150
  // 检测弹窗模块
30146
- if (true) {
30147
- if (!core_.VxeUI.modal) {
30148
- errLog('vxe.error.reqModule', ['Modal']);
30149
- }
30151
+ if (!core_.VxeUI.modal) {
30152
+ errLog('vxe.error.reqModule', ['Modal']);
30150
30153
  }
30151
30154
  core_.VxeUI.modal.message({
30152
30155
  id: code,
@@ -30167,10 +30170,8 @@ Object.keys(table.methods).forEach(name => {
30167
30170
  } else {
30168
30171
  if (isActiveMsg) {
30169
30172
  // 检测弹窗模块
30170
- if (true) {
30171
- if (!core_.VxeUI.modal) {
30172
- errLog('vxe.error.reqModule', ['Modal']);
30173
- }
30173
+ if (!core_.VxeUI.modal) {
30174
+ errLog('vxe.error.reqModule', ['Modal']);
30174
30175
  }
30175
30176
  core_.VxeUI.modal.message({
30176
30177
  id: code,
@@ -30181,9 +30182,7 @@ Object.keys(table.methods).forEach(name => {
30181
30182
  }
30182
30183
  });
30183
30184
  } else {
30184
- if (true) {
30185
- errLog('vxe.error.notFunc', ['proxy-config.ajax.save']);
30186
- }
30185
+ errLog('vxe.error.notFunc', ['proxy-config.ajax.save']);
30187
30186
  }
30188
30187
  break;
30189
30188
  }
@@ -30199,9 +30198,7 @@ Object.keys(table.methods).forEach(name => {
30199
30198
  $table: $xetable
30200
30199
  }, ...args);
30201
30200
  } else {
30202
- if (true) {
30203
- errLog('vxe.error.notCommands', [code]);
30204
- }
30201
+ errLog('vxe.error.notCommands', [code]);
30205
30202
  }
30206
30203
  }
30207
30204
  }
@@ -30234,10 +30231,8 @@ Object.keys(table.methods).forEach(name => {
30234
30231
  });
30235
30232
  } else {
30236
30233
  // 检测弹窗模块
30237
- if (true) {
30238
- if (!core_.VxeUI.modal) {
30239
- errLog('vxe.error.reqModule', ['Modal']);
30240
- }
30234
+ if (!core_.VxeUI.modal) {
30235
+ errLog('vxe.error.reqModule', ['Modal']);
30241
30236
  }
30242
30237
  core_.VxeUI.modal.message({
30243
30238
  id: `msg_${code}`,
@@ -30318,10 +30313,8 @@ Object.keys(table.methods).forEach(name => {
30318
30313
  } else {
30319
30314
  if (isActiveMsg) {
30320
30315
  // 检测弹窗模块
30321
- if (true) {
30322
- if (!core_.VxeUI.modal) {
30323
- errLog('vxe.error.reqModule', ['Modal']);
30324
- }
30316
+ if (!core_.VxeUI.modal) {
30317
+ errLog('vxe.error.reqModule', ['Modal']);
30325
30318
  }
30326
30319
  core_.VxeUI.modal.message({
30327
30320
  id: code,
@@ -30747,10 +30740,8 @@ function getComponentOns(renderOpts, params, eFns) {
30747
30740
  const ons = {};
30748
30741
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().objectEach(events, (func, key) => {
30749
30742
  ons[getOnName(key)] = function (...args) {
30750
- if (true) {
30751
- if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(func)) {
30752
- errLog('vxe.error.errFunc', [func]);
30753
- }
30743
+ if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(func)) {
30744
+ errLog('vxe.error.errFunc', [func]);
30754
30745
  }
30755
30746
  func(params, ...args);
30756
30747
  };