Fix Tag with wave effect

This commit is contained in:
afc163 2018-08-11 15:46:45 +08:00
parent 4d7f1b191f
commit 589415ed95
2 changed files with 13 additions and 10 deletions

View File

@ -18,6 +18,9 @@ export default class Wave extends React.Component<{insertExtraNode?: boolean}> {
} }
onClick = (node: HTMLElement) => { onClick = (node: HTMLElement) => {
if (node.className.indexOf('-leave') >= 0) {
return;
}
this.removeExtraStyleNode(); this.removeExtraStyleNode();
const { insertExtraNode } = this.props; const { insertExtraNode } = this.props;
const extraNode = document.createElement('div'); const extraNode = document.createElement('div');

View File

@ -142,17 +142,17 @@ class Tag extends React.Component<TagProps, TagState> {
</div> </div>
); );
return ( return (
<Animate <Wave>
component="" <Animate
showProp="data-show" component=""
transitionName={`${prefixCls}-zoom`} showProp="data-show"
transitionAppear transitionName={`${prefixCls}-zoom`}
onEnd={this.animationEnd} transitionAppear
> onEnd={this.animationEnd}
<Wave> >
{tag} {tag}
</Wave> </Animate>
</Animate> </Wave>
); );
} }
} }