refactor: update grid component props and optimize docker setup

This commit is contained in:
2025-10-20 10:34:38 +08:00
parent 3f85b0ff78
commit 91eaa37283
14 changed files with 232 additions and 62 deletions

View File

@@ -61,7 +61,7 @@ const MetricValue = styled(Typography)(({ theme }) => ({
lineHeight: 1.2,
}));
const TrendIndicator = styled(Box)<{ trend: 'up' | 'down' }>(({ trend, theme }) => ({
const TrendIndicator = styled(Box)<{ trend: string }>(({ trend, theme }) => ({
display: 'flex',
alignItems: 'center',
gap: '0.25rem',
@@ -245,7 +245,7 @@ const Dashboard: React.FC = () => {
{/* 关键指标卡片 */}
<Grid container spacing={3} sx={{ mb: 3 }}>
<Grid item xs={12} sm={6} md={3}>
<Grid size={{xs:12,sm:6,md:3}}>
<MetricCard>
<CardContent>
<Box display="flex" alignItems="center" justifyContent="space-between">
@@ -270,7 +270,7 @@ const Dashboard: React.FC = () => {
</MetricCard>
</Grid>
<Grid item xs={12} sm={6} md={3}>
<Grid size={{xs:12,sm:6,md:3}}>
<MetricCard>
<CardContent>
<Box display="flex" alignItems="center" justifyContent="space-between">
@@ -295,7 +295,7 @@ const Dashboard: React.FC = () => {
</MetricCard>
</Grid>
<Grid item xs={12} sm={6} md={3}>
<Grid size={{xs:12,sm:6,md:3}}>
<MetricCard>
<CardContent>
<Box display="flex" alignItems="center" justifyContent="space-between">
@@ -320,7 +320,7 @@ const Dashboard: React.FC = () => {
</MetricCard>
</Grid>
<Grid item xs={12} sm={6} md={3}>
<Grid size={{xs:12,sm:6,md:3}}>
<MetricCard>
<CardContent>
<Box display="flex" alignItems="center" justifyContent="space-between">
@@ -362,7 +362,7 @@ const Dashboard: React.FC = () => {
</Button>
</Box>
<KnowledgeGridView
knowledgeBases={mockKnowledgeBases}
knowledgeBases={mockKnowledgeBases as any}
maxItems={3}
showSeeAll={true}
onSeeAll={handleSeeAllKnowledgeBases}
@@ -372,7 +372,7 @@ const Dashboard: React.FC = () => {
{/* 系统状态 */}
<Grid container spacing={3} sx={{ mb: 3 }}>
<Grid item xs={12} md={6}>
<Grid size={{xs:12,md:6}}>
<Card sx={{ border: '1px solid #E5E5E5' }}>
<CardContent>
<Typography variant="h6" fontWeight={600} mb={2}>
@@ -403,7 +403,7 @@ const Dashboard: React.FC = () => {
</Card>
</Grid>
<Grid item xs={12} md={6}>
<Grid size={{xs:12,md:6}}>
<Card sx={{ border: '1px solid #E5E5E5' }}>
<CardContent>
<Typography variant="h6" fontWeight={600} mb={2}>
@@ -479,15 +479,6 @@ const Dashboard: React.FC = () => {
</TableContainer>
</CardContent>
</Card>
{/* 用户数据调试组件 - 仅在开发环境显示 */}
{process.env.NODE_ENV === 'development' && (
<Card sx={{ border: '1px solid #E5E5E5', mt: 3 }}>
<CardContent>
<UserDataDebug />
</CardContent>
</Card>
)}
</PageContainer>
);
};