提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
🧐 问题描述
💻 示例代码
<ProForm
name="generalRule"
layout="horizontal"
submitter={false}
grid
rowProps={{ gutter: [16, 8] }}
>
<ProFormList
name={name}
copyIconProps={false}
colProps={{ span: 24 }}>
<ProFormSelect
colProps={{ span: 12 }}
/>
<ProFormSelect
colProps={{ span: 12}}
/>
其中ProFormList中ProFormSelect的colProps会无效,原因是ant-pro-form-list-container并不是一个有效的ant-row,需要把ant-pro-form-list-container设为flex布局
目前有两个解决方案:
<ProFormList itemContainerRender={(dom) => [<Row key="row" gutter={[8, 8]} style={{ marginBottom: 8 }}>{dom}]} />
或者
请问还有更好的方案吗?
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
🧐 问题描述
💻 示例代码
<ProForm
name="generalRule"
layout="horizontal"
submitter={false}
grid
rowProps={{ gutter: [16, 8] }}
>
<ProFormList
name={name}
copyIconProps={false}
colProps={{ span: 24 }}>
<ProFormSelect
colProps={{ span: 12 }}
/>
<ProFormSelect
colProps={{ span: 12}}
/>
其中ProFormList中ProFormSelect的colProps会无效,原因是ant-pro-form-list-container并不是一个有效的ant-row,需要把ant-pro-form-list-container设为flex布局
目前有两个解决方案:
<ProFormList itemContainerRender={(dom) => [<Row key="row" gutter={[8, 8]} style={{ marginBottom: 8 }}>{dom}]} />
或者
请问还有更好的方案吗?