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