fix: 优化用户管理页面UI显示
- 移除未使用的 TrophyOutlined 图标导入 - 移除总答题数统计的图标前缀,保持UI简洁 - 修复 Spin 组件的使用方式,改为使用子元素而非 tip 属性 - 添加 type_stats 的空值检查,防止潜在的空指针错误 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
f79d1368b8
commit
d7ba3e1d65
@ -20,7 +20,6 @@ import {
|
|||||||
import {
|
import {
|
||||||
ArrowLeftOutlined,
|
ArrowLeftOutlined,
|
||||||
UserOutlined,
|
UserOutlined,
|
||||||
TrophyOutlined,
|
|
||||||
CheckCircleOutlined,
|
CheckCircleOutlined,
|
||||||
CloseCircleOutlined,
|
CloseCircleOutlined,
|
||||||
} from '@ant-design/icons'
|
} from '@ant-design/icons'
|
||||||
@ -164,7 +163,6 @@ const UserManagement: React.FC = () => {
|
|||||||
<Statistic
|
<Statistic
|
||||||
title="总答题数"
|
title="总答题数"
|
||||||
value={totalStats.totalAnswers}
|
value={totalStats.totalAnswers}
|
||||||
prefix={<TrophyOutlined />}
|
|
||||||
valueStyle={{ color: '#52c41a' }}
|
valueStyle={{ color: '#52c41a' }}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
@ -304,7 +302,9 @@ const UserManagement: React.FC = () => {
|
|||||||
>
|
>
|
||||||
{detailLoading ? (
|
{detailLoading ? (
|
||||||
<div style={{ textAlign: 'center', padding: '50px 0' }}>
|
<div style={{ textAlign: 'center', padding: '50px 0' }}>
|
||||||
<Spin size="large" tip="加载中..." />
|
<Spin size="large">
|
||||||
|
<div style={{ paddingTop: 50 }}>加载中...</div>
|
||||||
|
</Spin>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
selectedUser && (
|
selectedUser && (
|
||||||
@ -420,7 +420,7 @@ const UserManagement: React.FC = () => {
|
|||||||
</Descriptions>
|
</Descriptions>
|
||||||
|
|
||||||
{/* 题型统计 */}
|
{/* 题型统计 */}
|
||||||
{selectedUser.type_stats.length > 0 && (
|
{selectedUser.type_stats && selectedUser.type_stats.length > 0 && (
|
||||||
<>
|
<>
|
||||||
<Title level={5}>题型统计</Title>
|
<Title level={5}>题型统计</Title>
|
||||||
<Table
|
<Table
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user