mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Popup): legacy removeNode
This commit is contained in:
parent
5d2cd516ed
commit
34ff811102
@ -3,7 +3,6 @@ import { context } from './context';
|
|||||||
|
|
||||||
// Utils
|
// Utils
|
||||||
import { on, off, preventDefault } from '../../utils/dom/event';
|
import { on, off, preventDefault } from '../../utils/dom/event';
|
||||||
import { removeNode } from '../../utils/dom/node';
|
|
||||||
import { getScroller } from '../../utils/dom/scroll';
|
import { getScroller } from '../../utils/dom/scroll';
|
||||||
|
|
||||||
// Mixins
|
// Mixins
|
||||||
@ -85,15 +84,9 @@ export function PopupMixin(options = {}) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.removeLock();
|
|
||||||
|
|
||||||
if (this.opened) {
|
if (this.opened) {
|
||||||
this.removeLock();
|
this.removeLock();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.getContainer) {
|
|
||||||
removeNode(this.$refs.root);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/* istanbul ignore next */
|
/* istanbul ignore next */
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
export function removeNode(el: Node) {
|
|
||||||
const parent = el.parentNode;
|
|
||||||
|
|
||||||
if (parent) {
|
|
||||||
parent.removeChild(el);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user