Skip to content

Commit

Permalink
refactor(alert): modify code style
Browse files Browse the repository at this point in the history
modify code style

re #77
  • Loading branch information
Tzz1194593491 committed Jul 17, 2024
1 parent ee05c01 commit 1e3af1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/alert/alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,10 @@ export default class Alert extends Component<AlertProps> {

ready() {
this.nodeRef.current?.addEventListener('transitionend', this.handleCloseEnd);
this.needUninstall.add(() => this.nodeRef.current?.removeEventListener('transitionend', this.handleCloseEnd));
}

uninstall() {
this.needUninstall.forEach((uninstall) => uninstall());
this.nodeRef.current?.removeEventListener('transitionend', this.handleCloseEnd);
}

render(props: AlertProps) {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './alert';
export * from './affix';
export * from './alert';
export * from './avatar';
export * from './back-top';
export * from './button';
Expand Down

0 comments on commit 1e3af1d

Please sign in to comment.