AntDesign TabPane min-height 100%

血红的双手。 提交于 2020-12-06 06:35:15

问题


Using Ant.Design Tabs https://ant.design/components/tabs/

How can I set styling on TabPane so that it's min-height is always 100% height of the window even when it's empty?

Below example should cover the window with color #F5F5F5


回答1:


This has worked for me.

<TabPane tab={tab.title} key={index}>
<Row>
  <Col style={{minHeight: "100vh", maxheight: "100vh"}}>
   Test
  </Col>
</Row>
</TabPane>



回答2:


So this has worked for me too

   <Tabs
      onChange={() => {
      console.log("oi");
      }}
      type="card"
      style={{ background: "blue", height: "100%" }}
   >
   <TabPane
      tab="Tab 1"
      key="1"
      style={{ minHeight: "100vh", background: "red" }}
   >
      Content of Tab Pane 1
   </TabPane>
 </Tabs>


来源:https://stackoverflow.com/questions/57546564/antdesign-tabpane-min-height-100

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!