import { Col, Form, Input, InputNumber, Modal, Row, Select } from 'antd'; // import { InputNumber } from 'antd/lib'; import React from 'react'; const { Option } = Select; interface EditModalProps { visible: boolean; detialData: any; onCancel: () => void; onOk: (values: any) => void; } const EditModal: React.FC = ({ detialData, visible, onCancel, onOk, }) => { const [form] = Form.useForm(); const handleOk = () => { form .validateFields() .then((values) => { onOk(values); }) .catch((error) => { console.error('表单验证失败:', error); }); }; return (
{/* 名称字段 */} {/* CPU 字段 */} 颗} style={{ width: '190px' }} placeholder="CPU大小" /> 核} style={{ width: '190px' }} placeholder="CPU内核数" /> {/* 内存字段 */} CB} style={{ width: '393.33px' }} placeholder="内存" /> {/* 存储卷字段 */} {/* 描述字段 */}
); }; export default EditModal;