--- order: 3 title: zh-CN: 抽屉表单 en-US: Submit form in drawer --- ## zh-CN 在抽屉中使用表单。 ## en-US Use a form in Drawer with a submit button. ```tsx import { PlusOutlined } from '@ant-design/icons'; import { Button, Col, DatePicker, Drawer, Form, Input, Row, Select, Space } from 'antd'; import React, { useState } from 'react'; const { Option } = Select; const App: React.FC = () => { const [visible, setVisible] = useState(false); const showDrawer = () => { setVisible(true); }; const onClose = () => { setVisible(false); }; return ( <> } >
trigger.parentElement!} />
); }; export default App; ``` ```css .site-form-in-drawer-wrapper { position: absolute; right: 0px; bottom: 0px; width: 100%; padding: 10px 16px; text-align: right; background: #fff; border-top: 1px solid #e9e9e9; } ```