vxe-table 4.22.3 → 4.22.5

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 (65) hide show
  1. package/dist/all.esm.js +80 -67
  2. package/dist/style.css +1 -1
  3. package/es/grid/src/grid.js +10 -5
  4. package/es/style.css +1 -1
  5. package/es/table/src/table.js +9 -1
  6. package/es/ui/index.js +1 -1
  7. package/es/ui/src/log.js +1 -1
  8. package/lib/grid/src/grid.js +13 -5
  9. package/lib/grid/src/grid.min.js +1 -1
  10. package/lib/index.common.js +2 -1
  11. package/lib/index.umd.js +1303 -1367
  12. package/lib/index.umd.min.js +1 -1
  13. package/lib/style.css +1 -1
  14. package/lib/table/src/table.js +2 -2
  15. package/lib/table/src/table.min.js +1 -1
  16. package/lib/ui/index.js +1 -1
  17. package/lib/ui/index.min.js +1 -1
  18. package/lib/ui/src/log.js +1 -1
  19. package/lib/ui/src/log.min.js +1 -1
  20. package/lib/v-x-e-table/index.js +2 -1
  21. package/lib/v-x-e-table/index.min.js +1 -1
  22. package/lib/vxe-colgroup/index.js +2 -1
  23. package/lib/vxe-colgroup/index.min.js +1 -1
  24. package/lib/vxe-column/index.js +2 -1
  25. package/lib/vxe-column/index.min.js +1 -1
  26. package/lib/vxe-grid/index.js +2 -1
  27. package/lib/vxe-grid/index.min.js +1 -1
  28. package/lib/vxe-table/index.js +2 -1
  29. package/lib/vxe-table/index.min.js +1 -1
  30. package/lib/vxe-toolbar/index.js +2 -1
  31. package/lib/vxe-toolbar/index.min.js +1 -1
  32. package/lib/vxe-ui/index.js +2 -1
  33. package/lib/vxe-ui/index.min.js +1 -1
  34. package/lib/vxe-v-x-e-table/index.js +2 -1
  35. package/lib/vxe-v-x-e-table/index.min.js +1 -1
  36. package/package.json +2 -2
  37. package/packages/grid/src/grid.ts +11 -5
  38. package/packages/locale/lang/ar-EG.ts +903 -903
  39. package/packages/locale/lang/de-DE.ts +903 -903
  40. package/packages/locale/lang/en-US.ts +903 -903
  41. package/packages/locale/lang/es-ES.ts +903 -903
  42. package/packages/locale/lang/fr-FR.ts +903 -903
  43. package/packages/locale/lang/hu-HU.ts +903 -903
  44. package/packages/locale/lang/hy-AM.ts +903 -903
  45. package/packages/locale/lang/id-ID.ts +903 -903
  46. package/packages/locale/lang/it-IT.ts +903 -903
  47. package/packages/locale/lang/ja-JP.ts +903 -903
  48. package/packages/locale/lang/ko-KR.ts +903 -903
  49. package/packages/locale/lang/ms-MY.ts +903 -903
  50. package/packages/locale/lang/nb-NO.ts +903 -903
  51. package/packages/locale/lang/pt-BR.ts +903 -903
  52. package/packages/locale/lang/ru-RU.ts +903 -903
  53. package/packages/locale/lang/th-TH.ts +903 -903
  54. package/packages/locale/lang/ug-CN.ts +903 -903
  55. package/packages/locale/lang/uk-UA.ts +903 -903
  56. package/packages/locale/lang/uz-UZ.ts +903 -903
  57. package/packages/locale/lang/vi-VN.ts +903 -903
  58. package/packages/locale/lang/zh-CHT.ts +903 -903
  59. package/packages/table/src/table.ts +16 -2
  60. /package/es/{iconfont.1790757600308.ttf → iconfont.1792229488793.ttf} +0 -0
  61. /package/es/{iconfont.1790757600308.woff → iconfont.1792229488793.woff} +0 -0
  62. /package/es/{iconfont.1790757600308.woff2 → iconfont.1792229488793.woff2} +0 -0
  63. /package/lib/{iconfont.1790757600308.ttf → iconfont.1792229488793.ttf} +0 -0
  64. /package/lib/{iconfont.1790757600308.woff → iconfont.1792229488793.woff} +0 -0
  65. /package/lib/{iconfont.1790757600308.woff2 → iconfont.1792229488793.woff2} +0 -0
package/dist/all.esm.js CHANGED
@@ -47,7 +47,7 @@ function getDefaultConfig(val1, def1) {
47
47
  return XEUtils.eqNull(val1) ? def1 : val1;
48
48
  }
49
49
 
50
- const version = "4.22.3";
50
+ const version = "4.22.5";
51
51
  VxeUI.version = version;
52
52
  VxeUI.tableVersion = version;
53
53
  VxeUI.setConfig({
@@ -931,7 +931,7 @@ function getPopupWrapperElement(panelElem) {
931
931
  }
932
932
 
933
933
  const { log } = VxeUI;
934
- const tableVersion = `table v${"4.22.3"}`;
934
+ const tableVersion = `table v${"4.22.5"}`;
935
935
  function createComponentLog(name) {
936
936
  const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
937
937
  const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
@@ -29172,6 +29172,14 @@ var VxeTableComponent = defineVxeComponent({
29172
29172
  $xeTable.updateScrollYSpace();
29173
29173
  });
29174
29174
  },
29175
+ handleSyncScrollTop(params) {
29176
+ const { scrollTop } = params;
29177
+ const { elemStore } = internalData;
29178
+ const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
29179
+ if (bodyScrollElem) {
29180
+ bodyScrollElem.scrollTop = scrollTop;
29181
+ }
29182
+ },
29175
29183
  /**
29176
29184
  * 处理固定列的显示状态
29177
29185
  */
@@ -30599,7 +30607,7 @@ var VxeTableComponent = defineVxeComponent({
30599
30607
  const parentEl = $xeTable.getParentElem();
30600
30608
  resizeObserver = globalResize.create(() => {
30601
30609
  if (props.autoResize) {
30602
- handleResizeEvent();
30610
+ layoutReFlag.value++;
30603
30611
  }
30604
30612
  });
30605
30613
  if (el) {
@@ -30717,6 +30725,54 @@ var VxeTableComponent = defineVxeComponent({
30717
30725
  }
30718
30726
  });
30719
30727
 
30728
+ function useCellView(props) {
30729
+ const currColumn = computed(() => {
30730
+ const { renderParams } = props;
30731
+ return renderParams.column;
30732
+ });
30733
+ const currRow = computed(() => {
30734
+ const { renderParams } = props;
30735
+ return renderParams.row;
30736
+ });
30737
+ const cellOptions = computed(() => {
30738
+ const { renderOpts } = props;
30739
+ return renderOpts.props || {};
30740
+ });
30741
+ const cellModel = computed({
30742
+ get() {
30743
+ const { renderParams } = props;
30744
+ const { row, column } = renderParams;
30745
+ return XEUtils.get(row, column.field);
30746
+ },
30747
+ set(value) {
30748
+ const { renderParams } = props;
30749
+ const { row, column } = renderParams;
30750
+ return XEUtils.set(row, column.field, value);
30751
+ }
30752
+ });
30753
+ return {
30754
+ currColumn,
30755
+ currRow,
30756
+ cellModel,
30757
+ cellOptions
30758
+ };
30759
+ }
30760
+
30761
+ const VxeTable = Object.assign({}, VxeTableComponent, {
30762
+ install(app) {
30763
+ app.component(VxeTableComponent.name, VxeTableComponent);
30764
+ }
30765
+ });
30766
+ const tableHandle = {
30767
+ useCellView
30768
+ };
30769
+ if (VxeUI.dynamicApp) {
30770
+ VxeUI.dynamicApp.component(VxeTableComponent.name, VxeTableComponent);
30771
+ }
30772
+ VxeUI.component(VxeTableComponent);
30773
+ VxeUI.tableHandle = tableHandle;
30774
+ const Table = VxeTable;
30775
+
30720
30776
  const { warnLog: warnLog$1, errLog: errLog$1 } = createComponentLog('toolbar');
30721
30777
  const { getConfig: getConfig$1, getIcon, getI18n: getI18n$1, renderer, commands: commands$1, createEvent: createEvent$1, useFns: useFns$1 } = VxeUI;
30722
30778
  function createReactData$1() {
@@ -31335,6 +31391,17 @@ var VxeToolbarComponent = defineVxeComponent({
31335
31391
  }
31336
31392
  });
31337
31393
 
31394
+ const VxeToolbar = Object.assign({}, VxeToolbarComponent, {
31395
+ install(app) {
31396
+ app.component(VxeToolbarComponent.name, VxeToolbarComponent);
31397
+ }
31398
+ });
31399
+ if (VxeUI.dynamicApp) {
31400
+ VxeUI.dynamicApp.component(VxeToolbarComponent.name, VxeToolbarComponent);
31401
+ }
31402
+ VxeUI.component(VxeToolbarComponent);
31403
+ const Toolbar = VxeToolbar;
31404
+
31338
31405
  const { warnLog, errLog } = createComponentLog('grid');
31339
31406
  const { getConfig, getI18n, commands, hooks, useFns, createEvent, globalEvents, GLOBAL_EVENT_KEYS, renderEmptyElement } = VxeUI;
31340
31407
  const tableComponentPropKeys = Object.keys(tableProps);
@@ -31423,6 +31490,10 @@ var VxeGridComponent = defineVxeComponent({
31423
31490
  const computePagerOpts = computed(() => {
31424
31491
  return Object.assign({}, getConfig().grid.pagerConfig, props.pagerConfig);
31425
31492
  });
31493
+ const computePagerProps = computed(() => {
31494
+ const pagerOpts = computePagerOpts.value;
31495
+ return Object.assign({}, pagerOpts, { enabled: undefined, slots: undefined });
31496
+ });
31426
31497
  const computeFormOpts = computed(() => {
31427
31498
  return Object.assign({}, getConfig().grid.formConfig, props.formConfig);
31428
31499
  });
@@ -31931,7 +32002,7 @@ var VxeGridComponent = defineVxeComponent({
31931
32002
  toolbarSlots.toolSuffix = toolSuffixSlot;
31932
32003
  }
31933
32004
  }
31934
- slotVNs.push(h(VxeToolbarComponent, Object.assign(Object.assign({ ref: refToolbar }, toolbarOpts), { slots: undefined }), toolbarSlots));
32005
+ slotVNs.push(h(VxeToolbar, Object.assign(Object.assign({ ref: refToolbar }, toolbarOpts), { slots: undefined }), toolbarSlots));
31935
32006
  }
31936
32007
  return h('div', {
31937
32008
  ref: refToolbarWrapper,
@@ -32023,7 +32094,7 @@ var VxeGridComponent = defineVxeComponent({
32023
32094
  return h('div', {
32024
32095
  class: 'vxe-grid--table-wrapper'
32025
32096
  }, [
32026
- h(VxeTableComponent, Object.assign(Object.assign({ ref: refTable }, tableProps), tableOns), slotObj)
32097
+ h(VxeTable, Object.assign(Object.assign({ ref: refTable }, tableProps), tableOns), slotObj)
32027
32098
  ]);
32028
32099
  };
32029
32100
  /**
@@ -32046,6 +32117,7 @@ var VxeGridComponent = defineVxeComponent({
32046
32117
  const { proxyConfig, pagerConfig } = props;
32047
32118
  const proxyOpts = computeProxyOpts.value;
32048
32119
  const pagerOpts = computePagerOpts.value;
32120
+ const pagerProps = computePagerProps.value;
32049
32121
  const pagerSlot = slots.pager;
32050
32122
  if ((pagerConfig && isEnableConf(pagerOpts)) || slots.pager) {
32051
32123
  return h('div', {
@@ -32056,7 +32128,7 @@ var VxeGridComponent = defineVxeComponent({
32056
32128
  ? pagerSlot({ $grid: $xeGrid, $gantt: null })
32057
32129
  : [
32058
32130
  VxeUIPagerComponent
32059
- ? h(VxeUIPagerComponent, Object.assign(Object.assign(Object.assign({ ref: refPager }, pagerOpts), (proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {})), { onPageChange: pageChangeEvent }), getConfigSlot(pagerOpts.slots))
32131
+ ? h(VxeUIPagerComponent, Object.assign(Object.assign(Object.assign({ ref: refPager }, pagerProps), (proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {})), { onPageChange: pageChangeEvent }), getConfigSlot(pagerOpts.slots))
32060
32132
  : renderEmptyElement($xeGrid)
32061
32133
  ]);
32062
32134
  }
@@ -32808,14 +32880,14 @@ var VxeGridComponent = defineVxeComponent({
32808
32880
  if ($form) {
32809
32881
  return $form.validate();
32810
32882
  }
32811
- return nextTick();
32883
+ return Promise.resolve();
32812
32884
  },
32813
32885
  validateFormField(field) {
32814
32886
  const $form = refForm.value;
32815
32887
  if ($form) {
32816
32888
  return $form.validateField(field);
32817
32889
  }
32818
- return nextTick();
32890
+ return Promise.resolve();
32819
32891
  },
32820
32892
  clearFormValidate(field) {
32821
32893
  const $form = refForm.value;
@@ -33132,65 +33204,6 @@ if (VxeUI.dynamicApp) {
33132
33204
  VxeUI.component(VxeGridComponent);
33133
33205
  const Grid = VxeGrid;
33134
33206
 
33135
- function useCellView(props) {
33136
- const currColumn = computed(() => {
33137
- const { renderParams } = props;
33138
- return renderParams.column;
33139
- });
33140
- const currRow = computed(() => {
33141
- const { renderParams } = props;
33142
- return renderParams.row;
33143
- });
33144
- const cellOptions = computed(() => {
33145
- const { renderOpts } = props;
33146
- return renderOpts.props || {};
33147
- });
33148
- const cellModel = computed({
33149
- get() {
33150
- const { renderParams } = props;
33151
- const { row, column } = renderParams;
33152
- return XEUtils.get(row, column.field);
33153
- },
33154
- set(value) {
33155
- const { renderParams } = props;
33156
- const { row, column } = renderParams;
33157
- return XEUtils.set(row, column.field, value);
33158
- }
33159
- });
33160
- return {
33161
- currColumn,
33162
- currRow,
33163
- cellModel,
33164
- cellOptions
33165
- };
33166
- }
33167
-
33168
- const VxeTable = Object.assign({}, VxeTableComponent, {
33169
- install(app) {
33170
- app.component(VxeTableComponent.name, VxeTableComponent);
33171
- }
33172
- });
33173
- const tableHandle = {
33174
- useCellView
33175
- };
33176
- if (VxeUI.dynamicApp) {
33177
- VxeUI.dynamicApp.component(VxeTableComponent.name, VxeTableComponent);
33178
- }
33179
- VxeUI.component(VxeTableComponent);
33180
- VxeUI.tableHandle = tableHandle;
33181
- const Table = VxeTable;
33182
-
33183
- const VxeToolbar = Object.assign({}, VxeToolbarComponent, {
33184
- install(app) {
33185
- app.component(VxeToolbarComponent.name, VxeToolbarComponent);
33186
- }
33187
- });
33188
- if (VxeUI.dynamicApp) {
33189
- VxeUI.dynamicApp.component(VxeToolbarComponent.name, VxeToolbarComponent);
33190
- }
33191
- VxeUI.component(VxeToolbarComponent);
33192
- const Toolbar = VxeToolbar;
33193
-
33194
33207
  var zhCN = {
33195
33208
  vxe: {
33196
33209
  base: {