Ant Design 为了支持 Tabs 的延迟渲染,可以使用 lazyLoad 属性来实现只在需要时才渲染组件。代码示例如下:
import { Tabs } from 'antd';
const { TabPane } = Tabs;
function callback(key) {
console.log(key);
}
ReactDOM.render(
Content of Tab Pane 1
Content of Tab Pane 2
Content of Tab Pane 3
,
mountNode,
);