3

使用 Ant.Design 标签https://ant.design/components/tabs/

如何在 TabPane 上设置样式,使其最小高度始终为窗口的 100% 高度,即使它是空的?

下面的示例应该用颜色#F5F5F5 覆盖窗口

编辑史诗花-tg0g3

4

2 回答 2

2

这对我有用。

<TabPane tab={tab.title} key={index}>
<Row>
  <Col style={{minHeight: "100vh", maxheight: "100vh"}}>
   Test
  </Col>
</Row>
</TabPane>
于 2019-08-18T17:12:36.077 回答
1

所以这也对我有用

   <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>
于 2020-02-17T18:27:55.730 回答