Skip to content

Commit

Permalink
fix: drawer throw error when destroy #2254
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed May 18, 2020
1 parent be8db72 commit a53ebca
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions components/vc-drawer/src/Drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a53ebca

Please sign in to comment.