|
@@ -313,13 +313,13 @@ const handleList = async () => {
|
|
|
Object.keys(param).forEach((key) => !param[key] && delete param[key]);
|
|
Object.keys(param).forEach((key) => !param[key] && delete param[key]);
|
|
|
const res = await props.getData(param);
|
|
const res = await props.getData(param);
|
|
|
state.loading = false;
|
|
state.loading = false;
|
|
|
- if (res.result && res.result.items) {
|
|
|
|
|
|
|
+ if (res && res.result && res.result.items) {
|
|
|
state.showPagination = true;
|
|
state.showPagination = true;
|
|
|
state.data = res.result?.items ?? [];
|
|
state.data = res.result?.items ?? [];
|
|
|
state.total = res.result?.total ?? 0;
|
|
state.total = res.result?.total ?? 0;
|
|
|
} else {
|
|
} else {
|
|
|
state.showPagination = false;
|
|
state.showPagination = false;
|
|
|
- state.data = res.result ?? [];
|
|
|
|
|
|
|
+ state.data = (res && res.result) ? res.result : [];
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|