2.1.9 • Published 5 years ago

zjx-react-form v2.1.9

Weekly downloads
84
License
ISC
Repository
-
Last release
5 years ago

####安装

npm install zjx-react-form

####引入

import {Form,FormItem} from "zjx-react-form";

####使用

@Form.create()
class FormComponent extends Component {

    constructor(props) {
        super(props);
    }

    checkForm = () => {
        const  {form:{validateFields}} = this.props
        validateFields((err,values)=>{
            console.log(err,values)
        })
    };

    onNNoteChange = (e)=>{
        console.log(123)
    }

    render() {
        const {form: {getFieldDecorator}} = this.props;
        return <Fragment>
                <FormItem label={"note"}>
                    {getFieldDecorator("note", {
                        initValue: 1234 || "",
                        rules: [{
                            require: true,
                        }]
                    })(<input onChange={this.onNNoteChange}/>)}
                </FormItem>
                <FormItem label={"text"}>
                    {getFieldDecorator("text", {})(<input/>)}
                </FormItem>
            <button onClick={this.checkForm}>查看表单值</button>
        </Fragment>;
    }
}

####码云开源地址 https://gitee.com/onezilc/my-react-form.git

2.1.9

5 years ago

2.1.8

5 years ago

2.1.7

5 years ago

2.1.6

5 years ago

2.1.5

5 years ago

2.1.4

5 years ago

2.1.3

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago