vxe-table 4.7.60 → 4.7.62

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 (55) hide show
  1. package/README.en.md +1 -1
  2. package/README.ja-JP.md +184 -0
  3. package/README.md +1 -1
  4. package/README.zh-TW.md +3 -3
  5. package/es/style.css +1 -1
  6. package/es/style.min.css +1 -1
  7. package/es/table/module/menu/panel.js +3 -3
  8. package/es/table/src/footer.js +1 -1
  9. package/es/table/src/header.js +1 -1
  10. package/es/table/src/props.js +1 -1
  11. package/es/table/src/table.js +47 -32
  12. package/es/table/style.css +542 -0
  13. package/es/table/style.min.css +1 -1
  14. package/es/toolbar/src/toolbar.js +1 -0
  15. package/es/ui/index.js +2 -2
  16. package/es/ui/src/log.js +1 -1
  17. package/es/vxe-table/style.css +542 -0
  18. package/es/vxe-table/style.min.css +1 -1
  19. package/lib/index.umd.js +50 -31
  20. package/lib/index.umd.min.js +1 -1
  21. package/lib/style.css +1 -1
  22. package/lib/style.min.css +1 -1
  23. package/lib/table/module/menu/panel.js +3 -3
  24. package/lib/table/src/footer.js +1 -1
  25. package/lib/table/src/footer.min.js +1 -1
  26. package/lib/table/src/header.js +1 -1
  27. package/lib/table/src/header.min.js +1 -1
  28. package/lib/table/src/props.js +1 -1
  29. package/lib/table/src/props.min.js +1 -1
  30. package/lib/table/src/table.js +40 -22
  31. package/lib/table/src/table.min.js +1 -1
  32. package/lib/table/style/style.css +542 -0
  33. package/lib/table/style/style.min.css +1 -1
  34. package/lib/toolbar/src/toolbar.js +1 -0
  35. package/lib/toolbar/src/toolbar.min.js +1 -1
  36. package/lib/ui/index.js +2 -2
  37. package/lib/ui/index.min.js +1 -1
  38. package/lib/ui/src/log.js +1 -1
  39. package/lib/ui/src/log.min.js +1 -1
  40. package/lib/vxe-table/style/style.css +542 -0
  41. package/lib/vxe-table/style/style.min.css +1 -1
  42. package/package.json +2 -2
  43. package/packages/table/module/menu/panel.ts +3 -3
  44. package/packages/table/src/footer.ts +1 -1
  45. package/packages/table/src/header.ts +1 -1
  46. package/packages/table/src/props.ts +1 -1
  47. package/packages/table/src/table.ts +52 -36
  48. package/packages/toolbar/src/toolbar.ts +1 -0
  49. package/styles/components/icon.scss +2 -0
  50. /package/es/{iconfont.1722698239691.ttf → iconfont.1723041277531.ttf} +0 -0
  51. /package/es/{iconfont.1722698239691.woff → iconfont.1723041277531.woff} +0 -0
  52. /package/es/{iconfont.1722698239691.woff2 → iconfont.1723041277531.woff2} +0 -0
  53. /package/lib/{iconfont.1722698239691.ttf → iconfont.1723041277531.ttf} +0 -0
  54. /package/lib/{iconfont.1722698239691.woff → iconfont.1723041277531.woff} +0 -0
  55. /package/lib/{iconfont.1722698239691.woff2 → iconfont.1723041277531.woff2} +0 -0
@@ -369,6 +369,21 @@ var _default = exports.default = (0, _vue.defineComponent)({
369
369
  const refEmptyPlaceholder = (0, _vue.ref)();
370
370
  const $xeGrid = (0, _vue.inject)('$xeGrid', null);
371
371
  let $xeToolbar;
372
+ const computeTableId = (0, _vue.computed)(() => {
373
+ const {
374
+ id
375
+ } = props;
376
+ if (id) {
377
+ if (_xeUtils.default.isFunction(id)) {
378
+ return `${id({
379
+ $table: $xeTable,
380
+ $grid: $xeGrid
381
+ }) || ''}`;
382
+ }
383
+ return `${id}`;
384
+ }
385
+ return '';
386
+ });
372
387
  const computeValidOpts = (0, _vue.computed)(() => {
373
388
  return Object.assign({}, getConfig().table.validConfig, props.validConfig);
374
389
  });
@@ -609,6 +624,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
609
624
  };
610
625
  const computeMaps = {
611
626
  computeSize,
627
+ computeTableId,
612
628
  computeValidOpts,
613
629
  computeSXOpts,
614
630
  computeSYOpts,
@@ -969,9 +985,9 @@ var _default = exports.default = (0, _vue.defineComponent)({
969
985
  */
970
986
  const restoreCustomStorage = () => {
971
987
  const {
972
- id,
973
988
  customConfig
974
989
  } = props;
990
+ const tableId = computeTableId.value;
975
991
  const customOpts = computeCustomOpts.value;
976
992
  const {
977
993
  storage,
@@ -984,14 +1000,14 @@ var _default = exports.default = (0, _vue.defineComponent)({
984
1000
  const isCustomFixed = isAllCustom || storageOpts.fixed;
985
1001
  const isCustomSort = isAllCustom || storageOpts.sort;
986
1002
  if (customConfig && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
987
- if (!id) {
1003
+ if (!tableId) {
988
1004
  (0, _log.errLog)('vxe.error.reqProp', ['id']);
989
1005
  return;
990
1006
  }
991
- const storeData = getCustomStorageMap(id);
1007
+ const storeData = getCustomStorageMap(tableId);
992
1008
  if (restoreStore) {
993
1009
  return Promise.resolve(restoreStore({
994
- id,
1010
+ id: tableId,
995
1011
  type: 'restore',
996
1012
  storeData
997
1013
  })).then(storeData => {
@@ -5545,9 +5561,9 @@ var _default = exports.default = (0, _vue.defineComponent)({
5545
5561
  $xeTable.clearSelected();
5546
5562
  }
5547
5563
  if (areaOpts.autoClear) {
5548
- if ($xeTable.clearCellAreas) {
5564
+ if ($xeTable.getCellAreas) {
5549
5565
  const cellAreas = $xeTable.getCellAreas();
5550
- if (cellAreas.length && !(0, _dom.getEventTargetNode)(evnt, document.body, 'vxe-table--ignore-areas-clear').flag) {
5566
+ if (cellAreas && cellAreas.length && !(0, _dom.getEventTargetNode)(evnt, document.body, 'vxe-table--ignore-areas-clear').flag) {
5551
5567
  tablePrivateMethods.preventEvent(evnt, 'event.clearAreas', {}, () => {
5552
5568
  $xeTable.clearCellAreas();
5553
5569
  $xeTable.clearCopyCellArea();
@@ -6340,9 +6356,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
6340
6356
  });
6341
6357
  },
6342
6358
  saveCustomStore(type) {
6343
- const {
6344
- id
6345
- } = props;
6359
+ const tableId = computeTableId.value;
6346
6360
  const customOpts = computeCustomOpts.value;
6347
6361
  const {
6348
6362
  updateStore,
@@ -6355,7 +6369,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
6355
6369
  const isCustomFixed = isAllCustom || storageOpts.fixed;
6356
6370
  const isCustomSort = isAllCustom || storageOpts.sort;
6357
6371
  if (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort) {
6358
- if (!id) {
6372
+ if (!tableId) {
6359
6373
  (0, _log.errLog)('vxe.error.reqProp', ['id']);
6360
6374
  return (0, _vue.nextTick)();
6361
6375
  }
@@ -6367,12 +6381,12 @@ var _default = exports.default = (0, _vue.defineComponent)({
6367
6381
  } : tableMethods.getCustomStoreData();
6368
6382
  if (updateStore) {
6369
6383
  return updateStore({
6370
- id,
6384
+ id: tableId,
6371
6385
  type,
6372
6386
  storeData
6373
6387
  });
6374
6388
  } else {
6375
- setCustomStorageMap(id, type === 'reset' ? null : storeData);
6389
+ setCustomStorageMap(tableId, type === 'reset' ? null : storeData);
6376
6390
  }
6377
6391
  }
6378
6392
  return (0, _vue.nextTick)();
@@ -8165,29 +8179,33 @@ var _default = exports.default = (0, _vue.defineComponent)({
8165
8179
  isMenu ? (0, _vue.h)(_panel3.default, {
8166
8180
  ref: refTableMenu
8167
8181
  }) : (0, _vue.createCommentVNode)(),
8182
+ /**
8183
+ * 提示相关
8184
+ */
8185
+ VxeUITooltipComponent ? (0, _vue.h)('div', {}, [
8168
8186
  /**
8169
8187
  * 通用提示
8170
8188
  */
8171
- VxeUITooltipComponent ? (0, _vue.h)(VxeUITooltipComponent, {
8189
+ (0, _vue.h)(VxeUITooltipComponent, {
8172
8190
  ref: refCommTooltip,
8173
8191
  isArrow: false,
8174
8192
  enterable: false
8175
- }) : (0, _vue.createCommentVNode)(),
8193
+ }),
8176
8194
  /**
8177
- * 工具提示
8178
- */
8179
- VxeUITooltipComponent ? (0, _vue.h)(VxeUITooltipComponent, Object.assign({
8195
+ * 工具提示
8196
+ */
8197
+ (0, _vue.h)(VxeUITooltipComponent, Object.assign({
8180
8198
  ref: refTooltip
8181
- }, tipConfig, tooltipStore.currOpts)) : (0, _vue.createCommentVNode)(),
8199
+ }, tipConfig, tooltipStore.currOpts)),
8182
8200
  /**
8183
- * 校验提示
8184
- */
8185
- VxeUITooltipComponent && props.editRules && validOpts.showMessage && (validOpts.message === 'default' ? !height : validOpts.message === 'tooltip') ? (0, _vue.h)(VxeUITooltipComponent, Object.assign({
8201
+ * 校验提示
8202
+ */
8203
+ props.editRules && validOpts.showMessage && (validOpts.message === 'default' ? !height : validOpts.message === 'tooltip') ? (0, _vue.h)(VxeUITooltipComponent, Object.assign({
8186
8204
  ref: refValidTooltip,
8187
8205
  class: [{
8188
8206
  'old-cell-valid': editRules && getConfig().cellVaildMode === 'obsolete'
8189
8207
  }, 'vxe-table--valid-error']
8190
- }, validOpts.message === 'tooltip' || tableData.length === 1 ? validTipOpts : {})) : (0, _vue.createCommentVNode)()]);
8208
+ }, validOpts.message === 'tooltip' || tableData.length === 1 ? validTipOpts : {})) : (0, _vue.createCommentVNode)()]) : (0, _vue.createCommentVNode)()]);
8191
8209
  };
8192
8210
  $xeTable.renderVN = renderVN;
8193
8211
  if (process.env.NODE_ENV === 'development') {