vxe-table 4.13.35 → 4.13.37

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 (41) hide show
  1. package/es/grid/src/grid.js +34 -10
  2. package/es/style.css +1 -1
  3. package/es/table/module/edit/hook.js +2 -2
  4. package/es/table/module/keyboard/hook.js +4 -1
  5. package/es/table/module/validator/hook.js +11 -3
  6. package/es/table/src/table.js +35 -13
  7. package/es/toolbar/src/toolbar.js +0 -6
  8. package/es/ui/index.js +1 -1
  9. package/es/ui/src/log.js +1 -1
  10. package/lib/grid/src/grid.js +38 -14
  11. package/lib/grid/src/grid.min.js +1 -1
  12. package/lib/index.umd.js +68 -35
  13. package/lib/index.umd.min.js +1 -1
  14. package/lib/style.css +1 -1
  15. package/lib/table/module/edit/hook.js +2 -2
  16. package/lib/table/module/edit/hook.min.js +1 -1
  17. package/lib/table/module/keyboard/hook.js +2 -2
  18. package/lib/table/module/keyboard/hook.min.js +1 -1
  19. package/lib/table/module/validator/hook.js +15 -3
  20. package/lib/table/module/validator/hook.min.js +1 -1
  21. package/lib/table/src/table.js +9 -8
  22. package/lib/table/src/table.min.js +1 -1
  23. package/lib/toolbar/src/toolbar.js +0 -4
  24. package/lib/toolbar/src/toolbar.min.js +1 -1
  25. package/lib/ui/index.js +1 -1
  26. package/lib/ui/index.min.js +1 -1
  27. package/lib/ui/src/log.js +1 -1
  28. package/lib/ui/src/log.min.js +1 -1
  29. package/package.json +1 -1
  30. package/packages/grid/src/grid.ts +38 -11
  31. package/packages/table/module/edit/hook.ts +2 -2
  32. package/packages/table/module/keyboard/hook.ts +4 -1
  33. package/packages/table/module/validator/hook.ts +10 -3
  34. package/packages/table/src/table.ts +36 -13
  35. package/packages/toolbar/src/toolbar.ts +0 -4
  36. /package/es/{iconfont.1749202972772.ttf → iconfont.1749517680224.ttf} +0 -0
  37. /package/es/{iconfont.1749202972772.woff → iconfont.1749517680224.woff} +0 -0
  38. /package/es/{iconfont.1749202972772.woff2 → iconfont.1749517680224.woff2} +0 -0
  39. /package/lib/{iconfont.1749202972772.ttf → iconfont.1749517680224.ttf} +0 -0
  40. /package/lib/{iconfont.1749202972772.woff → iconfont.1749517680224.woff} +0 -0
  41. /package/lib/{iconfont.1749202972772.woff2 → iconfont.1749517680224.woff2} +0 -0
@@ -191,9 +191,17 @@ export default defineComponent({
191
191
  footKeys
192
192
  };
193
193
  });
194
- const computePageConfFlag = computed(() => {
194
+ const computeCustomCurrentPageFlag = computed(() => {
195
195
  const pagerOpts = computePagerOpts.value;
196
- return `${pagerOpts.currentPage}${pagerOpts.pageSize}`;
196
+ return pagerOpts.currentPage;
197
+ });
198
+ const computeCustomPageSizeFlag = computed(() => {
199
+ const pagerOpts = computePagerOpts.value;
200
+ return pagerOpts.pageSize;
201
+ });
202
+ const computeCustomTotalFlag = computed(() => {
203
+ const pagerOpts = computePagerOpts.value;
204
+ return pagerOpts.total;
197
205
  });
198
206
  const refMaps = {
199
207
  refElem,
@@ -236,17 +244,27 @@ export default defineComponent({
236
244
  const formOpts = computeFormOpts.value;
237
245
  return proxyConfig && isEnableConf(proxyOpts) && proxyOpts.form ? formData : formOpts.data;
238
246
  };
239
- const initPages = () => {
247
+ const initPages = (propKey) => {
240
248
  const { tablePage } = reactData;
241
249
  const { pagerConfig } = props;
242
250
  const pagerOpts = computePagerOpts.value;
243
- const { currentPage, pageSize } = pagerOpts;
244
251
  if (pagerConfig && isEnableConf(pagerOpts)) {
245
- if (currentPage) {
246
- tablePage.currentPage = currentPage;
252
+ if (propKey) {
253
+ if (pagerOpts[propKey]) {
254
+ tablePage[propKey] = XEUtils.toNumber(pagerOpts[propKey]);
255
+ }
247
256
  }
248
- if (pageSize) {
249
- tablePage.pageSize = pageSize;
257
+ else {
258
+ const { currentPage, pageSize, total } = pagerOpts;
259
+ if (currentPage) {
260
+ tablePage.currentPage = currentPage;
261
+ }
262
+ if (pageSize) {
263
+ tablePage.pageSize = pageSize;
264
+ }
265
+ if (total) {
266
+ tablePage.pageSize = total;
267
+ }
250
268
  }
251
269
  }
252
270
  };
@@ -1246,8 +1264,14 @@ export default defineComponent({
1246
1264
  watch(() => props.toolbarConfig, () => {
1247
1265
  initToolbar();
1248
1266
  });
1249
- watch(computePageConfFlag, () => {
1250
- initPages();
1267
+ watch(computeCustomCurrentPageFlag, () => {
1268
+ initPages('currentPage');
1269
+ });
1270
+ watch(computeCustomPageSizeFlag, () => {
1271
+ initPages('pageSize');
1272
+ });
1273
+ watch(computeCustomTotalFlag, () => {
1274
+ initPages('total');
1251
1275
  });
1252
1276
  watch(() => props.proxyConfig, () => {
1253
1277
  initProxy();