Home  >  Q&A  >  body text

javascript - In antd Tabs, among multiple tab pages, only the first TabPane is rendered by default, and the bottom of other TabPane is empty?

<Tabs defaultActiveKey="1" onChange={this.callback}>
                <TabPane tab="基础编目" key="1"><BaseCatalog appData={this.baseIF}/></TabPane>
                <TabPane tab="自定义编目" key="2"><CustomCatalog appData={this.customIF}/></TabPane>
            </Tabs>

In this case, the BaseCatalog component is rendered, but the CustomCatalog does not come out. If you click the second tab manually, the CustomCatalog will come out, and it will be normal in the future. Is there any way to make it show both of these from the start?

过去多啦不再A梦过去多啦不再A梦2710 days ago1745

reply all(1)I'll reply

  • 世界只因有你

    世界只因有你2017-05-19 10:23:32

    I have solved it myself, thank you

    reply
    0
  • Cancelreply