tenghui-ui 2.3.4 → 2.4.0
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/dist/style.css +1 -1
- package/dist/tenghui-ui.es.js +25 -3
- package/dist/tenghui-ui.es.js.map +1 -1
- package/dist/tenghui-ui.umd.js +28 -28
- package/dist/tenghui-ui.umd.js.map +1 -1
- package/package.json +1 -1
- package/packages/table/src/index.vue +26 -1
package/package.json
CHANGED
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
<el-pagination
|
|
96
96
|
ref="pageRef"
|
|
97
97
|
layout="total, sizes, prev, pager, next, jumper"
|
|
98
|
+
v-loading="loadingPageTotal"
|
|
98
99
|
:current-page="Number(pageData.offset)"
|
|
99
100
|
:page-sizes="defaultPageSizes"
|
|
100
101
|
:page-size="Number(pageData.limit)"
|
|
@@ -266,7 +267,9 @@ export default {
|
|
|
266
267
|
checkTab: '',
|
|
267
268
|
useMaps: {},
|
|
268
269
|
renderLoading: false,
|
|
269
|
-
handleWindowResize: null
|
|
270
|
+
handleWindowResize: null,
|
|
271
|
+
|
|
272
|
+
loadingPageTotal: false
|
|
270
273
|
};
|
|
271
274
|
},
|
|
272
275
|
computed: {
|
|
@@ -407,6 +410,27 @@ export default {
|
|
|
407
410
|
|
|
408
411
|
// 默认map
|
|
409
412
|
this.useMaps = JSON.parse(JSON.stringify(this.tableMap));
|
|
413
|
+
|
|
414
|
+
if (this.$UICONFIG.getPageTotalApi) {
|
|
415
|
+
this.$toChildren.$on('changePageTotal', async totalId => {
|
|
416
|
+
try {
|
|
417
|
+
this.loadingPageTotal = true;
|
|
418
|
+
const { data:res } = await this.$http.post(this.$UICONFIG.getPageTotalApi, {
|
|
419
|
+
id: totalId
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
this.pageData.total = res.data.total;
|
|
423
|
+
this.loadingPageTotal = false;
|
|
424
|
+
} catch(e) {
|
|
425
|
+
this.loadingPageTotal = false;
|
|
426
|
+
}
|
|
427
|
+
})
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
|
|
431
|
+
deactivated() {
|
|
432
|
+
console.log('off');
|
|
433
|
+
this.$toChildren.$off('changePageTotal');
|
|
410
434
|
},
|
|
411
435
|
|
|
412
436
|
async mounted() {
|
|
@@ -438,6 +462,7 @@ export default {
|
|
|
438
462
|
},
|
|
439
463
|
beforeDestroy() {
|
|
440
464
|
window.removeEventListener('resize', this.handleWindowResize);
|
|
465
|
+
this.$toChildren.$off('changePageTotal');
|
|
441
466
|
},
|
|
442
467
|
|
|
443
468
|
async activated() {
|