UNPKG

primevue

Version:

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![npm version](https://badge.fury.io/js/primevue.svg)](https://badge.fury.io/js/primevue) [![Discord Chat](https://img.shields.io/discord/55794023

50 lines (44 loc) 1.23 kB
this.primevue = this.primevue || {}; this.primevue.portal = (function (utils, vue) { 'use strict'; var script = { name: 'Portal', props: { appendTo: { type: String, default: 'body' }, disabled: { type: Boolean, default: false } }, data() { return { mounted: false }; }, mounted() { this.mounted = utils.DomHandler.isClient(); }, computed: { inline() { return this.disabled || this.appendTo === 'self'; } } }; function render(_ctx, _cache, $props, $setup, $data, $options) { return ($options.inline) ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }) : ($data.mounted) ? (vue.openBlock(), vue.createBlock(vue.Teleport, { key: 1, to: $props.appendTo }, [ vue.renderSlot(_ctx.$slots, "default") ], 8, ["to"])) : vue.createCommentVNode("", true) } script.render = render; return script; })(primevue.utils, Vue);