使用 Ant.Design 标签https://ant.design/components/tabs/
如何在 TabPane 上设置样式,使其最小高度始终为窗口的 100% 高度,即使它是空的?
下面的示例应该用颜色#F5F5F5 覆盖窗口
这对我有用。
<TabPane tab={tab.title} key={index}>
<Row>
<Col style={{minHeight: "100vh", maxheight: "100vh"}}>
Test
</Col>
</Row>
</TabPane>
所以这也对我有用
<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>