|
|
@ -8,7 +8,18 @@ const { te, t } = useI18n() |
|
|
|
|
|
|
|
|
|
|
|
const { hasSidebar } = useSidebar('nc-left-sidebar') |
|
|
|
const { hasSidebar } = useSidebar('nc-left-sidebar') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const refreshSidebar = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
useTitle(route.meta?.title && te(route.meta.title) ? `${t(route.meta.title)} | NocoDB` : 'NocoDB') |
|
|
|
useTitle(route.meta?.title && te(route.meta.title) ? `${t(route.meta.title)} | NocoDB` : 'NocoDB') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
watch(hasSidebar, (val) => { |
|
|
|
|
|
|
|
if (!val) { |
|
|
|
|
|
|
|
refreshSidebar.value = true |
|
|
|
|
|
|
|
nextTick(() => { |
|
|
|
|
|
|
|
refreshSidebar.value = false |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<script lang="ts"> |
|
|
|
<script lang="ts"> |
|
|
@ -20,7 +31,7 @@ export default { |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="w-full h-full"> |
|
|
|
<div class="w-full h-full"> |
|
|
|
<Teleport :to="hasSidebar ? '#nc-sidebar-left' : null" :disabled="!hasSidebar"> |
|
|
|
<Teleport :to="hasSidebar ? '#nc-sidebar-left' : null" :disabled="!hasSidebar"> |
|
|
|
<slot :key="$route.name" name="sidebar" /> |
|
|
|
<slot v-if="!refreshSidebar" name="sidebar" /> |
|
|
|
</Teleport> |
|
|
|
</Teleport> |
|
|
|
|
|
|
|
|
|
|
|
<a-layout-content> |
|
|
|
<a-layout-content> |
|
|
|