-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
162 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<script setup lang="ts"> | ||
import type { LayoutMode } from '@/store/app' | ||
const value = defineModel<LayoutMode>('value', { required: true }) | ||
</script> | ||
|
||
<template> | ||
<div class="flex-center gap-4"> | ||
<n-tooltip placement="bottom" trigger="hover"> | ||
<template #trigger> | ||
<n-el | ||
:class="{ | ||
'outline outline-2': value === 'leftMenu', | ||
}" | ||
class="grid grid-cols-[20%_1fr] grid-rows-[20%_1fr] outline-[var(--primary-color)] hover:(outline outline-2)" | ||
@click="value = 'leftMenu'" | ||
> | ||
<div class="bg-[var(--primary-color)] row-span-2" /> | ||
<div class="bg-[var(--primary-color-suppl)]" /> | ||
<div class="bg-[var(--divider-color)]" /> | ||
</n-el> | ||
</template> | ||
<span> {{ $t('app.leftMenu') }} </span> | ||
</n-tooltip> | ||
|
||
<n-tooltip placement="bottom" trigger="hover"> | ||
<template #trigger> | ||
<n-el | ||
:class="{ | ||
'outline outline-2': value === 'topMenu', | ||
}" | ||
class="grid grid-rows-[30%_1fr] outline-[var(--primary-color)] hover:(outline outline-2)" | ||
@click="value = 'topMenu'" | ||
> | ||
<div class="bg-[var(--primary-color)]" /> | ||
<div class="bg-[var(--divider-color)]" /> | ||
</n-el> | ||
</template> | ||
<span> {{ $t('app.topMenu') }} </span> | ||
</n-tooltip> | ||
</div> | ||
</template> | ||
|
||
<style lang="scss"> | ||
.grid{ | ||
height: 60px; | ||
width: 86px; | ||
gap:0.4em; | ||
padding: 0.4em; | ||
box-shadow: var(--box-shadow-1); | ||
border-radius: var(--border-radius); | ||
} | ||
.grid > div{ | ||
border-radius: var(--border-radius); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script setup lang="ts"> | ||
import leftMenu from './leftMenu.layout.vue' | ||
import topMenu from './topMenu.layout.vue' | ||
import { useAppStore } from '@/store/app' | ||
const appStore = useAppStore() | ||
const layoutMap = { | ||
leftMenu, | ||
topMenu, | ||
} | ||
</script> | ||
|
||
<template> | ||
<component :is="layoutMap[appStore.layoutMode]" /> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<script lang="ts" setup> | ||
import { | ||
BackTop, | ||
FullScreen, | ||
Logo, | ||
Menu, | ||
Notices, | ||
Search, | ||
Setting, | ||
TabBar, | ||
UserCenter, | ||
} from './components' | ||
import { useAppStore, useRouteStore } from '@/store' | ||
const routeStore = useRouteStore() | ||
const appStore = useAppStore() | ||
</script> | ||
|
||
<template> | ||
<n-layout class="wh-full" embedded> | ||
<n-layout | ||
class="h-full flex flex-col" content-style="display: flex;flex-direction: column;min-height:100%;" | ||
embedded :native-scrollbar="false" | ||
> | ||
<n-layout-header bordered position="absolute" class="z-1"> | ||
<div class="h-60px flex-y-center justify-between shrink-0"> | ||
<Logo v-if="appStore.showLogo" /> | ||
<Menu mode="horizontal" responsive /> | ||
<div class="flex-y-center gap-1 h-full p-x-xl"> | ||
<Search /> | ||
<Notices /> | ||
<FullScreen /> | ||
<DarkModeSwitch /> | ||
<LangsSwitch /> | ||
<Setting /> | ||
<UserCenter /> | ||
</div> | ||
</div> | ||
<TabBar v-if="appStore.showTabs" class="h-45px" /> | ||
</n-layout-header> | ||
<div class="flex-1 p-16px flex flex-col"> | ||
<div class="h-60px" /> | ||
<div v-if="appStore.showTabs" class="h-45px" /> | ||
<router-view v-slot="{ Component, route }" class="flex-1"> | ||
<transition :name="appStore.transitionAnimation" mode="out-in"> | ||
<keep-alive :include="routeStore.cacheRoutes"> | ||
<component :is="Component" v-if="appStore.loadFlag" :key="route.fullPath" /> | ||
</keep-alive> | ||
</transition> | ||
</router-view> | ||
<div v-if="appStore.showFooter" class="h-40px" /> | ||
</div> | ||
<n-layout-footer v-if="appStore.showFooter" bordered position="absolute" class="h-40px flex-center"> | ||
{{ appStore.footerText }} | ||
</n-layout-footer> | ||
<BackTop /> | ||
</n-layout> | ||
</n-layout> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters