简体   繁体   English

无法修复 Antd 模态高度

[英]Unable to fix Antd Modal Height

I am trying to set Antd Modal height to 1000px by default but its not getting applied .我正在尝试将Antd Modal 高度默认设置为 1000px,但未应用 Please suggest where I might be doing wrong.请提出我可能做错的地方。 Below is my code for the Modal.下面是我的模态代码。

<Modal style={{ height: "1000px" }} className="pm" width={600} title="Select" visible={isModalVisible3} footer={null} onCancel={() =>setIsModalVisible3(false)}>
    <span>Sample Text</span>
</Modal>

I even added .pm{height: 1000px;} in my base.css file but no luck我什至在我的base.css文件中添加了.pm{height: 1000px;}但没有运气

Please suggest a workaround.请提出解决方法。

Try this way试试这个方法

<Modal
   bodyStyle={{height: 1000}}
>
   Your content
</Modal>

I am trying to set Antd Modal height to 1000px by default but its not getting applied .我正在尝试将Antd 模态高度默认设置为 1000px,但它没有被应用 Please suggest where I might be doing wrong.请提出我可能做错的地方。 Below is my code for the Modal.下面是我的模态代码。

<Modal style={{ height: "1000px" }} className="pm" width={600} title="Select" visible={isModalVisible3} footer={null} onCancel={() =>setIsModalVisible3(false)}>
    <span>Sample Text</span>
</Modal>

I even added .pm{height: 1000px;} in my base.css file but no luck我什至在我的base.css文件中添加了.pm{height: 1000px;}但没有运气

Please suggest a workaround.请提出解决方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM