Skip to content

Commit

Permalink
fix: 修复多个弹窗仅一个需要摧毁时 背景也被移除的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Qymh committed Oct 14, 2019
1 parent aa52075 commit 4840f88
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/@qymh/q-select/src/layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,8 +542,10 @@ class Layer {
*/
destroySelect() {
this.touchs.forEach(v => v.destroy());
Dom.remove(document.body, Dom.find(`q-select-bk`));
Dom.remove(document.body, Dom.find(`q-select--${this.id}`));
if (Dom.findAll('q-select').length === 0) {
Dom.remove(document.body, Dom.find(`q-select-bk`));
}
// eslint-disable-next-line
(this as any).__proto__ = null;
for (const key in this) {
Expand Down

0 comments on commit 4840f88

Please sign in to comment.