mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.2 KiB
70 lines
1.2 KiB
2 years ago
|
<script setup lang="ts">
|
||
2 years ago
|
import { watch } from "vue";
|
||
|
import useProject from "~/composables/useProject";
|
||
|
import useTabs from "~/composables/useTabs";
|
||
2 years ago
|
|
||
2 years ago
|
|
||
2 years ago
|
const route = useRoute();
|
||
|
const { loadProject, loadTables } = useProject();
|
||
|
const { clearTabs } = useTabs();
|
||
2 years ago
|
|
||
|
onMounted(async () => {
|
||
2 years ago
|
await loadProject(route.params.projectId as string);
|
||
|
await loadTables();
|
||
|
});
|
||
2 years ago
|
|
||
2 years ago
|
watch(
|
||
|
() => route.params.projectId,
|
||
|
async (newVal, oldVal) => {
|
||
|
if (newVal && newVal !== oldVal) {
|
||
2 years ago
|
clearTabs();
|
||
|
await loadProject(newVal as string);
|
||
|
await loadTables();
|
||
2 years ago
|
}
|
||
2 years ago
|
}
|
||
|
);
|
||
2 years ago
|
</script>
|
||
|
|
||
|
<template>
|
||
2 years ago
|
<NuxtLayout>
|
||
|
<template #sidebar>
|
||
|
<v-navigation-drawer permanent>
|
||
|
<DashboardTreeView />
|
||
|
</v-navigation-drawer>
|
||
|
</template>
|
||
|
|
||
|
<v-container>
|
||
|
<DashboardTabView />
|
||
|
</v-container>
|
||
|
</NuxtLayout>
|
||
2 years ago
|
</template>
|
||
|
|
||
|
<style scoped lang="scss">
|
||
|
.nc-container {
|
||
|
.nc-topbar {
|
||
|
position: fixed;
|
||
|
top: 0;
|
||
|
left: 0;
|
||
|
height: 50px;
|
||
|
width: 100%;
|
||
2 years ago
|
z-index: 5;
|
||
2 years ago
|
}
|
||
|
|
||
|
.nc-sidebar {
|
||
|
position: fixed;
|
||
|
top: 50px;
|
||
|
left: 0;
|
||
|
height: calc(100% - 50px);
|
||
|
width: 250px;
|
||
|
}
|
||
|
|
||
|
.nc-content {
|
||
|
position: fixed;
|
||
|
top: 50px;
|
||
|
left: 250px;
|
||
|
height: calc(100% - 50px);
|
||
|
width: calc(100% - 250px);
|
||
|
}
|
||
|
}
|
||
|
</style>
|