import { Button, Result } from 'antd' import type { FallbackProps } from 'react-error-boundary' interface ErrorStateProps { title?: string message?: string onRetry?: () => void } export function ErrorState({ title = '加载失败', message, onRetry, }: ErrorStateProps) { return (
重试 ) : undefined } />
) } export function ErrorFallback({ error, resetErrorBoundary }: FallbackProps) { return (
} /> ) }