import React from 'react'; import { CopyButton } from '@/components/CopyButton'; import EmptyPlaceholder from '@/components/EmptyPlaceholder'; import { cn } from '@/lib/utils'; interface ResultViewProps extends React.HTMLAttributes { result: string; showEmptyPlaceholder?: boolean; } export default function ResultView({ result, showEmptyPlaceholder = false, className, ...props }: ResultViewProps) { if (!result && !showEmptyPlaceholder) return null; if (!result) { return ( 请输入并点击转换 ); } return (
转换结果
{result}
); }