fix(Popup): adjust teleport handler

This commit is contained in:
chenjiahan 2020-08-21 11:03:21 +08:00
parent 52b187692b
commit 54a8608078

View File

@ -1,6 +1,6 @@
// Utils
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 { getScroller } from '../utils/dom/scroll';
@ -319,11 +319,9 @@ export default createComponent({
},
render() {
const { teleport } = this;
if (teleport) {
const to = isFunction(teleport) ? teleport() : teleport;
if (this.teleport) {
return (
<Teleport to={to}>
<Teleport to={this.teleport}>
{this.genOverlay()}
{this.genPopup()}
</Teleport>