@epie/bi-crud 2.0.30 → 2.0.31
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/lib/bi-crud.esm.js +16 -2
- package/lib/bi-crud.umd.js +16 -2
- package/lib/types/base/crud.d.ts +5 -0
- package/package.json +1 -1
package/lib/bi-crud.esm.js
CHANGED
|
@@ -9095,6 +9095,18 @@ function useHelper({
|
|
|
9095
9095
|
|
|
9096
9096
|
|
|
9097
9097
|
function render(list, pagination) {
|
|
9098
|
+
if (props.listPreProcess) {
|
|
9099
|
+
const {
|
|
9100
|
+
list: listNew,
|
|
9101
|
+
pagination: paginationNew
|
|
9102
|
+
} = props.listPreProcess({
|
|
9103
|
+
list: list,
|
|
9104
|
+
pagination: pagination
|
|
9105
|
+
});
|
|
9106
|
+
list = listNew;
|
|
9107
|
+
pagination = paginationNew;
|
|
9108
|
+
}
|
|
9109
|
+
|
|
9098
9110
|
mitt.emit("crud.refresh", {
|
|
9099
9111
|
list,
|
|
9100
9112
|
pagination
|
|
@@ -9475,7 +9487,8 @@ function useCrud(options, cb) {
|
|
|
9475
9487
|
permission,
|
|
9476
9488
|
dict,
|
|
9477
9489
|
onRefresh,
|
|
9478
|
-
onDelete
|
|
9490
|
+
onDelete,
|
|
9491
|
+
listPreProcess
|
|
9479
9492
|
} = options || {};
|
|
9480
9493
|
const Crud = ref();
|
|
9481
9494
|
useParent("epie-crud", Crud);
|
|
@@ -9485,7 +9498,8 @@ function useCrud(options, cb) {
|
|
|
9485
9498
|
if (options) {
|
|
9486
9499
|
Object.assign(val.$.props, {
|
|
9487
9500
|
onDelete,
|
|
9488
|
-
onRefresh
|
|
9501
|
+
onRefresh,
|
|
9502
|
+
listPreProcess
|
|
9489
9503
|
});
|
|
9490
9504
|
val.set("dict", dict);
|
|
9491
9505
|
val.set("service", service);
|
package/lib/bi-crud.umd.js
CHANGED
|
@@ -9098,6 +9098,18 @@
|
|
|
9098
9098
|
|
|
9099
9099
|
|
|
9100
9100
|
function render(list, pagination) {
|
|
9101
|
+
if (props.listPreProcess) {
|
|
9102
|
+
const {
|
|
9103
|
+
list: listNew,
|
|
9104
|
+
pagination: paginationNew
|
|
9105
|
+
} = props.listPreProcess({
|
|
9106
|
+
list: list,
|
|
9107
|
+
pagination: pagination
|
|
9108
|
+
});
|
|
9109
|
+
list = listNew;
|
|
9110
|
+
pagination = paginationNew;
|
|
9111
|
+
}
|
|
9112
|
+
|
|
9101
9113
|
mitt.emit("crud.refresh", {
|
|
9102
9114
|
list,
|
|
9103
9115
|
pagination
|
|
@@ -9478,7 +9490,8 @@
|
|
|
9478
9490
|
permission,
|
|
9479
9491
|
dict,
|
|
9480
9492
|
onRefresh,
|
|
9481
|
-
onDelete
|
|
9493
|
+
onDelete,
|
|
9494
|
+
listPreProcess
|
|
9482
9495
|
} = options || {};
|
|
9483
9496
|
const Crud = vue.ref();
|
|
9484
9497
|
useParent("epie-crud", Crud);
|
|
@@ -9488,7 +9501,8 @@
|
|
|
9488
9501
|
if (options) {
|
|
9489
9502
|
Object.assign(val.$.props, {
|
|
9490
9503
|
onDelete,
|
|
9491
|
-
onRefresh
|
|
9504
|
+
onRefresh,
|
|
9505
|
+
listPreProcess
|
|
9492
9506
|
});
|
|
9493
9507
|
val.set("dict", dict);
|
|
9494
9508
|
val.set("service", service);
|
package/lib/types/base/crud.d.ts
CHANGED
|
@@ -102,6 +102,11 @@ export declare namespace EpieCrud {
|
|
|
102
102
|
next: Service["page"]["request"];
|
|
103
103
|
render: (list: any[], pagination?: Service["page"]["result"]["pagination"]) => void;
|
|
104
104
|
}): any;
|
|
105
|
+
listPreProcess?(list: any[], pagination?: {
|
|
106
|
+
total: number;
|
|
107
|
+
page: number;
|
|
108
|
+
pageSize: number;
|
|
109
|
+
}): any;
|
|
105
110
|
onDelete?(selection: any[], event: {
|
|
106
111
|
next: Service["delete"]["request"];
|
|
107
112
|
}): any;
|