vxe-table 4.7.9 → 4.7.11

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 (57) hide show
  1. package/es/locale/lang/en-US.js +1 -1
  2. package/es/locale/lang/es-ES.js +1 -1
  3. package/es/locale/lang/ja-JP.js +1 -1
  4. package/es/locale/lang/pt-BR.js +1 -1
  5. package/es/locale/lang/zh-CN.js +1 -1
  6. package/es/locale/lang/zh-TC.js +1 -1
  7. package/es/table/module/custom/panel.js +12 -22
  8. package/es/table/src/header.js +1 -1
  9. package/es/table/src/table.js +117 -252
  10. package/es/ui/index.js +2 -2
  11. package/es/ui/src/log.js +1 -1
  12. package/lib/index.umd.js +142 -323
  13. package/lib/index.umd.min.js +1 -1
  14. package/lib/locale/lang/en-US.js +1 -1
  15. package/lib/locale/lang/en-US.min.js +1 -1
  16. package/lib/locale/lang/en-US.umd.js +1 -1
  17. package/lib/locale/lang/es-ES.js +1 -1
  18. package/lib/locale/lang/es-ES.min.js +1 -1
  19. package/lib/locale/lang/es-ES.umd.js +1 -1
  20. package/lib/locale/lang/ja-JP.js +1 -1
  21. package/lib/locale/lang/ja-JP.min.js +1 -1
  22. package/lib/locale/lang/ja-JP.umd.js +1 -1
  23. package/lib/locale/lang/pt-BR.js +1 -1
  24. package/lib/locale/lang/pt-BR.min.js +1 -1
  25. package/lib/locale/lang/pt-BR.umd.js +1 -1
  26. package/lib/locale/lang/zh-CN.js +1 -1
  27. package/lib/locale/lang/zh-CN.min.js +1 -1
  28. package/lib/locale/lang/zh-CN.umd.js +1 -1
  29. package/lib/locale/lang/zh-HK.min.js +1 -1
  30. package/lib/locale/lang/zh-HK.umd.js +1 -1
  31. package/lib/locale/lang/zh-MO.min.js +1 -1
  32. package/lib/locale/lang/zh-MO.umd.js +1 -1
  33. package/lib/locale/lang/zh-TC.js +1 -1
  34. package/lib/locale/lang/zh-TC.min.js +1 -1
  35. package/lib/locale/lang/zh-TC.umd.js +1 -1
  36. package/lib/locale/lang/zh-TW.min.js +1 -1
  37. package/lib/locale/lang/zh-TW.umd.js +1 -1
  38. package/lib/table/module/custom/panel.js +11 -26
  39. package/lib/table/module/custom/panel.min.js +1 -1
  40. package/lib/table/src/header.js +1 -1
  41. package/lib/table/src/header.min.js +1 -1
  42. package/lib/table/src/table.js +129 -294
  43. package/lib/table/src/table.min.js +1 -1
  44. package/lib/ui/index.js +2 -2
  45. package/lib/ui/index.min.js +1 -1
  46. package/lib/ui/src/log.js +1 -1
  47. package/lib/ui/src/log.min.js +1 -1
  48. package/package.json +2 -2
  49. package/packages/locale/lang/en-US.ts +1 -1
  50. package/packages/locale/lang/es-ES.ts +1 -1
  51. package/packages/locale/lang/ja-JP.ts +1 -1
  52. package/packages/locale/lang/pt-BR.ts +1 -1
  53. package/packages/locale/lang/zh-CN.ts +1 -1
  54. package/packages/locale/lang/zh-TC.ts +1 -1
  55. package/packages/table/module/custom/panel.ts +12 -23
  56. package/packages/table/src/header.ts +1 -1
  57. package/packages/table/src/table.ts +116 -257
@@ -49,7 +49,7 @@ export default {
49
49
  table: {
50
50
  emptyText: 'No Data',
51
51
  allTitle: 'Select all / cancel',
52
- seqTitle: '#',
52
+ seqTitle: 'S/N',
53
53
  confirmFilter: 'Confirm',
54
54
  resetFilter: 'Reset',
55
55
  allFilter: 'All',
@@ -49,7 +49,7 @@ export default {
49
49
  table: {
50
50
  emptyText: 'No hay datos',
51
51
  allTitle: 'Seleccionar todo / cancelar',
52
- seqTitle: '#',
52
+ seqTitle: 'S/N',
53
53
  confirmFilter: 'Confirmar',
54
54
  resetFilter: 'Restablecer',
55
55
  allFilter: 'Todo',
@@ -49,7 +49,7 @@ export default {
49
49
  table: {
50
50
  emptyText: 'データがありません',
51
51
  allTitle: '全て選択/取消',
52
- seqTitle: '#',
52
+ seqTitle: 'S/N',
53
53
  confirmFilter: 'OK',
54
54
  resetFilter: 'リセット',
55
55
  allFilter: '全て',
@@ -49,7 +49,7 @@ export default {
49
49
  table: {
50
50
  emptyText: 'Sem dados',
51
51
  allTitle: 'Selecionar todos / cancelar',
52
- seqTitle: '#',
52
+ seqTitle: 'S/N',
53
53
  confirmFilter: 'Confirmar',
54
54
  resetFilter: 'Redefinir',
55
55
  allFilter: 'Todos',
@@ -49,7 +49,7 @@ export default {
49
49
  table: {
50
50
  emptyText: '暂无数据',
51
51
  allTitle: '全选/取消',
52
- seqTitle: '#',
52
+ seqTitle: '序号',
53
53
  confirmFilter: '筛选',
54
54
  resetFilter: '重置',
55
55
  allFilter: '全部',
@@ -49,7 +49,7 @@ export default {
49
49
  table: {
50
50
  emptyText: '暫無資料',
51
51
  allTitle: '全選/取消',
52
- seqTitle: '#',
52
+ seqTitle: '序號',
53
53
  confirmFilter: '篩選',
54
54
  resetFilter: '重置',
55
55
  allFilter: '全部',
@@ -14,7 +14,7 @@ export default defineComponent({
14
14
  },
15
15
  setup(props) {
16
16
  const $xeTable = inject('$xeTable', {});
17
- const { props: tableProps, reactData } = $xeTable;
17
+ const { reactData } = $xeTable;
18
18
  const { computeCustomOpts, computeColumnOpts, computeIsMaxFixedColumn } = $xeTable.getComputeMaps();
19
19
  const refElem = ref();
20
20
  const bodyElemRef = ref();
@@ -35,18 +35,6 @@ export default defineComponent({
35
35
  }
36
36
  }, 300);
37
37
  };
38
- const handleSaveStore = (type) => {
39
- const { id } = tableProps;
40
- const customOpts = computeCustomOpts.value;
41
- const { storage, updateStore } = customOpts;
42
- if (storage && id && updateStore) {
43
- updateStore({
44
- id,
45
- type,
46
- storeData: $xeTable.getCustomStoreData()
47
- });
48
- }
49
- };
50
38
  const confirmCustomEvent = (evnt) => {
51
39
  const { customColumnList } = reactData;
52
40
  const customOpts = computeCustomOpts.value;
@@ -65,6 +53,7 @@ export default defineComponent({
65
53
  if (column.renderVisible && (!column.children || column.children.length)) {
66
54
  if (column.renderResizeWidth !== column.renderWidth) {
67
55
  column.resizeWidth = column.renderResizeWidth;
56
+ column.renderWidth = column.renderResizeWidth;
68
57
  }
69
58
  }
70
59
  }
@@ -74,7 +63,7 @@ export default defineComponent({
74
63
  });
75
64
  $xeTable.closeCustom();
76
65
  $xeTable.emitCustomEvent('confirm', evnt);
77
- handleSaveStore('confirm');
66
+ $xeTable.saveCustomStore('confirm');
78
67
  };
79
68
  const cancelCustomEvent = (evnt) => {
80
69
  const { customStore } = props;
@@ -108,7 +97,6 @@ export default defineComponent({
108
97
  $xeTable.resetColumn(true);
109
98
  $xeTable.closeCustom();
110
99
  $xeTable.emitCustomEvent('reset', evnt);
111
- handleSaveStore('reset');
112
100
  };
113
101
  const resetCustomEvent = (evnt) => {
114
102
  if (VxeUI.modal) {
@@ -148,6 +136,7 @@ export default defineComponent({
148
136
  handleOptionCheck(column);
149
137
  if (customOpts.immediate) {
150
138
  $xeTable.handleCustom();
139
+ $xeTable.saveCustomStore('update:visible');
151
140
  }
152
141
  $xeTable.checkCustomStatus();
153
142
  };
@@ -464,8 +453,9 @@ export default defineComponent({
464
453
  const { customStore } = props;
465
454
  const { customColumnList } = reactData;
466
455
  const customOpts = computeCustomOpts.value;
467
- const { allowVisible, allowSort, allowFixed, allowResizable, checkMethod, visibleMethod } = customOpts;
456
+ const { modalOptions, allowVisible, allowSort, allowFixed, allowResizable, checkMethod, visibleMethod } = customOpts;
468
457
  const columnOpts = computeColumnOpts.value;
458
+ const modalOpts = Object.assign({}, modalOptions);
469
459
  const isMaxFixedColumn = computeIsMaxFixedColumn.value;
470
460
  const trVNs = [];
471
461
  XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
@@ -582,13 +572,13 @@ export default defineComponent({
582
572
  const isAllIndeterminate = customStore.isIndeterminate;
583
573
  return h(resolveComponent('vxe-modal'), {
584
574
  key: 'popup',
585
- className: 'vxe-table-custom-popup-wrapper vxe-table--ignore-clear',
575
+ className: ['vxe-table-custom-popup-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
586
576
  modelValue: customStore.visible,
587
- title: getI18n('vxe.custom.cstmTitle'),
588
- width: 700,
589
- minWidth: 700,
590
- height: 400,
591
- minHeight: 400,
577
+ title: modalOpts.title || getI18n('vxe.custom.cstmTitle'),
578
+ width: modalOpts.width || '50vw',
579
+ minWidth: modalOpts.minWidth || 700,
580
+ height: modalOpts.height || '50vh',
581
+ minHeight: modalOpts.minHeight || 400,
592
582
  mask: true,
593
583
  lockView: true,
594
584
  showFooter: true,
@@ -107,7 +107,7 @@ export default defineComponent({
107
107
  tableInternalData._lastResizeTime = Date.now();
108
108
  $xeTable.analyColumnWidth();
109
109
  $xeTable.recalculate(true).then(() => {
110
- $xeTable.saveCustomResizable();
110
+ $xeTable.saveCustomStore('update:visible');
111
111
  $xeTable.updateCellAreas();
112
112
  $xeTable.dispatchEvent('resizable-change', Object.assign(Object.assign({}, params), { resizeWidth }), evnt);
113
113
  });