源码:
//defaultActiveKey:默认选择的版面
//activeKey:切换后的版面
<Tabs defaultActiveKey="0" activeKey={this.state.activeIndex} onChange={(key) => {
//切换当前版面
this.setState({
activeIndex: key
}, () => {
//切换结束后,进行你要进行的操作
this.function1()
});
}}>
</Tabs>
源码:
//defaultActiveKey:默认选择的版面
//activeKey:切换后的版面
<Tabs defaultActiveKey="0" activeKey={this.state.activeIndex} onChange={(key) => {
//切换当前版面
this.setState({
activeIndex: key
}, () => {
//切换结束后,进行你要进行的操作
this.function1()
});
}}>
</Tabs>