fix: Tab cant change

This commit is contained in:
liujuping.liujupin 2021-09-29 12:36:32 +08:00 committed by lihao.ylh
parent 6fad8fb86a
commit c21d7f13f3

View File

@ -140,10 +140,13 @@ export function leafWrapper(Comp: types.IBaseRenderer, {
}
componentWillReceiveProps(nextProps: any) {
const { _leaf, __tag, children, ...rest } = nextProps;
if (nextProps.__tag === this.state.__tag) {
this.setState({
nodeProps: rest,
});
return null;
}
const { _leaf, __tag, children, ...rest } = nextProps;
if (_leaf && this.leaf && _leaf !== this.leaf) {
this.disposeFunctions.forEach(fn => fn());
this.disposeFunctions = [];