feat(ui): show errmsg if table loaded error

This commit is contained in:
Fu Diwei
2025-01-16 22:07:01 +08:00
parent 3a2baba746
commit d1dbbae101
5 changed files with 30 additions and 11 deletions

View File

@@ -130,7 +130,7 @@ const AccessList = () => {
});
}, []);
const { loading, run: refreshTableData } = useRequest(
const { loading, run: refreshData } = useRequest(
() => {
const startIndex = (page - 1) * pageSize;
const endIndex = startIndex + pageSize;
@@ -157,7 +157,7 @@ const AccessList = () => {
// TODO: 有关联数据的不允许被删除
try {
await deleteAccess(data);
refreshTableData();
refreshData();
} catch (err) {
console.error(err);
notificationApi.error({ message: t("common.text.request_error"), description: getErrMsg(err) });