( push: PushFn, vnode: VNode, parentComponent: ComponentInternalInstance, slotScopeId?: string, )
| 387 | } |
| 388 | |
| 389 | function renderTeleportVNode( |
| 390 | push: PushFn, |
| 391 | vnode: VNode, |
| 392 | parentComponent: ComponentInternalInstance, |
| 393 | slotScopeId?: string, |
| 394 | ) { |
| 395 | const target = vnode.props && vnode.props.to |
| 396 | const disabled = vnode.props && vnode.props.disabled |
| 397 | if (!target) { |
| 398 | if (!disabled) { |
| 399 | warn(`[@vue/server-renderer] Teleport is missing target prop.`) |
| 400 | } |
| 401 | return [] |
| 402 | } |
| 403 | if (!isString(target)) { |
| 404 | warn( |
| 405 | `[@vue/server-renderer] Teleport target must be a query selector string.`, |
| 406 | ) |
| 407 | return [] |
| 408 | } |
| 409 | ssrRenderTeleport( |
| 410 | push, |
| 411 | push => { |
| 412 | renderVNodeChildren( |
| 413 | push, |
| 414 | vnode.children as VNodeArrayChildren, |
| 415 | parentComponent, |
| 416 | slotScopeId, |
| 417 | ) |
| 418 | }, |
| 419 | target, |
| 420 | disabled || disabled === '', |
| 421 | parentComponent, |
| 422 | ) |
| 423 | } |
no test coverage detected