feat: add createForm to Form

This commit is contained in:
Benjy Cui 2016-01-22 14:31:08 +08:00
parent 422b0d19f7
commit d8201c2752
5 changed files with 8 additions and 4 deletions

View File

@ -8,7 +8,7 @@
````jsx
import { Button, Form, Input } from 'antd';
import { createForm } from 'rc-form';
const createForm = Form.create;
const FormItem = Form.Item;
function noop() {

View File

@ -11,7 +11,7 @@
````jsx
import { Button, Form, Input, Row, Col } from 'antd';
import classNames from 'classnames';
import { createForm } from 'rc-form';
const createForm = Form.create;
const FormItem = Form.Item;
function noop() {

View File

@ -9,10 +9,10 @@
---
````jsx
import { createForm } from 'rc-form';
import { Select, Radio, Button, DatePicker, InputNumber, Form } from 'antd';
const Option = Select.Option;
const RadioGroup = Radio.Group;
const createForm = Form.create;
const FormItem = Form.Item;
let Demo = React.createClass({

View File

@ -2,8 +2,12 @@ import Form from './Form';
import FormItem from './FormItem';
import ValueMixin from './ValueMixin';
import Input from '../input';
import { createForm } from 'rc-form';
Form.create = createForm;
Form.Item = FormItem;
// @Deprecated
Form.ValueMixin = ValueMixin;
// import { Form, Input } from 'antd/lib/form/';

View File

@ -45,6 +45,7 @@
"rc-collapse": "~1.4.4",
"rc-dialog": "~5.3.1",
"rc-dropdown": "~1.4.3",
"rc-form": "~0.9.0",
"rc-form-validation": "~2.5.0",
"rc-input-number": "~2.4.1",
"rc-menu": "~4.9.0",
@ -101,7 +102,6 @@
"nico-jsx": "~0.7.2",
"postcss-loader": "^0.8.0",
"pre-commit": "1.x",
"rc-form": "~0.9.0",
"rc-scroll-anim": "^0.1.7",
"rc-tween-one": "^0.1.8",
"react": "0.14.x",