mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-24 10:20:19 +08:00
fix(Popup): adjust teleport handler
This commit is contained in:
parent
52b187692b
commit
54a8608078
@ -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>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user