vxe-table 4.15.0-beta.11 → 4.15.0-beta.13
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 +38 -6
- package/es/style.css +1 -1
- package/es/table/module/edit/hook.js +5 -5
- package/es/table/src/body.js +7 -6
- package/es/table/src/table.js +14 -10
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +48 -6
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +67 -19
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/edit/hook.js +5 -0
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/src/body.js +7 -6
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/table.js +5 -5
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +1 -1
- 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 +2 -2
- package/packages/grid/src/grid.ts +39 -6
- package/packages/table/module/edit/hook.ts +5 -5
- package/packages/table/src/body.ts +7 -6
- package/packages/table/src/table.ts +14 -10
- /package/es/{iconfont.1753525726129.ttf → iconfont.1753775832074.ttf} +0 -0
- /package/es/{iconfont.1753525726129.woff → iconfont.1753775832074.woff} +0 -0
- /package/es/{iconfont.1753525726129.woff2 → iconfont.1753775832074.woff2} +0 -0
- /package/lib/{iconfont.1753525726129.ttf → iconfont.1753775832074.ttf} +0 -0
- /package/lib/{iconfont.1753525726129.woff → iconfont.1753775832074.woff} +0 -0
- /package/lib/{iconfont.1753525726129.woff2 → iconfont.1753775832074.woff2} +0 -0
package/es/grid/src/grid.js
CHANGED
|
@@ -205,6 +205,10 @@ export default defineVxeComponent({
|
|
|
205
205
|
const pagerOpts = computePagerOpts.value;
|
|
206
206
|
return pagerOpts.total;
|
|
207
207
|
});
|
|
208
|
+
const computePageCount = computed(() => {
|
|
209
|
+
const { tablePage } = reactData;
|
|
210
|
+
return Math.max(Math.ceil(tablePage.total / tablePage.pageSize), 1);
|
|
211
|
+
});
|
|
208
212
|
const computeIsLoading = computed(() => {
|
|
209
213
|
const { loading, proxyConfig } = props;
|
|
210
214
|
const { tableLoading } = reactData;
|
|
@@ -272,7 +276,7 @@ export default defineVxeComponent({
|
|
|
272
276
|
tablePage.pageSize = pageSize;
|
|
273
277
|
}
|
|
274
278
|
if (total) {
|
|
275
|
-
tablePage.
|
|
279
|
+
tablePage.total = total;
|
|
276
280
|
}
|
|
277
281
|
}
|
|
278
282
|
}
|
|
@@ -1168,6 +1172,9 @@ export default defineVxeComponent({
|
|
|
1168
1172
|
}
|
|
1169
1173
|
return nextTick();
|
|
1170
1174
|
},
|
|
1175
|
+
getParams() {
|
|
1176
|
+
return props.params;
|
|
1177
|
+
},
|
|
1171
1178
|
zoom() {
|
|
1172
1179
|
if (reactData.isZMax) {
|
|
1173
1180
|
return gridMethods.revert();
|
|
@@ -1223,26 +1230,51 @@ export default defineVxeComponent({
|
|
|
1223
1230
|
return nextTick();
|
|
1224
1231
|
},
|
|
1225
1232
|
homePage() {
|
|
1233
|
+
const { tablePage } = reactData;
|
|
1234
|
+
tablePage.currentPage = 1;
|
|
1235
|
+
return nextTick();
|
|
1236
|
+
},
|
|
1237
|
+
homePageByEvent(evnt) {
|
|
1226
1238
|
const $pager = refPager.value;
|
|
1227
1239
|
if ($pager) {
|
|
1228
|
-
|
|
1240
|
+
$pager.homePageByEvent(evnt);
|
|
1229
1241
|
}
|
|
1230
|
-
return nextTick();
|
|
1231
1242
|
},
|
|
1232
1243
|
endPage() {
|
|
1244
|
+
const { tablePage } = reactData;
|
|
1245
|
+
const pageCount = computePageCount.value;
|
|
1246
|
+
tablePage.currentPage = pageCount;
|
|
1247
|
+
return nextTick();
|
|
1248
|
+
},
|
|
1249
|
+
endPageByEvent(evnt) {
|
|
1233
1250
|
const $pager = refPager.value;
|
|
1234
1251
|
if ($pager) {
|
|
1235
|
-
|
|
1252
|
+
$pager.endPageByEvent(evnt);
|
|
1236
1253
|
}
|
|
1254
|
+
},
|
|
1255
|
+
setCurrentPage(currentPage) {
|
|
1256
|
+
const { tablePage } = reactData;
|
|
1257
|
+
const pageCount = computePageCount.value;
|
|
1258
|
+
tablePage.currentPage = Math.min(pageCount, Math.max(1, XEUtils.toNumber(currentPage)));
|
|
1237
1259
|
return nextTick();
|
|
1238
1260
|
},
|
|
1239
|
-
|
|
1261
|
+
setCurrentPageByEvent(evnt, currentPage) {
|
|
1240
1262
|
const $pager = refPager.value;
|
|
1241
1263
|
if ($pager) {
|
|
1242
|
-
|
|
1264
|
+
$pager.setCurrentPageByEvent(evnt, currentPage);
|
|
1243
1265
|
}
|
|
1266
|
+
},
|
|
1267
|
+
setPageSize(pageSize) {
|
|
1268
|
+
const { tablePage } = reactData;
|
|
1269
|
+
tablePage.pageSize = Math.max(1, XEUtils.toNumber(pageSize));
|
|
1244
1270
|
return nextTick();
|
|
1245
1271
|
},
|
|
1272
|
+
setPageSizeByEvent(evnt, pageSize) {
|
|
1273
|
+
const $pager = refPager.value;
|
|
1274
|
+
if ($pager) {
|
|
1275
|
+
$pager.setPageSizeByEvent(evnt, pageSize);
|
|
1276
|
+
}
|
|
1277
|
+
},
|
|
1246
1278
|
getProxyInfo() {
|
|
1247
1279
|
const $xeTable = refTable.value;
|
|
1248
1280
|
if (props.proxyConfig) {
|