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.
- package/es/grid/src/grid.js +34 -10
- package/es/style.css +1 -1
- package/es/table/module/edit/hook.js +2 -2
- package/es/table/module/keyboard/hook.js +4 -1
- package/es/table/module/validator/hook.js +11 -3
- package/es/table/src/table.js +35 -13
- package/es/toolbar/src/toolbar.js +0 -6
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +38 -14
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +68 -35
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/edit/hook.js +2 -2
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/keyboard/hook.js +2 -2
- package/lib/table/module/keyboard/hook.min.js +1 -1
- package/lib/table/module/validator/hook.js +15 -3
- package/lib/table/module/validator/hook.min.js +1 -1
- package/lib/table/src/table.js +9 -8
- package/lib/table/src/table.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +0 -4
- package/lib/toolbar/src/toolbar.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 +1 -1
- package/packages/grid/src/grid.ts +38 -11
- package/packages/table/module/edit/hook.ts +2 -2
- package/packages/table/module/keyboard/hook.ts +4 -1
- package/packages/table/module/validator/hook.ts +10 -3
- package/packages/table/src/table.ts +36 -13
- package/packages/toolbar/src/toolbar.ts +0 -4
- /package/es/{iconfont.1749202972772.ttf → iconfont.1749517680224.ttf} +0 -0
- /package/es/{iconfont.1749202972772.woff → iconfont.1749517680224.woff} +0 -0
- /package/es/{iconfont.1749202972772.woff2 → iconfont.1749517680224.woff2} +0 -0
- /package/lib/{iconfont.1749202972772.ttf → iconfont.1749517680224.ttf} +0 -0
- /package/lib/{iconfont.1749202972772.woff → iconfont.1749517680224.woff} +0 -0
- /package/lib/{iconfont.1749202972772.woff2 → iconfont.1749517680224.woff2} +0 -0
package/es/grid/src/grid.js
CHANGED
|
@@ -191,9 +191,17 @@ export default defineComponent({
|
|
|
191
191
|
footKeys
|
|
192
192
|
};
|
|
193
193
|
});
|
|
194
|
-
const
|
|
194
|
+
const computeCustomCurrentPageFlag = computed(() => {
|
|
195
195
|
const pagerOpts = computePagerOpts.value;
|
|
196
|
-
return
|
|
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 (
|
|
246
|
-
|
|
252
|
+
if (propKey) {
|
|
253
|
+
if (pagerOpts[propKey]) {
|
|
254
|
+
tablePage[propKey] = XEUtils.toNumber(pagerOpts[propKey]);
|
|
255
|
+
}
|
|
247
256
|
}
|
|
248
|
-
|
|
249
|
-
|
|
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(
|
|
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();
|