mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-18 11:18:14 +08:00
Fix Tag with wave effect
This commit is contained in:
parent
4d7f1b191f
commit
589415ed95
@ -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');
|
||||||
|
@ -142,6 +142,7 @@ class Tag extends React.Component<TagProps, TagState> {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
|
<Wave>
|
||||||
<Animate
|
<Animate
|
||||||
component=""
|
component=""
|
||||||
showProp="data-show"
|
showProp="data-show"
|
||||||
@ -149,10 +150,9 @@ class Tag extends React.Component<TagProps, TagState> {
|
|||||||
transitionAppear
|
transitionAppear
|
||||||
onEnd={this.animationEnd}
|
onEnd={this.animationEnd}
|
||||||
>
|
>
|
||||||
<Wave>
|
|
||||||
{tag}
|
{tag}
|
||||||
</Wave>
|
|
||||||
</Animate>
|
</Animate>
|
||||||
|
</Wave>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user