Ant-design: Form.Item装多个getFieldDecorator包装的child。

Created on 16 Nov 2016  ·  5Comments  ·  Source: ant-design/ant-design

image
image
我想在Form.Item下面装两个child,能否给一个demo,文档不是很明白。谢谢了。
试过Form.Item里面嵌套Form.Item,虽然可以解决问题,但是不够优雅。

Most helpful comment

我是封装了一个组件实现的。https://github.com/ant-design/ant-design/issues/3866

All 5 comments

可以参考 https://ant.design/components/form/#components-form-demo-validate-static 最后一个选择日期的做法

看到了,的确可以解决但是还是嵌套啊。文档说的是建议包装一个element,但是没有说必须(可能有些钻牛角尖)。但是还是希望有其他更优雅的写法,谢谢@infeng

我是封装了一个组件实现的。https://github.com/ant-design/ant-design/issues/3866

楼上的方案是靠谱的 👍

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

Was this page helpful?
0 / 5 - 0 ratings