mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 11:10:01 +08:00
perf(📦): remove @ant-design/css-animation (#28201)
* perf(📦): remove @ant-design/css-animation
* fix test case
* fix test case
This commit is contained in:
parent
5e42ba482a
commit
28d3d9038f
@ -1,5 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import TransitionEvents from '@ant-design/css-animation/lib/Event';
|
||||
import { supportRef, composeRef } from 'rc-util/lib/ref';
|
||||
import raf from './raf';
|
||||
import { ConfigConsumer, ConfigConsumerProps, CSPConfig, ConfigContext } from '../config-provider';
|
||||
@ -106,8 +105,10 @@ export default class Wave extends React.Component<{ insertExtraNode?: boolean }>
|
||||
if (insertExtraNode) {
|
||||
node.appendChild(extraNode);
|
||||
}
|
||||
TransitionEvents.addStartEventListener(node, this.onTransitionStart);
|
||||
TransitionEvents.addEndEventListener(node, this.onTransitionEnd);
|
||||
['transition', 'animation'].forEach(name => {
|
||||
node.addEventListener(`${name}start`, this.onTransitionStart);
|
||||
node.addEventListener(`${name}end`, this.onTransitionEnd);
|
||||
});
|
||||
};
|
||||
|
||||
onTransitionStart = (e: AnimationEvent) => {
|
||||
@ -190,8 +191,10 @@ export default class Wave extends React.Component<{ insertExtraNode?: boolean }>
|
||||
if (insertExtraNode && this.extraNode && node.contains(this.extraNode)) {
|
||||
node.removeChild(this.extraNode);
|
||||
}
|
||||
TransitionEvents.removeStartEventListener(node, this.onTransitionStart);
|
||||
TransitionEvents.removeEndEventListener(node, this.onTransitionEnd);
|
||||
['transition', 'animation'].forEach(name => {
|
||||
node.removeEventListener(`${name}start`, this.onTransitionStart);
|
||||
node.removeEventListener(`${name}end`, this.onTransitionEnd);
|
||||
});
|
||||
}
|
||||
|
||||
renderWave = ({ csp }: ConfigConsumerProps) => {
|
||||
|
@ -107,7 +107,6 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@ant-design/colors": "^5.0.0",
|
||||
"@ant-design/css-animation": "^1.7.2",
|
||||
"@ant-design/icons": "^4.3.0",
|
||||
"@ant-design/react-slick": "~0.27.0",
|
||||
"@babel/runtime": "^7.11.2",
|
||||
|
Loading…
Reference in New Issue
Block a user