fix: drawer throw error when destroy #2254
parent
be8db722b9
commit
a53ebca41d
|
@ -135,21 +135,9 @@ const Drawer = {
|
||||||
this.setLevelDomTransform(false, true);
|
this.setLevelDomTransform(false, true);
|
||||||
}
|
}
|
||||||
document.body.style.overflow = '';
|
document.body.style.overflow = '';
|
||||||
// 拦不住。。直接删除;
|
|
||||||
if (this.getSelfContainer) {
|
|
||||||
this.container.parentNode.removeChild(this.container);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
this.sFirstEnter = false;
|
this.sFirstEnter = false;
|
||||||
clearTimeout(this.timeout);
|
clearTimeout(this.timeout);
|
||||||
// 需要 didmount 后也会渲染,直接 unmount 将不会渲染,加上判断.
|
|
||||||
if (this.renderComponent) {
|
|
||||||
this.renderComponent({
|
|
||||||
afterClose: this.removeContainer,
|
|
||||||
onClose() {},
|
|
||||||
visible: false,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onKeyDown(e) {
|
onKeyDown(e) {
|
||||||
|
|
Loading…
Reference in New Issue