# 表单组合 - order: 5 集中营,展示和表单相关的其他 ant-design 组件。 --- ````jsx import { Form, Select, InputNumber, Datepicker, Switch, Slider, Button, message, Row, Col } from 'antd'; const FormItem = Form.Item; const Option = Select.Option; const 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() { const formData = this.state.formData; return (
); } }); ReactDOM.render(