mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-04 21:19:01 +08:00
改成捕获时期
This commit is contained in:
parent
aa6d38600b
commit
3fb4114461
@ -69,14 +69,14 @@ export class Drawer extends React.Component<DrawerProps, DrawerState> {
|
||||
if (this.props.show) {
|
||||
this.handleEntered();
|
||||
}
|
||||
document.body.addEventListener('click', this.handleRootClick);
|
||||
document.body.addEventListener('click', this.handleRootClick, true);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
if (this.props.show) {
|
||||
this.handleExited();
|
||||
}
|
||||
document.body.removeEventListener('click', this.handleRootClick);
|
||||
document.body.removeEventListener('click', this.handleRootClick, true);
|
||||
}
|
||||
|
||||
contentRef = (ref: any) => (this.contentDom = ref);
|
||||
|
Loading…
Reference in New Issue
Block a user