# 表单组合 - order: 5 集中营,展示和表单相关的其他 ant-design 组件。 --- ````jsx import {Form, Input, Select, InputNumber, Datepicker, Switch, Menu, Dropdown, Slider, Icon, Button, message, Row, Col} from 'antd'; const FormItem = Form.Item; const Option = Select.Option; var Demo = React.createClass({ mixins: [Form.ValueMixin], getInitialState() { return { formData: { inputNumber: undefined, static: "唧唧复唧唧木兰当户织呀", switch: undefined, slider: undefined, select: undefined, startDate: undefined, endDate: undefined, } }; }, handleSubmit(e) { e.preventDefault(); message.success("收到表单值~~~ :" + JSON.stringify(this.state.formData, function(k, v) { if (typeof v === 'undefined') { return ''; } return v; })); }, render() { var formData = this.state.formData; return (
); } }); ReactDOM.render(