mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Fixed #3802 - Improve folder structure for nuxt configurations
This commit is contained in:
parent
851950270b
commit
f5fe822afb
563 changed files with 1703 additions and 1095 deletions
41
components/lib/portal/Portal.vue
Normal file
41
components/lib/portal/Portal.vue
Normal file
|
@ -0,0 +1,41 @@
|
|||
<template>
|
||||
<template v-if="inline">
|
||||
<slot></slot>
|
||||
</template>
|
||||
<template v-else-if="mounted">
|
||||
<Teleport :to="appendTo">
|
||||
<slot></slot>
|
||||
</Teleport>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { DomHandler } from 'primevue/utils';
|
||||
|
||||
export default {
|
||||
name: 'Portal',
|
||||
props: {
|
||||
appendTo: {
|
||||
type: String,
|
||||
default: 'body'
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mounted: false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.mounted = DomHandler.isClient();
|
||||
},
|
||||
computed: {
|
||||
inline() {
|
||||
return this.disabled || this.appendTo === 'self';
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue