'use client'; import React from 'react'; import { Dialog, DialogTitle, DialogContent, Box, LinearProgress, Typography, CircularProgress } from '@mui/material'; import { useTranslation } from 'react-i18next'; const ExportProgressDialog = ({ open, progress }) => { const { t } = useTranslation(); const { processed, total, hasMore } = progress; // 计算进度百分比 const percentage = total > 0 ? Math.round((processed / total) * 100) : 0; return ( {t('datasets.exportProgress')} {/* 圆形进度指示器 */} {`${percentage}%`} {/* 进度详情 */} {t('datasets.exportingData')} {t('datasets.processedCount', { processed, total })} {/* 线性进度条 */} {/* 状态提示 */} {hasMore ? t('datasets.exportInProgress') : t('datasets.exportFinalizing')} ); }; export default ExportProgressDialog;