|
@@ -102,7 +102,7 @@ const useRolePermissionCount = (roleId: number) => {
|
|
|
});
|
|
});
|
|
|
if (!response.ok) throw new Error('获取权限数量失败');
|
|
if (!response.ok) throw new Error('获取权限数量失败');
|
|
|
const data = await response.json();
|
|
const data = await response.json();
|
|
|
- return data.data.length;
|
|
|
|
|
|
|
+ return data.pagination.total;
|
|
|
},
|
|
},
|
|
|
enabled: !!roleId,
|
|
enabled: !!roleId,
|
|
|
});
|
|
});
|