|
@ -18,12 +18,10 @@ export default { |
|
|
this.queryParentDom = document.querySelector(this.to); |
|
|
this.queryParentDom = document.querySelector(this.to); |
|
|
if (!this.queryParentDom) return; |
|
|
if (!this.queryParentDom) return; |
|
|
|
|
|
|
|
|
this.queryParentDom.appendChild(this.addDom = this.$el); |
|
|
this.queryParentDom.appendChild(this.$el); |
|
|
}, |
|
|
}, |
|
|
beforeDestroy() { |
|
|
beforeDestroy() { |
|
|
if (!this.queryParentDom || !this.queryParentDom.contains(this.addDom)) return; |
|
|
this.$el?.remove?.() |
|
|
|
|
|
|
|
|
this.queryParentDom.removeChild(this.addDom); |
|
|
|
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|