From 54ae9e9961fcb2b274dfdd45220d0b55185a3598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=85=83=E5=9D=A4?= Date: Thu, 10 Jul 2025 09:38:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=B0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=EF=BC=9A=E7=94=A8=E6=88=B7=E5=8F=8D=E9=A6=88=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chat-with-history/FeedbackModal.tsx | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 app/components/chat-with-history/FeedbackModal.tsx diff --git a/app/components/chat-with-history/FeedbackModal.tsx b/app/components/chat-with-history/FeedbackModal.tsx new file mode 100644 index 0000000..979bb2f --- /dev/null +++ b/app/components/chat-with-history/FeedbackModal.tsx @@ -0,0 +1,55 @@ +import React, { useState } from 'react'; +import { Modal, Checkbox, Input, message } from 'antd'; + +const { TextArea } = Input; + +interface FeedbackModalProps { + open: boolean; + onOk: (selectedOption: number | null, feedbackText: string) => void; + onCancel: () => void; +} + +const FeedbackModal: React.FC = ({ open, onOk, onCancel }) => { + const [selectedOption, setSelectedOption] = useState(null); + const [feedbackText, setFeedbackText] = useState(''); + + const handleOk = () => { + if (selectedOption === null || !feedbackText) { + message.warning('请选择操作类型并填写反馈建议'); + return; + } + onOk(selectedOption, feedbackText); + }; + + return ( + +
+ setSelectedOption(0)} + > + 新增 + + setSelectedOption(1)} + > + 修改 + +
+