'use client' import { useState, useEffect } from 'react' import { Button } from '@/components/ui/button' import { Label } from '@/components/ui/label' import { Textarea } from '@/components/ui/textarea' interface HomeConfigTabProps { config: string onUpdate: (content: string) => void } export default function HomeConfigTab({ config, onUpdate }: HomeConfigTabProps) { const [content, setContent] = useState(config) useEffect(() => { setContent(config) }, [config]) const handleSave = () => { onUpdate(content) } const handleReset = () => { setContent(config) } const hasChanges = content !== config return (
您有未保存的更改,请点击"保存配置"按钮保存修改。