vxe-table 4.14.0-beta.3 → 4.14.0-beta.4

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 (149) hide show
  1. package/README.md +1 -1
  2. package/es/locale/lang/ar-EG.js +1 -0
  3. package/es/locale/lang/de-DE.js +1 -0
  4. package/es/locale/lang/en-US.js +1 -0
  5. package/es/locale/lang/es-ES.js +1 -0
  6. package/es/locale/lang/fr-FR.js +1 -0
  7. package/es/locale/lang/hu-HU.js +1 -0
  8. package/es/locale/lang/hy-AM.js +1 -0
  9. package/es/locale/lang/id-ID.js +1 -0
  10. package/es/locale/lang/it-IT.js +1 -0
  11. package/es/locale/lang/ja-JP.js +1 -0
  12. package/es/locale/lang/ko-KR.js +1 -0
  13. package/es/locale/lang/ms-MY.js +1 -0
  14. package/es/locale/lang/nb-NO.js +1 -0
  15. package/es/locale/lang/pt-BR.js +1 -0
  16. package/es/locale/lang/ru-RU.js +1 -0
  17. package/es/locale/lang/th-TH.js +1 -0
  18. package/es/locale/lang/ug-CN.js +1 -0
  19. package/es/locale/lang/uk-UA.js +1 -0
  20. package/es/locale/lang/uz-UZ.js +1 -0
  21. package/es/locale/lang/vi-VN.js +1 -0
  22. package/es/locale/lang/zh-CHT.js +1 -0
  23. package/es/locale/lang/zh-CN.js +1 -0
  24. package/es/style.css +1 -1
  25. package/es/table/module/edit/hook.js +31 -1
  26. package/es/table/src/body.js +1 -1
  27. package/es/table/src/footer.js +1 -1
  28. package/es/table/src/header.js +1 -1
  29. package/es/table/src/table.js +14 -1
  30. package/es/ui/index.js +6 -1
  31. package/es/ui/src/log.js +1 -1
  32. package/lib/index.umd.js +42 -7
  33. package/lib/index.umd.min.js +1 -1
  34. package/lib/locale/lang/ar-EG.js +1 -0
  35. package/lib/locale/lang/ar-EG.min.js +1 -1
  36. package/lib/locale/lang/ar-EG.umd.js +1 -0
  37. package/lib/locale/lang/de-DE.js +1 -0
  38. package/lib/locale/lang/de-DE.min.js +1 -1
  39. package/lib/locale/lang/de-DE.umd.js +1 -0
  40. package/lib/locale/lang/en-US.js +1 -0
  41. package/lib/locale/lang/en-US.min.js +1 -1
  42. package/lib/locale/lang/en-US.umd.js +1 -0
  43. package/lib/locale/lang/es-ES.js +1 -0
  44. package/lib/locale/lang/es-ES.min.js +1 -1
  45. package/lib/locale/lang/es-ES.umd.js +1 -0
  46. package/lib/locale/lang/fr-FR.js +1 -0
  47. package/lib/locale/lang/fr-FR.min.js +1 -1
  48. package/lib/locale/lang/fr-FR.umd.js +1 -0
  49. package/lib/locale/lang/hu-HU.js +1 -0
  50. package/lib/locale/lang/hu-HU.min.js +1 -1
  51. package/lib/locale/lang/hu-HU.umd.js +1 -0
  52. package/lib/locale/lang/hy-AM.js +1 -0
  53. package/lib/locale/lang/hy-AM.min.js +1 -1
  54. package/lib/locale/lang/hy-AM.umd.js +1 -0
  55. package/lib/locale/lang/id-ID.js +1 -0
  56. package/lib/locale/lang/id-ID.min.js +1 -1
  57. package/lib/locale/lang/id-ID.umd.js +1 -0
  58. package/lib/locale/lang/it-IT.js +1 -0
  59. package/lib/locale/lang/it-IT.min.js +1 -1
  60. package/lib/locale/lang/it-IT.umd.js +1 -0
  61. package/lib/locale/lang/ja-JP.js +1 -0
  62. package/lib/locale/lang/ja-JP.min.js +1 -1
  63. package/lib/locale/lang/ja-JP.umd.js +1 -0
  64. package/lib/locale/lang/ko-KR.js +1 -0
  65. package/lib/locale/lang/ko-KR.min.js +1 -1
  66. package/lib/locale/lang/ko-KR.umd.js +1 -0
  67. package/lib/locale/lang/ms-MY.js +1 -0
  68. package/lib/locale/lang/ms-MY.min.js +1 -1
  69. package/lib/locale/lang/ms-MY.umd.js +1 -0
  70. package/lib/locale/lang/nb-NO.js +1 -0
  71. package/lib/locale/lang/nb-NO.min.js +1 -1
  72. package/lib/locale/lang/nb-NO.umd.js +1 -0
  73. package/lib/locale/lang/pt-BR.js +1 -0
  74. package/lib/locale/lang/pt-BR.min.js +1 -1
  75. package/lib/locale/lang/pt-BR.umd.js +1 -0
  76. package/lib/locale/lang/ru-RU.js +1 -0
  77. package/lib/locale/lang/ru-RU.min.js +1 -1
  78. package/lib/locale/lang/ru-RU.umd.js +1 -0
  79. package/lib/locale/lang/th-TH.js +1 -0
  80. package/lib/locale/lang/th-TH.min.js +1 -1
  81. package/lib/locale/lang/th-TH.umd.js +1 -0
  82. package/lib/locale/lang/ug-CN.js +1 -0
  83. package/lib/locale/lang/ug-CN.min.js +1 -1
  84. package/lib/locale/lang/ug-CN.umd.js +1 -0
  85. package/lib/locale/lang/uk-UA.js +1 -0
  86. package/lib/locale/lang/uk-UA.min.js +1 -1
  87. package/lib/locale/lang/uk-UA.umd.js +1 -0
  88. package/lib/locale/lang/uz-UZ.js +1 -0
  89. package/lib/locale/lang/uz-UZ.min.js +1 -1
  90. package/lib/locale/lang/uz-UZ.umd.js +1 -0
  91. package/lib/locale/lang/vi-VN.js +1 -0
  92. package/lib/locale/lang/vi-VN.min.js +1 -1
  93. package/lib/locale/lang/vi-VN.umd.js +1 -0
  94. package/lib/locale/lang/zh-CHT.js +1 -0
  95. package/lib/locale/lang/zh-CHT.min.js +1 -1
  96. package/lib/locale/lang/zh-CHT.umd.js +1 -0
  97. package/lib/locale/lang/zh-CN.js +1 -0
  98. package/lib/locale/lang/zh-CN.min.js +1 -1
  99. package/lib/locale/lang/zh-CN.umd.js +1 -0
  100. package/lib/style.css +1 -1
  101. package/lib/table/module/edit/hook.js +30 -1
  102. package/lib/table/module/edit/hook.min.js +1 -1
  103. package/lib/table/src/body.js +1 -1
  104. package/lib/table/src/body.min.js +1 -1
  105. package/lib/table/src/footer.js +1 -1
  106. package/lib/table/src/footer.min.js +1 -1
  107. package/lib/table/src/header.js +1 -1
  108. package/lib/table/src/header.min.js +1 -1
  109. package/lib/table/src/table.js +1 -1
  110. package/lib/table/src/table.min.js +1 -1
  111. package/lib/ui/index.js +6 -1
  112. package/lib/ui/index.min.js +1 -1
  113. package/lib/ui/src/log.js +1 -1
  114. package/lib/ui/src/log.min.js +1 -1
  115. package/package.json +1 -1
  116. package/packages/locale/lang/ar-EG.ts +1 -0
  117. package/packages/locale/lang/de-DE.ts +1 -0
  118. package/packages/locale/lang/en-US.ts +1 -0
  119. package/packages/locale/lang/es-ES.ts +1 -0
  120. package/packages/locale/lang/fr-FR.ts +1 -0
  121. package/packages/locale/lang/hu-HU.ts +1 -0
  122. package/packages/locale/lang/hy-AM.ts +1 -0
  123. package/packages/locale/lang/id-ID.ts +1 -0
  124. package/packages/locale/lang/it-IT.ts +1 -0
  125. package/packages/locale/lang/ja-JP.ts +1 -0
  126. package/packages/locale/lang/ko-KR.ts +1 -0
  127. package/packages/locale/lang/ms-MY.ts +1 -0
  128. package/packages/locale/lang/nb-NO.ts +1 -0
  129. package/packages/locale/lang/pt-BR.ts +1 -0
  130. package/packages/locale/lang/ru-RU.ts +1 -0
  131. package/packages/locale/lang/th-TH.ts +1 -0
  132. package/packages/locale/lang/ug-CN.ts +1 -0
  133. package/packages/locale/lang/uk-UA.ts +1 -0
  134. package/packages/locale/lang/uz-UZ.ts +1 -0
  135. package/packages/locale/lang/vi-VN.ts +1 -0
  136. package/packages/locale/lang/zh-CHT.ts +1 -0
  137. package/packages/locale/lang/zh-CN.ts +1 -0
  138. package/packages/table/module/edit/hook.ts +29 -1
  139. package/packages/table/src/body.ts +1 -1
  140. package/packages/table/src/footer.ts +1 -1
  141. package/packages/table/src/header.ts +1 -1
  142. package/packages/table/src/table.ts +14 -1
  143. package/packages/ui/index.ts +5 -0
  144. /package/es/{iconfont.1751247415649.ttf → iconfont.1751277484787.ttf} +0 -0
  145. /package/es/{iconfont.1751247415649.woff → iconfont.1751277484787.woff} +0 -0
  146. /package/es/{iconfont.1751247415649.woff2 → iconfont.1751277484787.woff2} +0 -0
  147. /package/lib/{iconfont.1751247415649.ttf → iconfont.1751277484787.ttf} +0 -0
  148. /package/lib/{iconfont.1751247415649.woff → iconfont.1751277484787.woff} +0 -0
  149. /package/lib/{iconfont.1751247415649.woff2 → iconfont.1751277484787.woff2} +0 -0
@@ -93,8 +93,11 @@ hooks.add('tableEditModule', {
93
93
  }
94
94
  });
95
95
  };
96
+ // const insertGroupRow = (newRecords: any[], isAppend: boolean) => {
97
+ // }
96
98
  const handleInsertRowAt = (records, targetRow, isInsertNextRow) => {
97
99
  const { treeConfig } = props;
100
+ const { isRowGroupStatus } = reactData;
98
101
  const { tableFullTreeData, afterFullData, mergeBodyList, tableFullData, fullDataRowIdData, fullAllDataRowIdData, insertRowMaps } = internalData;
99
102
  const treeOpts = computeTreeOpts.value;
100
103
  const { transform, rowField, mapChildrenField } = treeOpts;
@@ -108,6 +111,14 @@ hooks.add('tableEditModule', {
108
111
  if (treeConfig && transform) {
109
112
  insertTreeRow(newRecords, false);
110
113
  }
114
+ else if (isRowGroupStatus) {
115
+ // 如果分组
116
+ if (treeConfig) {
117
+ throw new Error(getI18n('vxe.error.noTree', ['insert']));
118
+ }
119
+ warnLog(getI18n('vxe.error.noGroup', ['remove']));
120
+ // insertGroupRow(newRecords, false)
121
+ }
111
122
  else {
112
123
  newRecords.forEach(item => {
113
124
  const rowid = getRowid($xeTable, item);
@@ -132,6 +143,14 @@ hooks.add('tableEditModule', {
132
143
  if (treeConfig && transform) {
133
144
  insertTreeRow(newRecords, true);
134
145
  }
146
+ else if (isRowGroupStatus) {
147
+ // 如果分组
148
+ if (treeConfig) {
149
+ throw new Error(getI18n('vxe.error.noTree', ['insert']));
150
+ }
151
+ warnLog(getI18n('vxe.error.noGroup', ['remove']));
152
+ // insertGroupRow(newRecords, true)
153
+ }
135
154
  else {
136
155
  newRecords.forEach(item => {
137
156
  const rowid = getRowid($xeTable, item);
@@ -196,6 +215,13 @@ hooks.add('tableEditModule', {
196
215
  insertTreeRow(newRecords, true);
197
216
  }
198
217
  }
218
+ else if (isRowGroupStatus) {
219
+ // 如果分组
220
+ if (treeConfig) {
221
+ throw new Error(getI18n('vxe.error.noTree', ['insert']));
222
+ }
223
+ warnLog(getI18n('vxe.error.noGroup', ['remove']));
224
+ }
199
225
  else {
200
226
  if (treeConfig) {
201
227
  throw new Error(getI18n('vxe.error.noTree', ['insert']));
@@ -481,7 +507,7 @@ hooks.add('tableEditModule', {
481
507
  */
482
508
  remove(rows) {
483
509
  const { treeConfig } = props;
484
- const { editStore } = reactData;
510
+ const { editStore, isRowGroupStatus } = reactData;
485
511
  const { tableFullTreeData, selectCheckboxMaps, afterFullData, mergeBodyList, tableFullData, pendingRowMaps, insertRowMaps, removeRowMaps } = internalData;
486
512
  const checkboxOpts = computeCheckboxOpts.value;
487
513
  const treeOpts = computeTreeOpts.value;
@@ -540,6 +566,10 @@ hooks.add('tableEditModule', {
540
566
  }
541
567
  });
542
568
  }
569
+ else if (isRowGroupStatus) {
570
+ // 如果分组
571
+ warnLog(getI18n('vxe.error.noGroup', ['remove']));
572
+ }
543
573
  else {
544
574
  rows.forEach((row) => {
545
575
  const tfIndex = $xeTable.findRowIndexOf(tableFullData, row);
@@ -333,7 +333,7 @@ export default defineVxeComponent({
333
333
  h('div', {
334
334
  colid,
335
335
  rowid,
336
- class: 'vxe-cell--wrapper'
336
+ class: 'vxe-cell--wrapper vxe-body-cell--wrapper'
337
337
  }, column.renderCell(cellParams))
338
338
  ]));
339
339
  if (showValidTip && errorValidItem) {
@@ -182,7 +182,7 @@ export default defineVxeComponent({
182
182
  : [
183
183
  h('div', {
184
184
  colid,
185
- class: 'vxe-cell--wrapper'
185
+ class: 'vxe-cell--wrapper vxe-footer-cell--wrapper'
186
186
  }, column.renderFooter(cellParams))
187
187
  ]),
188
188
  /**
@@ -161,7 +161,7 @@ export default defineVxeComponent({
161
161
  : [
162
162
  h('div', {
163
163
  colid,
164
- class: 'vxe-cell--wrapper'
164
+ class: 'vxe-cell--wrapper vxe-header-cell--wrapper'
165
165
  }, column.renderHeader(cellParams))
166
166
  ]),
167
167
  /**
@@ -1586,7 +1586,20 @@ export default defineVxeComponent({
1586
1586
  }
1587
1587
  };
1588
1588
  const calcColumnAutoWidth = (column, wrapperEl) => {
1589
- const cellElemList = wrapperEl.querySelectorAll(`.vxe-cell--wrapper[colid="${column.id}"]`);
1589
+ const columnOpts = computeColumnOpts.value;
1590
+ const { autoOptions } = columnOpts;
1591
+ const { isCalcHeader, isCalcBody, isCalcFooter } = autoOptions || {};
1592
+ const querySelections = [];
1593
+ if (isCalcHeader) {
1594
+ querySelections.push(`.vxe-header-cell--wrapper[colid="${column.id}"]`);
1595
+ }
1596
+ if (isCalcBody) {
1597
+ querySelections.push(`.vxe-body-cell--wrapper[colid="${column.id}"]`);
1598
+ }
1599
+ if (isCalcFooter) {
1600
+ querySelections.push(`.vxe-footer-cell--wrapper[colid="${column.id}"]`);
1601
+ }
1602
+ const cellElemList = querySelections.length ? wrapperEl.querySelectorAll(querySelections.join(',')) : [];
1590
1603
  let leftRightPadding = 0;
1591
1604
  const firstCellEl = cellElemList[0];
1592
1605
  if (firstCellEl && firstCellEl.parentElement) {
package/es/ui/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  import { getFuncText } from './src/utils';
3
- export const version = "4.14.0-beta.3";
3
+ export const version = "4.14.0-beta.4";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
@@ -71,6 +71,11 @@ VxeUI.setConfig({
71
71
  theme: 'beautify'
72
72
  },
73
73
  columnConfig: {
74
+ autoOptions: {
75
+ isCalcHeader: true,
76
+ isCalcBody: true,
77
+ isCalcFooter: true
78
+ },
74
79
  maxFixedSize: 4
75
80
  },
76
81
  cellConfig: {
package/es/ui/src/log.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const version = `table v${"4.14.0-beta.3"}`;
3
+ const version = `table v${"4.14.0-beta.4"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
package/lib/index.umd.js CHANGED
@@ -3138,7 +3138,7 @@ function eqEmptyValue(cellValue) {
3138
3138
  ;// ./packages/ui/index.ts
3139
3139
 
3140
3140
 
3141
- const version = "4.14.0-beta.3";
3141
+ const version = "4.14.0-beta.4";
3142
3142
  core_.VxeUI.version = version;
3143
3143
  core_.VxeUI.tableVersion = version;
3144
3144
  core_.VxeUI.setConfig({
@@ -3209,6 +3209,11 @@ core_.VxeUI.setConfig({
3209
3209
  theme: 'beautify'
3210
3210
  },
3211
3211
  columnConfig: {
3212
+ autoOptions: {
3213
+ isCalcHeader: true,
3214
+ isCalcBody: true,
3215
+ isCalcFooter: true
3216
+ },
3212
3217
  maxFixedSize: 4
3213
3218
  },
3214
3219
  cellConfig: {
@@ -3623,7 +3628,7 @@ var esnext_iterator_some = __webpack_require__(7550);
3623
3628
  const {
3624
3629
  log: log_log
3625
3630
  } = core_.VxeUI;
3626
- const log_version = `table v${"4.14.0-beta.3"}`;
3631
+ const log_version = `table v${"4.14.0-beta.4"}`;
3627
3632
  const warnLog = log_log.create('warn', log_version);
3628
3633
  const errLog = log_log.create('error', log_version);
3629
3634
  ;// ./packages/table/src/columnInfo.ts
@@ -6945,7 +6950,7 @@ const renderType = 'body';
6945
6950
  }, isVNPreEmptyStatus ? [] : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
6946
6951
  colid,
6947
6952
  rowid,
6948
- class: 'vxe-cell--wrapper'
6953
+ class: 'vxe-cell--wrapper vxe-body-cell--wrapper'
6949
6954
  }, column.renderCell(cellParams))]));
6950
6955
  if (showValidTip && errorValidItem) {
6951
6956
  const errRule = errorValidItem.rule;
@@ -7698,7 +7703,7 @@ const header_renderType = 'header';
7698
7703
  style: tcStyle
7699
7704
  }, isVNPreEmptyStatus || isOptimizeMode && fixedHiddenColumn ? [] : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
7700
7705
  colid,
7701
- class: 'vxe-cell--wrapper'
7706
+ class: 'vxe-cell--wrapper vxe-header-cell--wrapper'
7702
7707
  }, column.renderHeader(cellParams))]),
7703
7708
  /**
7704
7709
  * 列宽拖动
@@ -8154,7 +8159,7 @@ const footer_renderType = 'footer';
8154
8159
  style: tcStyle
8155
8160
  }, isVNPreEmptyStatus ? [] : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
8156
8161
  colid,
8157
- class: 'vxe-cell--wrapper'
8162
+ class: 'vxe-cell--wrapper vxe-footer-cell--wrapper'
8158
8163
  }, column.renderFooter(cellParams))]),
8159
8164
  /**
8160
8165
  * 列宽拖动
@@ -10994,7 +10999,7 @@ if(hasCustomSort){collectColumn=external_root_XEUtils_commonjs_xe_utils_commonjs
10994
10999
  * 更新数据列的 Map
10995
11000
  * 牺牲数据组装的耗时,用来换取使用过程中的流畅
10996
11001
  */const cacheColumnMap=()=>{const{tableFullColumn,collectColumn}=internalData;const fullColumnIdData=internalData.fullColumnIdData={};const fullColumnFieldData=internalData.fullColumnFieldData={};const mouseOpts=computeMouseOpts.value;const expandOpts=computeExpandOpts.value;const columnOpts=computeColumnOpts.value;const columnDragOpts=computeColumnDragOpts.value;const virtualYOpts=computeVirtualYOpts.value;const{isCrossDrag,isSelfToChildDrag}=columnDragOpts;const customOpts=computeCustomOpts.value;const{storage}=customOpts;const rowOpts=computeRowOpts.value;const isGroup=collectColumn.some(hasChildrenList);let isAllOverflow=!!props.showOverflow;let rowGroupColumn;let expandColumn;let treeNodeColumn;let checkboxColumn;let radioColumn;let htmlColumn;let hasFixed;const handleFunc=(column,index,items,path,parentColumn)=>{const{id:colid,field,fixed,type,treeNode,rowGroupNode}=column;const rest={$index:-1,_index:-1,column,colid,index,items,parent:parentColumn||null,width:0,oLeft:0};if(field){if(fullColumnFieldData[field]){errLog('vxe.error.colRepet',['field',field]);}fullColumnFieldData[field]=rest;}else{if(storage&&!type||columnOpts.drag&&(isCrossDrag||isSelfToChildDrag)){errLog('vxe.error.reqProp',[`${column.getTitle()||type||''} -> column.field=?`]);}}if(!hasFixed&&fixed){hasFixed=fixed;}if(!htmlColumn&&type==='html'){htmlColumn=column;}if(treeNode){if(treeNodeColumn){warnLog('vxe.error.colRepet',['tree-node',treeNode]);}if(!treeNodeColumn){treeNodeColumn=column;}}if(rowGroupNode){if(treeNodeColumn){warnLog('vxe.error.colRepet',['row-group-node',rowGroupNode]);}if(!rowGroupColumn){rowGroupColumn=column;}}if(type==='expand'){if(expandColumn){warnLog('vxe.error.colRepet',['type',type]);}if(!expandColumn){expandColumn=column;}}if(type==='checkbox'){if(checkboxColumn){warnLog('vxe.error.colRepet',['type',type]);}if(!checkboxColumn){checkboxColumn=column;}}else if(type==='radio'){if(radioColumn){warnLog('vxe.error.colRepet',['type',type]);}if(!radioColumn){radioColumn=column;}}if(isAllOverflow&&column.showOverflow===false){isAllOverflow=false;}if(fullColumnIdData[colid]){errLog('vxe.error.colRepet',['colId',colid]);}fullColumnIdData[colid]=rest;};if(isGroup){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn,(column,index,items,path,parentColumn,nodes)=>{column.level=nodes.length;handleFunc(column,index,items,path,parentColumn);});}else{tableFullColumn.forEach(handleFunc);}if(expandColumn&&expandOpts.mode!=='fixed'&&virtualYOpts.enabled){warnLog('vxe.error.notConflictProp',['column.type="expand','virtual-y-config.enabled=false']);}if(expandColumn&&expandOpts.mode!=='fixed'&&mouseOpts.area){errLog('vxe.error.errConflicts',['mouse-config.area','column.type=expand']);}if(htmlColumn){if(!columnOpts.useKey){errLog('vxe.error.reqProp',['column-config.useKey & column.type=html']);}if(!rowOpts.useKey){errLog('vxe.error.reqProp',['row-config.useKey & column.type=html']);}}reactData.isGroup=isGroup;reactData.rowGroupColumn=rowGroupColumn;reactData.treeNodeColumn=treeNodeColumn;reactData.expandColumn=expandColumn;reactData.isAllOverflow=isAllOverflow;};const updateHeight=()=>{internalData.customHeight=calcTableHeight('height');internalData.customMinHeight=calcTableHeight('minHeight');internalData.customMaxHeight=calcTableHeight('maxHeight');// 如果启用虚拟滚动,默认高度
10997
- if(reactData.scrollYLoad&&!(internalData.customHeight||internalData.customMinHeight)){internalData.customHeight=300;}};const calcColumnAutoWidth=(column,wrapperEl)=>{const cellElemList=wrapperEl.querySelectorAll(`.vxe-cell--wrapper[colid="${column.id}"]`);let leftRightPadding=0;const firstCellEl=cellElemList[0];if(firstCellEl&&firstCellEl.parentElement){const cellStyle=getComputedStyle(firstCellEl.parentElement);leftRightPadding=Math.ceil(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingLeft)+external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingRight));}let colWidth=column.renderAutoWidth-leftRightPadding;for(let i=0;i<cellElemList.length;i++){const celEl=cellElemList[i];colWidth=Math.max(colWidth,celEl?Math.ceil(celEl.scrollWidth)+4:0);}return colWidth+leftRightPadding;};const calcCellWidth=()=>{const autoWidthColumnList=computeAutoWidthColumnList.value;const{fullColumnIdData}=internalData;const el=refElem.value;if(el){el.setAttribute('data-calc-col','Y');autoWidthColumnList.forEach(column=>{const colid=column.id;const colRest=fullColumnIdData[colid];const colWidth=calcColumnAutoWidth(column,el);if(colRest){colRest.width=Math.max(colWidth,colRest.width);}column.renderAutoWidth=colWidth;});$xeTable.analyColumnWidth();el.removeAttribute('data-calc-col');}};/**
11002
+ if(reactData.scrollYLoad&&!(internalData.customHeight||internalData.customMinHeight)){internalData.customHeight=300;}};const calcColumnAutoWidth=(column,wrapperEl)=>{const columnOpts=computeColumnOpts.value;const{autoOptions}=columnOpts;const{isCalcHeader,isCalcBody,isCalcFooter}=autoOptions||{};const querySelections=[];if(isCalcHeader){querySelections.push(`.vxe-header-cell--wrapper[colid="${column.id}"]`);}if(isCalcBody){querySelections.push(`.vxe-body-cell--wrapper[colid="${column.id}"]`);}if(isCalcFooter){querySelections.push(`.vxe-footer-cell--wrapper[colid="${column.id}"]`);}const cellElemList=querySelections.length?wrapperEl.querySelectorAll(querySelections.join(',')):[];let leftRightPadding=0;const firstCellEl=cellElemList[0];if(firstCellEl&&firstCellEl.parentElement){const cellStyle=getComputedStyle(firstCellEl.parentElement);leftRightPadding=Math.ceil(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingLeft)+external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingRight));}let colWidth=column.renderAutoWidth-leftRightPadding;for(let i=0;i<cellElemList.length;i++){const celEl=cellElemList[i];colWidth=Math.max(colWidth,celEl?Math.ceil(celEl.scrollWidth)+4:0);}return colWidth+leftRightPadding;};const calcCellWidth=()=>{const autoWidthColumnList=computeAutoWidthColumnList.value;const{fullColumnIdData}=internalData;const el=refElem.value;if(el){el.setAttribute('data-calc-col','Y');autoWidthColumnList.forEach(column=>{const colid=column.id;const colRest=fullColumnIdData[colid];const colWidth=calcColumnAutoWidth(column,el);if(colRest){colRest.width=Math.max(colWidth,colRest.width);}column.renderAutoWidth=colWidth;});$xeTable.analyColumnWidth();el.removeAttribute('data-calc-col');}};/**
10998
11003
  * 列宽算法,计算单元格列宽,动态分配可用剩余空间
10999
11004
  * 支持 px、%、固定 混合分配
11000
11005
  * 支持动态列表调整分配
@@ -15310,10 +15315,15 @@ edit_hook_hooks.add('tableEditModule', {
15310
15315
  }
15311
15316
  });
15312
15317
  };
15318
+ // const insertGroupRow = (newRecords: any[], isAppend: boolean) => {
15319
+ // }
15313
15320
  const handleInsertRowAt = (records, targetRow, isInsertNextRow) => {
15314
15321
  const {
15315
15322
  treeConfig
15316
15323
  } = props;
15324
+ const {
15325
+ isRowGroupStatus
15326
+ } = reactData;
15317
15327
  const {
15318
15328
  tableFullTreeData,
15319
15329
  afterFullData,
@@ -15341,6 +15351,13 @@ edit_hook_hooks.add('tableEditModule', {
15341
15351
  // 如果为虚拟树
15342
15352
  if (treeConfig && transform) {
15343
15353
  insertTreeRow(newRecords, false);
15354
+ } else if (isRowGroupStatus) {
15355
+ // 如果分组
15356
+ if (treeConfig) {
15357
+ throw new Error(hook_getI18n('vxe.error.noTree', ['insert']));
15358
+ }
15359
+ warnLog(hook_getI18n('vxe.error.noGroup', ['remove']));
15360
+ // insertGroupRow(newRecords, false)
15344
15361
  } else {
15345
15362
  newRecords.forEach(item => {
15346
15363
  const rowid = getRowid($xeTable, item);
@@ -15380,6 +15397,13 @@ edit_hook_hooks.add('tableEditModule', {
15380
15397
  // 如果为虚拟树
15381
15398
  if (treeConfig && transform) {
15382
15399
  insertTreeRow(newRecords, true);
15400
+ } else if (isRowGroupStatus) {
15401
+ // 如果分组
15402
+ if (treeConfig) {
15403
+ throw new Error(hook_getI18n('vxe.error.noTree', ['insert']));
15404
+ }
15405
+ warnLog(hook_getI18n('vxe.error.noGroup', ['remove']));
15406
+ // insertGroupRow(newRecords, true)
15383
15407
  } else {
15384
15408
  newRecords.forEach(item => {
15385
15409
  const rowid = getRowid($xeTable, item);
@@ -15480,6 +15504,12 @@ edit_hook_hooks.add('tableEditModule', {
15480
15504
  warnLog('vxe.error.unableInsert');
15481
15505
  insertTreeRow(newRecords, true);
15482
15506
  }
15507
+ } else if (isRowGroupStatus) {
15508
+ // 如果分组
15509
+ if (treeConfig) {
15510
+ throw new Error(hook_getI18n('vxe.error.noTree', ['insert']));
15511
+ }
15512
+ warnLog(hook_getI18n('vxe.error.noGroup', ['remove']));
15483
15513
  } else {
15484
15514
  if (treeConfig) {
15485
15515
  throw new Error(hook_getI18n('vxe.error.noTree', ['insert']));
@@ -15814,7 +15844,8 @@ edit_hook_hooks.add('tableEditModule', {
15814
15844
  treeConfig
15815
15845
  } = props;
15816
15846
  const {
15817
- editStore
15847
+ editStore,
15848
+ isRowGroupStatus
15818
15849
  } = reactData;
15819
15850
  const {
15820
15851
  tableFullTreeData,
@@ -15891,6 +15922,9 @@ edit_hook_hooks.add('tableEditModule', {
15891
15922
  afterFullData.splice(afIndex, 1);
15892
15923
  }
15893
15924
  });
15925
+ } else if (isRowGroupStatus) {
15926
+ // 如果分组
15927
+ warnLog(hook_getI18n('vxe.error.noGroup', ['remove']));
15894
15928
  } else {
15895
15929
  rows.forEach(row => {
15896
15930
  const tfIndex = $xeTable.findRowIndexOf(tableFullData, row);
@@ -21346,6 +21380,7 @@ const Toolbar = VxeToolbar;
21346
21380
  notCommands: '全局指令 "{0}" 不存在',
21347
21381
  notSlot: '插槽 "{0}" 不存在',
21348
21382
  noTree: '树结构不支持 "{0}"',
21383
+ noGroup: '数据分组后不支持 "{0}"',
21349
21384
  notProp: '不支持的参数 "{0}"',
21350
21385
  checkProp: '当数据量过大时可能会导致复选框卡顿,建议设置参数 "{0}" 提升渲染速度',
21351
21386
  coverProp: '"{0}" 的参数 "{1}" 重复定义,这可能会出现错误',