mirror of
https://github.com/youzan/vant.git
synced 2025-12-24 02:02:09 +08:00
[bugfix] Dialog: overlay incorrect locate when use getContainer (#3041)
This commit is contained in:
@@ -60,9 +60,11 @@ function Toast(options = {}) {
|
||||
clearTimeout(toast.timer);
|
||||
queue = queue.filter(item => item !== toast);
|
||||
|
||||
if (document.body.contains(toast.$el)) {
|
||||
document.body.removeChild(toast.$el);
|
||||
const parent = toast.$el.parentNode;
|
||||
if (parent) {
|
||||
parent.removeChild(toast.$el);
|
||||
}
|
||||
|
||||
toast.$destroy();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user