Skip to content

Commit 136d1cd

Browse files
authored
fix(app): use local element to render overlay elements (#86)
1 parent 4e1f2f0 commit 136d1cd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/app/src/app.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ watch(ui.sidebar.sidebarWidth, () => {
2222
}
2323
})
2424
25+
// Nuxt UI Portal element
26+
const appPortal = ref<HTMLElement>()
27+
2528
const activeDocuments = ref<{ id: string, title: string }[]>([])
2629
function detectActiveDocuments() {
2730
activeDocuments.value = host.document.detectActives().map((content) => {
@@ -77,10 +80,7 @@ router.beforeEach((to, from) => {
7780

7881
<template>
7982
<div :class="ui.colorMode.value">
80-
<UApp
81-
:toaster="{ portal: false }"
82-
:modal="{ portal: false }"
83-
>
83+
<UApp :portal="appPortal">
8484
<AppLayout :open="ui.isOpen.value">
8585
<RouterView v-slot="{ Component }">
8686
<Transition
@@ -144,6 +144,8 @@ router.beforeEach((to, from) => {
144144
/>
145145
</UFieldGroup>
146146
</div>
147+
148+
<div ref="appPortal" />
147149
</UApp>
148150
</div>
149151
</template>

0 commit comments

Comments
 (0)