= ({ dat
void;
- onError?: (error: Error) => void;
- }) => {
+ customRequest={async (options) => {
const formData = new FormData();
- formData.append('file', options.file instanceof File ? options.file : new File([options.file], 'attachment'));
+ formData.append('file', options.file instanceof File ? options.file : new File([options.file as Blob], 'attachment'));
setUploading(true);
try {
await api.post(`/archive/${studentId}/attachments`, formData, {
@@ -684,9 +680,9 @@ const AttachmentsTab: React.FC = ({ dat
options.onSuccess?.({});
onRefresh();
} catch (e: unknown) {
- const err = e as { message?: string };
- message.error(err?.message || '上传失败');
- options.onError?.(err instanceof Error ? err : new Error('Upload failed'));
+ const msg = e instanceof Error ? e.message : '上传失败';
+ message.error(msg);
+ options.onError?.(e instanceof Error ? e : new Error(msg));
} finally {
setUploading(false);
}
diff --git a/apps/admin/src/pages/Students/index.tsx b/apps/admin/src/pages/Students/index.tsx
index 6bd09e3..e4610e0 100644
--- a/apps/admin/src/pages/Students/index.tsx
+++ b/apps/admin/src/pages/Students/index.tsx
@@ -430,7 +430,7 @@ const StudentsPage: React.FC = () => {
dataSource={data}
rowKey="id"
loading={loading}
- scroll={{ x: 1200 }}
+ scroll={{ x: 1300 }}
pagination={{ pageSize: 15, showTotal: (total) => `共 ${total} 人` }}
rowClassName={(record: any) => (record.status === 'archived' ? 'archived-row' : '')}
rowSelection={{
diff --git a/apps/admin/src/pages/Teachers/index.tsx b/apps/admin/src/pages/Teachers/index.tsx
index 0fb49ff..dd658ae 100644
--- a/apps/admin/src/pages/Teachers/index.tsx
+++ b/apps/admin/src/pages/Teachers/index.tsx
@@ -187,7 +187,7 @@ const TeachersPage: React.FC = () => {
dataSource={data}
rowKey="id"
loading={loading}
- scroll={{ x: 1200 }}
+ scroll={{ x: 1300 }}
pagination={{
current: page,
pageSize: PAGE_SIZE,
diff --git a/apps/admin/src/pages/Tenants/index.tsx b/apps/admin/src/pages/Tenants/index.tsx
index 5edcee2..84e2f43 100644
--- a/apps/admin/src/pages/Tenants/index.tsx
+++ b/apps/admin/src/pages/Tenants/index.tsx
@@ -186,7 +186,7 @@ const TenantsPage: React.FC = () => {
{
dataSource={data}
rowKey="id"
loading={loading}
- scroll={{ x: 'max-content' }}
+ scroll={{ x: 1000 }}
pagination={false}
/>