vxe-table 4.7.73 → 4.7.75

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 (124) hide show
  1. package/es/locale/lang/en-US.js +6 -1
  2. package/es/locale/lang/es-ES.js +6 -1
  3. package/es/locale/lang/hu-HU.js +6 -1
  4. package/es/locale/lang/ja-JP.js +6 -1
  5. package/es/locale/lang/ko-KR.js +6 -1
  6. package/es/locale/lang/pt-BR.js +6 -1
  7. package/es/locale/lang/ru-RU.js +6 -1
  8. package/es/locale/lang/vi-VN.js +6 -1
  9. package/es/locale/lang/zh-CN.js +6 -1
  10. package/es/locale/lang/zh-TC.js +6 -1
  11. package/es/style.css +1 -1
  12. package/es/style.min.css +1 -1
  13. package/es/table/index.js +5 -0
  14. package/es/table/module/custom/hook.js +1 -1
  15. package/es/table/module/custom/panel.js +19 -7
  16. package/es/table/module/edit/hook.js +8 -2
  17. package/es/table/module/keyboard/hook.js +1 -1
  18. package/es/table/module/validator/hook.js +1 -1
  19. package/es/table/src/body.js +1 -1
  20. package/es/table/src/cell.js +7 -5
  21. package/es/table/src/table.js +8 -8
  22. package/es/table/src/use/cell-view.js +34 -0
  23. package/es/table/src/use/index.js +1 -0
  24. package/es/table/style.css +5 -9
  25. package/es/table/style.min.css +1 -1
  26. package/es/ui/index.js +2 -2
  27. package/es/ui/src/log.js +1 -1
  28. package/es/vxe-table/style.css +5 -9
  29. package/es/vxe-table/style.min.css +1 -1
  30. package/lib/index.umd.js +115 -31
  31. package/lib/index.umd.min.js +1 -1
  32. package/lib/locale/lang/en-US.js +6 -1
  33. package/lib/locale/lang/en-US.min.js +1 -1
  34. package/lib/locale/lang/en-US.umd.js +6 -1
  35. package/lib/locale/lang/es-ES.js +6 -1
  36. package/lib/locale/lang/es-ES.min.js +1 -1
  37. package/lib/locale/lang/es-ES.umd.js +6 -1
  38. package/lib/locale/lang/hu-HU.js +6 -1
  39. package/lib/locale/lang/hu-HU.min.js +1 -1
  40. package/lib/locale/lang/ja-JP.js +6 -1
  41. package/lib/locale/lang/ja-JP.min.js +1 -1
  42. package/lib/locale/lang/ja-JP.umd.js +6 -1
  43. package/lib/locale/lang/ko-KR.js +6 -1
  44. package/lib/locale/lang/ko-KR.min.js +1 -1
  45. package/lib/locale/lang/pt-BR.js +6 -1
  46. package/lib/locale/lang/pt-BR.min.js +1 -1
  47. package/lib/locale/lang/pt-BR.umd.js +6 -1
  48. package/lib/locale/lang/ru-RU.js +6 -1
  49. package/lib/locale/lang/ru-RU.min.js +1 -1
  50. package/lib/locale/lang/vi-VN.js +6 -1
  51. package/lib/locale/lang/vi-VN.min.js +1 -1
  52. package/lib/locale/lang/zh-CN.js +6 -1
  53. package/lib/locale/lang/zh-CN.min.js +1 -1
  54. package/lib/locale/lang/zh-CN.umd.js +6 -1
  55. package/lib/locale/lang/zh-HK.min.js +1 -1
  56. package/lib/locale/lang/zh-HK.umd.js +6 -1
  57. package/lib/locale/lang/zh-MO.min.js +1 -1
  58. package/lib/locale/lang/zh-MO.umd.js +6 -1
  59. package/lib/locale/lang/zh-TC.js +6 -1
  60. package/lib/locale/lang/zh-TC.min.js +1 -1
  61. package/lib/locale/lang/zh-TC.umd.js +6 -1
  62. package/lib/locale/lang/zh-TW.min.js +1 -1
  63. package/lib/locale/lang/zh-TW.umd.js +6 -1
  64. package/lib/style.css +1 -1
  65. package/lib/style.min.css +1 -1
  66. package/lib/table/index.js +5 -0
  67. package/lib/table/index.min.js +1 -1
  68. package/lib/table/module/custom/hook.js +1 -1
  69. package/lib/table/module/custom/hook.min.js +1 -1
  70. package/lib/table/module/custom/panel.js +18 -7
  71. package/lib/table/module/custom/panel.min.js +1 -1
  72. package/lib/table/module/edit/hook.js +8 -2
  73. package/lib/table/module/edit/hook.min.js +1 -1
  74. package/lib/table/module/keyboard/hook.js +1 -1
  75. package/lib/table/module/keyboard/hook.min.js +1 -1
  76. package/lib/table/module/validator/hook.js +1 -1
  77. package/lib/table/module/validator/hook.min.js +1 -1
  78. package/lib/table/src/body.js +1 -0
  79. package/lib/table/src/body.min.js +1 -1
  80. package/lib/table/src/cell.js +10 -7
  81. package/lib/table/src/cell.min.js +1 -1
  82. package/lib/table/src/table.js +8 -8
  83. package/lib/table/src/table.min.js +1 -1
  84. package/lib/table/src/use/cell-view.js +57 -0
  85. package/lib/table/src/use/cell-view.min.js +1 -0
  86. package/lib/table/src/use/index.js +16 -0
  87. package/lib/table/src/use/index.min.js +1 -0
  88. package/lib/table/style/style.css +5 -9
  89. package/lib/table/style/style.min.css +1 -1
  90. package/lib/ui/index.js +2 -2
  91. package/lib/ui/index.min.js +1 -1
  92. package/lib/ui/src/log.js +1 -1
  93. package/lib/ui/src/log.min.js +1 -1
  94. package/lib/vxe-table/style/style.css +5 -9
  95. package/lib/vxe-table/style/style.min.css +1 -1
  96. package/package.json +2 -2
  97. package/packages/locale/lang/en-US.ts +6 -1
  98. package/packages/locale/lang/es-ES.ts +6 -1
  99. package/packages/locale/lang/hu-HU.ts +6 -1
  100. package/packages/locale/lang/ja-JP.ts +6 -1
  101. package/packages/locale/lang/ko-KR.ts +6 -1
  102. package/packages/locale/lang/pt-BR.ts +6 -1
  103. package/packages/locale/lang/ru-RU.ts +6 -1
  104. package/packages/locale/lang/vi-VN.ts +6 -1
  105. package/packages/locale/lang/zh-CN.ts +6 -1
  106. package/packages/locale/lang/zh-TC.ts +6 -1
  107. package/packages/table/index.ts +8 -0
  108. package/packages/table/module/custom/hook.ts +1 -1
  109. package/packages/table/module/custom/panel.ts +18 -7
  110. package/packages/table/module/edit/hook.ts +8 -2
  111. package/packages/table/module/keyboard/hook.ts +1 -1
  112. package/packages/table/module/validator/hook.ts +1 -1
  113. package/packages/table/src/body.ts +1 -1
  114. package/packages/table/src/cell.ts +7 -5
  115. package/packages/table/src/table.ts +8 -8
  116. package/packages/table/src/use/cell-view.ts +44 -0
  117. package/packages/table/src/use/index.ts +1 -0
  118. package/styles/components/table.scss +4 -9
  119. /package/es/{iconfont.1724892633863.ttf → iconfont.1725105214157.ttf} +0 -0
  120. /package/es/{iconfont.1724892633863.woff → iconfont.1725105214157.woff} +0 -0
  121. /package/es/{iconfont.1724892633863.woff2 → iconfont.1725105214157.woff2} +0 -0
  122. /package/lib/{iconfont.1724892633863.ttf → iconfont.1725105214157.ttf} +0 -0
  123. /package/lib/{iconfont.1724892633863.woff → iconfont.1725105214157.woff} +0 -0
  124. /package/lib/{iconfont.1724892633863.woff2 → iconfont.1725105214157.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -1976,9 +1976,9 @@ function eqEmptyValue(cellValue) {
1976
1976
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
1977
1977
 
1978
1978
 
1979
- const version = "4.7.73";
1979
+ const version = "4.7.75";
1980
1980
  core_.VxeUI.version = version;
1981
- core_.VxeUI.tableVersion = "4.7.73";
1981
+ core_.VxeUI.tableVersion = "4.7.75";
1982
1982
  core_.VxeUI.setConfig({
1983
1983
  emptyCell: ' ',
1984
1984
  table: {
@@ -2360,7 +2360,7 @@ var es_array_push = __webpack_require__(4114);
2360
2360
  const {
2361
2361
  log: log_log
2362
2362
  } = core_.VxeUI;
2363
- const log_version = `table v${"4.7.73"}`;
2363
+ const log_version = `table v${"4.7.75"}`;
2364
2364
  const warnLog = log_log.create('warn', log_version);
2365
2365
  const errLog = log_log.create('error', log_version);
2366
2366
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -4298,26 +4298,29 @@ const Cell = {
4298
4298
  const editSlot = slots ? slots.edit : null;
4299
4299
  const compConf = cell_renderer.get(editRender.name);
4300
4300
  const rtEdit = compConf ? compConf.renderTableEdit || compConf.renderEdit : null;
4301
+ const cellParams = Object.assign({
4302
+ $type: '',
4303
+ isEdit
4304
+ }, params);
4301
4305
  if (isEdit) {
4306
+ cellParams.$type = 'edit';
4302
4307
  if (editSlot) {
4303
- return $table.callSlot(editSlot, params);
4308
+ return $table.callSlot(editSlot, cellParams);
4304
4309
  }
4305
4310
  if (rtEdit) {
4306
- return getSlotVNs(rtEdit(editRender, Object.assign({
4307
- $type: 'edit'
4308
- }, params)));
4311
+ return getSlotVNs(rtEdit(editRender, cellParams));
4309
4312
  }
4310
4313
  return [];
4311
4314
  }
4312
4315
  if (defaultSlot) {
4313
- return $table.callSlot(defaultSlot, params);
4316
+ return $table.callSlot(defaultSlot, cellParams);
4314
4317
  }
4315
4318
  if (formatter) {
4316
4319
  return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
4317
4320
  class: 'vxe-cell--label'
4318
- }, getDefaultCellLabel(params))];
4321
+ }, getDefaultCellLabel(cellParams))];
4319
4322
  }
4320
- return Cell.renderDefaultCell(params);
4323
+ return Cell.renderDefaultCell(cellParams);
4321
4324
  }
4322
4325
  };
4323
4326
  /* harmony default export */ var cell = (Cell);
@@ -4781,6 +4784,7 @@ const lineOffsetSizes = {
4781
4784
  const params = {
4782
4785
  $table: $xeTable,
4783
4786
  $grid: $xeTable.xegrid,
4787
+ isEdit: false,
4784
4788
  seq,
4785
4789
  rowid,
4786
4790
  row,
@@ -6645,7 +6649,10 @@ const {
6645
6649
  allowResizable
6646
6650
  } = customOpts;
6647
6651
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parent) => {
6648
- if (!parent) {
6652
+ if (parent) {
6653
+ // 更新子列信息
6654
+ column.fixed = parent.fixed;
6655
+ } else {
6649
6656
  if (allowSort) {
6650
6657
  const sortIndex = index + 1;
6651
6658
  column.renderSortNumber = sortIndex;
@@ -6784,22 +6791,30 @@ const {
6784
6791
  const customOpts = computeCustomOpts.value;
6785
6792
  if (customOpts.immediate) {
6786
6793
  if (column.renderFixed === colFixed) {
6787
- column.fixed = '';
6788
- column.renderFixed = '';
6794
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
6795
+ col.fixed = '';
6796
+ col.renderFixed = '';
6797
+ });
6789
6798
  } else {
6790
6799
  if (!isMaxFixedColumn || column.renderFixed) {
6791
- column.fixed = colFixed;
6792
- column.renderFixed = colFixed;
6800
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
6801
+ col.fixed = colFixed;
6802
+ col.renderFixed = colFixed;
6803
+ });
6793
6804
  }
6794
6805
  }
6795
6806
  $xeTable.handleCustom();
6796
6807
  $xeTable.saveCustomStore('update:fixed');
6797
6808
  } else {
6798
6809
  if (column.renderFixed === colFixed) {
6799
- column.renderFixed = '';
6810
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
6811
+ col.renderFixed = '';
6812
+ });
6800
6813
  } else {
6801
6814
  if (!isMaxFixedColumn || column.renderFixed) {
6802
- column.renderFixed = colFixed;
6815
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
6816
+ col.renderFixed = colFixed;
6817
+ });
6803
6818
  }
6804
6819
  }
6805
6820
  }
@@ -10292,7 +10307,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
10292
10307
  */
10293
10308
  const handleChangeCell = (evnt, params) => {
10294
10309
  checkValidate('blur').catch(e => e).then(() => {
10295
- $xeTable.handleActived(params, evnt).then(() => checkValidate('change')).catch(e => e);
10310
+ $xeTable.handleEdit(params, evnt).then(() => checkValidate('change')).catch(e => e);
10296
10311
  });
10297
10312
  };
10298
10313
  const handleDefaultSort = () => {
@@ -12349,8 +12364,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
12349
12364
  * 将固定的列左边、右边分别靠边
12350
12365
  * 如果传 true 则会检查列顺序并排序
12351
12366
  */
12352
- refreshColumn(resiveOrder) {
12353
- if (resiveOrder) {
12367
+ refreshColumn(initOrder) {
12368
+ if (initOrder) {
12354
12369
  const columnList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(internalData.collectColumn, 'renderSortNumber');
12355
12370
  internalData.collectColumn = columnList;
12356
12371
  const tableFullColumn = getColumnList(columnList);
@@ -14103,7 +14118,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
14103
14118
  // 如果按下了 F2 键
14104
14119
  if (selected.row && selected.column) {
14105
14120
  evnt.preventDefault();
14106
- $xeTable.handleActived(selected.args, evnt);
14121
+ $xeTable.handleEdit(selected.args, evnt);
14107
14122
  }
14108
14123
  }
14109
14124
  } else if (isContextMenu) {
@@ -14222,7 +14237,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
14222
14237
  backMethod(params);
14223
14238
  } else {
14224
14239
  setCellValue(selected.row, selected.column, null);
14225
- $xeTable.handleActived(selected.args, evnt);
14240
+ $xeTable.handleEdit(selected.args, evnt);
14226
14241
  }
14227
14242
  $xeTable.dispatchEvent('cell-backspace-value', params, evnt);
14228
14243
  }
@@ -14274,7 +14289,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
14274
14289
  editMethod(params);
14275
14290
  } else {
14276
14291
  setCellValue(selected.row, selected.column, null);
14277
- $xeTable.handleActived(selected.args, evnt);
14292
+ $xeTable.handleEdit(selected.args, evnt);
14278
14293
  }
14279
14294
  const afterEditMethod = editOpts.afterEditMethod;
14280
14295
  if (afterEditMethod) {
@@ -15354,10 +15369,10 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
15354
15369
  if (!actived.args || evnt.currentTarget !== actived.args.cell) {
15355
15370
  if (editOpts.mode === 'row') {
15356
15371
  checkValidate('blur').catch(e => e).then(() => {
15357
- $xeTable.handleActived(params, evnt).then(() => checkValidate('change')).catch(e => e);
15372
+ $xeTable.handleEdit(params, evnt).then(() => checkValidate('change')).catch(e => e);
15358
15373
  });
15359
15374
  } else if (editOpts.mode === 'cell') {
15360
- $xeTable.handleActived(params, evnt).then(() => checkValidate('change')).catch(e => e);
15375
+ $xeTable.handleEdit(params, evnt).then(() => checkValidate('change')).catch(e => e);
15361
15376
  }
15362
15377
  }
15363
15378
  }
@@ -16596,6 +16611,59 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
16596
16611
  return this.renderVN();
16597
16612
  }
16598
16613
  }));
16614
+ ;// CONCATENATED MODULE: ./packages/table/src/use/cell-view.ts
16615
+
16616
+
16617
+ function useCellView(props) {
16618
+ const currColumn = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
16619
+ const {
16620
+ renderParams
16621
+ } = props;
16622
+ return renderParams.column;
16623
+ });
16624
+ const currRow = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
16625
+ const {
16626
+ renderParams
16627
+ } = props;
16628
+ return renderParams.row;
16629
+ });
16630
+ const cellOptions = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
16631
+ const {
16632
+ renderOpts
16633
+ } = props;
16634
+ return renderOpts.props || {};
16635
+ });
16636
+ const cellModel = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)({
16637
+ get() {
16638
+ const {
16639
+ renderParams
16640
+ } = props;
16641
+ const {
16642
+ row,
16643
+ column
16644
+ } = renderParams;
16645
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
16646
+ },
16647
+ set(value) {
16648
+ const {
16649
+ renderParams
16650
+ } = props;
16651
+ const {
16652
+ row,
16653
+ column
16654
+ } = renderParams;
16655
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, column.field, value);
16656
+ }
16657
+ });
16658
+ return {
16659
+ currColumn,
16660
+ currRow,
16661
+ cellModel,
16662
+ cellOptions
16663
+ };
16664
+ }
16665
+ ;// CONCATENATED MODULE: ./packages/table/src/use/index.ts
16666
+
16599
16667
  ;// CONCATENATED MODULE: ./packages/table/module/filter/hook.ts
16600
16668
 
16601
16669
 
@@ -18188,7 +18256,7 @@ edit_hook_hooks.add('tableEditModule', {
18188
18256
  return $xeTable.scrollToRow(row, column).then(() => {
18189
18257
  const cell = $xeTable.getCellElement(row, column);
18190
18258
  if (cell) {
18191
- editPrivateMethods.handleActived({
18259
+ editPrivateMethods.handleEdit({
18192
18260
  row,
18193
18261
  rowIndex: $xeTable.getRowIndex(row),
18194
18262
  column,
@@ -18233,7 +18301,7 @@ edit_hook_hooks.add('tableEditModule', {
18233
18301
  /**
18234
18302
  * 处理激活编辑
18235
18303
  */
18236
- handleActived(params, evnt) {
18304
+ handleEdit(params, evnt) {
18237
18305
  const {
18238
18306
  editConfig,
18239
18307
  mouseConfig
@@ -18359,6 +18427,12 @@ edit_hook_hooks.add('tableEditModule', {
18359
18427
  }
18360
18428
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
18361
18429
  },
18430
+ /**
18431
+ * @deprecated
18432
+ */
18433
+ handleActived(params, evnt) {
18434
+ return editPrivateMethods.handleEdit(params, evnt);
18435
+ },
18362
18436
  /**
18363
18437
  * 处理聚焦
18364
18438
  */
@@ -20471,7 +20545,7 @@ keyboard_hook_hooks.add('tableKeyboardModule', {
20471
20545
  if (editConfig) {
20472
20546
  if (editOpts.trigger === 'click' || editOpts.trigger === 'dblclick') {
20473
20547
  if (editOpts.mode === 'row') {
20474
- $xeTable.handleActived(params, evnt);
20548
+ $xeTable.handleEdit(params, evnt);
20475
20549
  } else {
20476
20550
  $xeTable.scrollToRow(params.row, params.column).then(() => $xeTable.handleSelected(params, evnt));
20477
20551
  }
@@ -20673,7 +20747,7 @@ validator_hook_hooks.add('tableValidatorModule', {
20673
20747
  $xeTable.dispatchEvent('valid-error', params, null);
20674
20748
  resolve();
20675
20749
  } else {
20676
- $xeTable.handleActived(params, {
20750
+ $xeTable.handleEdit(params, {
20677
20751
  type: 'valid-error',
20678
20752
  trigger: 'call'
20679
20753
  }).then(() => {
@@ -21214,7 +21288,7 @@ core_.VxeUI.hooks.add('tableCustomModule', {
21214
21288
  // 判断面板不能大于表格高度
21215
21289
  let tableHeight = 0;
21216
21290
  if (el) {
21217
- tableHeight = el.clientHeight - 30;
21291
+ tableHeight = el.clientHeight - 28;
21218
21292
  }
21219
21293
  customStore.maxHeight = Math.max(4, tableHeight);
21220
21294
  };
@@ -22321,15 +22395,20 @@ render_renderer.mixin({
22321
22395
 
22322
22396
 
22323
22397
 
22398
+
22324
22399
  const VxeTable = Object.assign({}, table, {
22325
22400
  install(app) {
22326
22401
  app.component(table.name, table);
22327
22402
  }
22328
22403
  });
22404
+ const tableHandle = {
22405
+ useCellView: useCellView
22406
+ };
22329
22407
  if (core_.VxeUI.dynamicApp) {
22330
22408
  core_.VxeUI.dynamicApp.component(table.name, table);
22331
22409
  }
22332
22410
  core_.VxeUI.component(table);
22411
+ core_.VxeUI.tableHandle = tableHandle;
22333
22412
  const Table = VxeTable;
22334
22413
  /* harmony default export */ var packages_table = (VxeTable);
22335
22414
  ;// CONCATENATED MODULE: ./packages/toolbar/src/toolbar.ts
@@ -24753,7 +24832,12 @@ const Grid = VxeGrid;
24753
24832
  uploadErr: '上传失败',
24754
24833
  uploadSuccess: '上传成功',
24755
24834
  moreBtnText: '更多({0})',
24756
- viewItemTitle: '点击查看'
24835
+ viewItemTitle: '点击查看',
24836
+ morePopup: {
24837
+ readTitle: '查看列表',
24838
+ imageTitle: '上传图片',
24839
+ fileTitle: '上传文件'
24840
+ }
24757
24841
  },
24758
24842
  formDesign: {
24759
24843
  formName: '表单名称',