forked from p96170835/amis
修复 tabs 初始可能不显示 tab 的问题
This commit is contained in:
parent
dc15298c84
commit
0a2ca2a0cd
|
@ -64,6 +64,10 @@ export default class Tabs extends React.Component<TabsProps, TabsState> {
|
|||
this.switchTo = this.switchTo.bind(this);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.autoJumpToNeighbour();
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps: TabsProps) {
|
||||
const props = this.props;
|
||||
|
||||
|
@ -107,6 +111,10 @@ export default class Tabs extends React.Component<TabsProps, TabsState> {
|
|||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
this.autoJumpToNeighbour();
|
||||
}
|
||||
|
||||
autoJumpToNeighbour() {
|
||||
const {
|
||||
tabs,
|
||||
data
|
||||
|
|
Loading…
Reference in New Issue