UNPKG

accessibleprimevue

Version:

Note: This is the forked version of the Primefaces/PrimeVue repository. Since V3 has reached its EOL this is use to fix identified accessibility bugs in the v3 version of primevue. PrimeVue is an open source UI library for Vue featuring a rich set of 80+

43 lines (38 loc) 975 B
import { DomHandler } from 'primevue/utils'; import { renderSlot, openBlock, createBlock, Teleport, createCommentVNode } from 'vue'; var script = { name: 'Portal', props: { appendTo: { type: [String, Object], "default": 'body' }, disabled: { type: Boolean, "default": false } }, data: function data() { return { mounted: false }; }, mounted: function mounted() { this.mounted = DomHandler.isClient(); }, computed: { inline: function inline() { return this.disabled || this.appendTo === 'self'; } } }; function render(_ctx, _cache, $props, $setup, $data, $options) { return $options.inline ? renderSlot(_ctx.$slots, "default", { key: 0 }) : $data.mounted ? (openBlock(), createBlock(Teleport, { key: 1, to: $props.appendTo }, [renderSlot(_ctx.$slots, "default")], 8, ["to"])) : createCommentVNode("", true); } script.render = render; export { script as default };