import React, { useEffect } from 'react' import { Button, Form, Input, Row, Modal } from 'antd' const { Item } = Form interface IAskAddProps { visible: boolean ID: number title?: string placeholder?: string onCloseModel: (e?: React.MouseEvent) => void onApply: (ID: number, content: string) => void } /** * 提问/留言 */ const AskAdd: React.FC = props => { const { visible, ID, title = '留言', placeholder = '可以留下您对报告内容的看法或者疑问', onCloseModel } = props const [form] = Form.useForm() useEffect(() => { return () => { form.resetFields() } // eslint-disable-next-line react-hooks/exhaustive-deps }, [form]) const handleFinish = (value: { Content: string }) => { props.onApply(ID, value.Content) } return (
e.stopPropagation()}>
) } export default AskAdd