mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 21:19:37 +08:00
feat: add createForm to Form
This commit is contained in:
parent
422b0d19f7
commit
d8201c2752
@ -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() {
|
||||
|
@ -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() {
|
||||
|
@ -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({
|
||||
|
@ -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/';
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user