// 页面级空状态 // Logan.Li import type { ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; import { cn } from '@/lib/utils'; interface PageEmptyProps { icon?: ReactNode; title?: string; description?: string; action?: ReactNode; className?: string; } export function PageEmpty({ icon, title, description, action, className, }: PageEmptyProps) { const { t } = useTranslation(); const resolvedTitle = title ?? t('common.noData'); return (
{icon &&
{icon}
}

{resolvedTitle}

{description &&

{description}

} {action &&
{action}
}
); }