fix(Popup): adjust teleport handler
This commit is contained in:
+3
-5
@@ -1,6 +1,6 @@
|
|||||||
// Utils
|
// Utils
|
||||||
import { Teleport, Transition } from 'vue';
|
import { Teleport, Transition } from 'vue';
|
||||||
import { createNamespace, isDef, isFunction } from '../utils';
|
import { createNamespace, isDef } from '../utils';
|
||||||
import { on, off, preventDefault } from '../utils/dom/event';
|
import { on, off, preventDefault } from '../utils/dom/event';
|
||||||
import { getScroller } from '../utils/dom/scroll';
|
import { getScroller } from '../utils/dom/scroll';
|
||||||
|
|
||||||
@@ -319,11 +319,9 @@ export default createComponent({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { teleport } = this;
|
if (this.teleport) {
|
||||||
if (teleport) {
|
|
||||||
const to = isFunction(teleport) ? teleport() : teleport;
|
|
||||||
return (
|
return (
|
||||||
<Teleport to={to}>
|
<Teleport to={this.teleport}>
|
||||||
{this.genOverlay()}
|
{this.genOverlay()}
|
||||||
{this.genPopup()}
|
{this.genPopup()}
|
||||||
</Teleport>
|
</Teleport>
|
||||||
|
|||||||
Reference in New Issue
Block a user