The pits encountered by the React+antd Form form

The pits encountered by the React+antd Form form

The pits encountered by the React+antd Form form

Statement of needs

Because the textarea in antd comes with the number of words displayed in the input text, and the input must be written separately, and some verification rules must be written by yourself. The time is urgent, and the code directly

Insert picture description here

Remember that there can only be one element in "form.item", and there is a description in the document, otherwise when you click the submit button, even if you have filled in the name value in the input, it will not be available, so add a div outside and put <form.item> is packaged with span (display the number of input words). Insert picture description here
Join the submit operation is placed in the Modal, if you don’t want to use the submit button that comes with the modal form

Insert picture description here

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_44994372/article/details/114255295