--- order: 0 title: zh-CN: 表单抽屉 en-US: from drawer --- ## zh-CN 展示用户的详细信息 ## en-US Display user details ```jsx import { Drawer, Form, Button, Col, Row, Input, Select, DatePicker } from 'antd'; const { Option } = Select; class App extends React.Component { state = { visible: false }; showDrawer = () => { this.setState({ visible: !this.state.visible, }); }; onClose = () => { this.setState({ visible: false, }); }; render() { const { getFieldDecorator } = this.props.form; return (
{getFieldDecorator('name', { rules: [{ required: true, message: 'please enter user name' }], })()} {getFieldDecorator('url', { rules: [{ required: true, message: 'please enter url' }], })( )} {getFieldDecorator('owner', { rules: [{ required: true, message: 'Please select an owner' }], })( )} {getFieldDecorator('type', { rules: [{ required: true, message: 'Please choose the type' }], })( )} {getFieldDecorator('approver', { rules: [{ required: true, message: 'Please choose the approver' }], })( )} {getFieldDecorator('dateTime', { rules: [{ required: true, message: 'Please choose the dateTime' }], })( trigger.parentNode} /> )} {getFieldDecorator('description', { rules: [ { required: true, message: 'please enter url description', }, ], })()}
); } } const WarpApp = Form.create()(App); ReactDOM.render(, mountNode); ```