mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 05:28:37 +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) {
|
if (this.props.show) {
|
||||||
this.handleEntered();
|
this.handleEntered();
|
||||||
}
|
}
|
||||||
document.body.addEventListener('click', this.handleRootClick);
|
document.body.addEventListener('click', this.handleRootClick, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
if (this.props.show) {
|
if (this.props.show) {
|
||||||
this.handleExited();
|
this.handleExited();
|
||||||
}
|
}
|
||||||
document.body.removeEventListener('click', this.handleRootClick);
|
document.body.removeEventListener('click', this.handleRootClick, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
contentRef = (ref: any) => (this.contentDom = ref);
|
contentRef = (ref: any) => (this.contentDom = ref);
|
||||||
|
Loading…
Reference in New Issue
Block a user