fix: drawer throw error when destroy #2254

pull/2284/head
tangjinzhou 2020-05-18 22:22:27 +08:00
parent be8db722b9
commit a53ebca41d
1 changed files with 0 additions and 12 deletions

View File

@ -135,21 +135,9 @@ const Drawer = {
this.setLevelDomTransform(false, true);
}
document.body.style.overflow = '';
// 拦不住。。直接删除;
if (this.getSelfContainer) {
this.container.parentNode.removeChild(this.container);
}
}
this.sFirstEnter = false;
clearTimeout(this.timeout);
// 需要 didmount 后也会渲染,直接 unmount 将不会渲染,加上判断.
if (this.renderComponent) {
this.renderComponent({
afterClose: this.removeContainer,
onClose() {},
visible: false,
});
}
},
methods: {
onKeyDown(e) {