fix: enhance pagination settings across multiple pages with default size and options
This commit is contained in:
@@ -146,7 +146,12 @@ const TeacherWorkspacePage: React.FC = () => {
|
||||
columns={classColumns}
|
||||
dataSource={data.assignedClasses}
|
||||
rowKey="classId"
|
||||
pagination={{ pageSize: 20, showTotal: (total) => `共 ${total} 个班级` }}
|
||||
pagination={{
|
||||
defaultPageSize: 20,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: [20, 50, 100],
|
||||
showTotal: (total) => `共 ${total} 个班级`,
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<Empty description="暂无分配的班级" />
|
||||
@@ -160,7 +165,12 @@ const TeacherWorkspacePage: React.FC = () => {
|
||||
columns={scheduleColumns}
|
||||
dataSource={data.todaySchedules}
|
||||
rowKey="id"
|
||||
pagination={{ pageSize: 20, showTotal: (total) => `共 ${total} 节` }}
|
||||
pagination={{
|
||||
defaultPageSize: 20,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: [20, 50, 100],
|
||||
showTotal: (total) => `共 ${total} 节`,
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<Empty description="今日无排课" />
|
||||
@@ -174,7 +184,12 @@ const TeacherWorkspacePage: React.FC = () => {
|
||||
columns={studentColumns}
|
||||
dataSource={data.myStudents}
|
||||
rowKey="studentId"
|
||||
pagination={{ pageSize: 20, showTotal: (total) => `共 ${total} 人` }}
|
||||
pagination={{
|
||||
defaultPageSize: 20,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: [20, 50, 100],
|
||||
showTotal: (total) => `共 ${total} 人`,
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<Empty description="暂无学生" />
|
||||
|
||||
Reference in New Issue
Block a user