vxe-table 3.15.34 → 3.15.36
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.
- package/es/grid/src/grid.js +50 -17
- package/es/style.css +1 -1
- package/es/table/module/edit/mixin.js +2 -2
- package/es/table/module/validator/mixin.js +11 -2
- package/es/table/src/body.js +20 -3
- package/es/table/src/cell.js +52 -36
- package/es/table/src/column.js +2 -0
- package/es/table/src/columnInfo.js +2 -0
- package/es/table/src/methods.js +135 -76
- package/es/table/src/props.js +3 -1
- package/es/table/src/table.js +19 -6
- package/es/table/src/util.js +5 -2
- package/es/ui/index.js +4 -4
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +57 -24
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +323 -149
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/edit/mixin.js +2 -2
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/validator/mixin.js +14 -2
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/src/body.js +19 -2
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +43 -28
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +2 -0
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +2 -0
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +151 -74
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +3 -1
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +19 -6
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +7 -4
- package/lib/table/src/util.min.js +1 -1
- package/lib/ui/index.js +4 -4
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/grid/src/grid.ts +56 -17
- package/packages/table/module/edit/mixin.ts +2 -2
- package/packages/table/module/validator/mixin.ts +11 -3
- package/packages/table/src/body.ts +20 -3
- package/packages/table/src/cell.ts +52 -36
- package/packages/table/src/column.ts +2 -0
- package/packages/table/src/columnInfo.ts +3 -0
- package/packages/table/src/methods.ts +143 -77
- package/packages/table/src/props.ts +3 -1
- package/packages/table/src/table.ts +20 -6
- package/packages/table/src/util.ts +6 -2
- package/packages/ui/index.ts +3 -3
- /package/es/{iconfont.1749092456241.ttf → iconfont.1749440099787.ttf} +0 -0
- /package/es/{iconfont.1749092456241.woff → iconfont.1749440099787.woff} +0 -0
- /package/es/{iconfont.1749092456241.woff2 → iconfont.1749440099787.woff2} +0 -0
- /package/lib/{iconfont.1749092456241.ttf → iconfont.1749440099787.ttf} +0 -0
- /package/lib/{iconfont.1749092456241.woff → iconfont.1749440099787.woff} +0 -0
- /package/lib/{iconfont.1749092456241.woff2 → iconfont.1749440099787.woff2} +0 -0
package/es/grid/src/grid.js
CHANGED
|
@@ -11,6 +11,32 @@ const { getConfig, getI18n, commands, globalEvents, globalMixins, renderEmptyEle
|
|
|
11
11
|
const methods = {};
|
|
12
12
|
const propKeys = Object.keys(tableComponentProps);
|
|
13
13
|
const defaultLayouts = [['Form'], ['Toolbar', 'Top', 'Table', 'Bottom', 'Pager']];
|
|
14
|
+
function initPages($xeGrid, propKey) {
|
|
15
|
+
const props = $xeGrid;
|
|
16
|
+
const reactData = $xeGrid;
|
|
17
|
+
const { tablePage } = reactData;
|
|
18
|
+
const { pagerConfig } = props;
|
|
19
|
+
const pagerOpts = $xeGrid.computePagerOpts;
|
|
20
|
+
if (pagerConfig && isEnableConf(pagerOpts)) {
|
|
21
|
+
if (propKey) {
|
|
22
|
+
if (pagerOpts[propKey]) {
|
|
23
|
+
tablePage[propKey] = XEUtils.toNumber(pagerOpts[propKey]);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
const { currentPage, pageSize, total } = pagerOpts;
|
|
28
|
+
if (currentPage) {
|
|
29
|
+
tablePage.currentPage = currentPage;
|
|
30
|
+
}
|
|
31
|
+
if (pageSize) {
|
|
32
|
+
tablePage.pageSize = pageSize;
|
|
33
|
+
}
|
|
34
|
+
if (total) {
|
|
35
|
+
tablePage.pageSize = total;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
14
40
|
function renderDefaultForm(h, $xeGrid) {
|
|
15
41
|
const VxeUIFormComponent = VxeUI.getComponent('VxeForm');
|
|
16
42
|
const props = $xeGrid;
|
|
@@ -515,10 +541,20 @@ export default {
|
|
|
515
541
|
footKeys
|
|
516
542
|
};
|
|
517
543
|
},
|
|
518
|
-
|
|
544
|
+
computeCustomCurrentPageFlag() {
|
|
545
|
+
const $xeGrid = this;
|
|
546
|
+
const pagerOpts = $xeGrid.computePagerOpts;
|
|
547
|
+
return pagerOpts.currentPage;
|
|
548
|
+
},
|
|
549
|
+
computeCustomPageSizeFlag() {
|
|
519
550
|
const $xeGrid = this;
|
|
520
551
|
const pagerOpts = $xeGrid.computePagerOpts;
|
|
521
|
-
return
|
|
552
|
+
return pagerOpts.pageSize;
|
|
553
|
+
},
|
|
554
|
+
computeCustomTotalFlag() {
|
|
555
|
+
const $xeGrid = this;
|
|
556
|
+
const pagerOpts = $xeGrid.computePagerOpts;
|
|
557
|
+
return pagerOpts.total;
|
|
522
558
|
}
|
|
523
559
|
},
|
|
524
560
|
watch: {
|
|
@@ -538,8 +574,17 @@ export default {
|
|
|
538
574
|
proxyConfig() {
|
|
539
575
|
this.initProxy();
|
|
540
576
|
},
|
|
541
|
-
|
|
542
|
-
this
|
|
577
|
+
computeCustomCurrentPageFlag() {
|
|
578
|
+
const $xeGrid = this;
|
|
579
|
+
initPages($xeGrid, 'currentPage');
|
|
580
|
+
},
|
|
581
|
+
computeCustomPageSizeFlag() {
|
|
582
|
+
const $xeGrid = this;
|
|
583
|
+
initPages($xeGrid, 'pageSize');
|
|
584
|
+
},
|
|
585
|
+
computeCustomTotalFlag() {
|
|
586
|
+
const $xeGrid = this;
|
|
587
|
+
initPages($xeGrid, 'total');
|
|
543
588
|
}
|
|
544
589
|
},
|
|
545
590
|
created() {
|
|
@@ -573,7 +618,7 @@ export default {
|
|
|
573
618
|
}
|
|
574
619
|
}
|
|
575
620
|
});
|
|
576
|
-
|
|
621
|
+
initPages($xeGrid);
|
|
577
622
|
globalEvents.on(this, 'keydown', this.handleGlobalKeydownEvent);
|
|
578
623
|
},
|
|
579
624
|
mounted() {
|
|
@@ -659,18 +704,6 @@ export default {
|
|
|
659
704
|
}
|
|
660
705
|
});
|
|
661
706
|
},
|
|
662
|
-
initPages() {
|
|
663
|
-
const { tablePage, pagerConfig, pagerOpts } = this;
|
|
664
|
-
const { currentPage, pageSize } = pagerOpts;
|
|
665
|
-
if (pagerConfig) {
|
|
666
|
-
if (currentPage) {
|
|
667
|
-
tablePage.currentPage = currentPage;
|
|
668
|
-
}
|
|
669
|
-
if (pageSize) {
|
|
670
|
-
tablePage.pageSize = pageSize;
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
},
|
|
674
707
|
initProxy() {
|
|
675
708
|
const { proxyInited, proxyConfig, proxyOpts, formConfig, formOpts } = this;
|
|
676
709
|
if (proxyConfig) {
|