main layout
This commit is contained in:
parent
62990170de
commit
f1e6e8b8d3
38 changed files with 1353 additions and 20 deletions
7
src/layouts/FullContent.vue
Normal file
7
src/layouts/FullContent.vue
Normal file
|
@ -0,0 +1,7 @@
|
|||
<template>
|
||||
<div class="w-full h-full flex flex-row gap-4">
|
||||
<div class="max-w-full flex grow gap-4 md:flex-row flex-col">
|
||||
<slot name="main"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
36
src/layouts/Sidebar.vue
Normal file
36
src/layouts/Sidebar.vue
Normal file
|
@ -0,0 +1,36 @@
|
|||
<template>
|
||||
<div class="w-full h-full flex flex-row gap-4">
|
||||
<div
|
||||
class="flex-col gap-4 md:min-w-72 lg:min-w-96"
|
||||
:class="defaultRoute && defaultSidebar ? 'flex w-full md:w-72 lg:w-96' : 'hidden md:flex'"
|
||||
>
|
||||
<slot name="sidebar"></slot>
|
||||
</div>
|
||||
<div class="max-w-full grow flex-col gap-4" :class="defaultRoute && defaultSidebar ? 'hidden md:flex' : 'flex'">
|
||||
<slot name="main"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { defineComponent } from "vue";
|
||||
import { mapState, mapActions } from "pinia";
|
||||
import { useNavigationStore } from "../stores/admin/navigation";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
export default defineComponent({
|
||||
props: {
|
||||
defaultSidebar: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapState(useNavigationStore, ["activeLink"]),
|
||||
defaultRoute() {
|
||||
return this.activeLink == null;
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue