🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# 1. 在 3.*版本使用多个form表单? ~~~ const Createform = Form.create({ name: 'stepOne' })(args => { const { form: { getFieldDecorator } } = args; return <div className={styles.first}> <Form {...layout}> <Form.Item label="干预场景名称" required="true"> {getFieldDecorator('interveneSceneName', { rules: [{ required: true, message: '请输入干预场景名称!' }], })( <Input placeholder="请输入" />, )} </Form.Item> <Form.Item label="干预场景编码" required="true"> {getFieldDecorator('interveneSceneCode', { rules: [{ required: true, message: '请输入干预场景编码!' }], })( <Input placeholder="请输入" />, )} </Form.Item> </Form> </div>; }); const renderContent = value => { switch (value) { case '场景配置': return <Createform ref={formEl} /> break; ~~~