import React from 'react'; import { Spin, theme } from 'antd'; import { LoadingOutlined } from '@ant-design/icons'; interface SSELoadingOverlayProps { loading: boolean; progress: number; message: string; } export const SSELoadingOverlay: React.FC = ({ loading, progress, message }) => { const { token } = theme.useToken(); if (!loading) return null; return (
{/* 标题和图标 */}
} />
AI生成中...
{/* 进度条 */}
0 ? token.boxShadow : 'none' }} />
{/* 进度百分比 */}
{progress}%
{/* 状态消息 */}
{message || '准备生成...'}
{/* 提示文字 */}
请勿关闭页面,生成过程需要一定时间
); };