import { createForm } from '../index'; const Form = { methods: { handleSubmit(e) { e.preventDefault(); const { validateFields } = this.form; validateFields() .then(console.log) .catch(console.error); }, }, render() { const { getFieldDecorator } = this.form; return (
{getFieldDecorator('name', { rules: [ { required: true, }, ], })()}
); }, }; export default createForm()(Form);