-
Notifications
You must be signed in to change notification settings - Fork 23
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
19 changed files
with
315 additions
and
164 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 |
---|---|---|
@@ -1,10 +1,11 @@ | ||
// import { useStore } from '@/store' | ||
import { computed } from 'vue'; | ||
import { useAppStore } from '@/store/modules/app'; | ||
import { appConfig } from '@/store/types'; | ||
|
||
export const getAppCollapseMenu = () => { | ||
// const store = useStore() | ||
const appStore = useAppStore(); | ||
const appConfigMode = computed(() => appStore.getAppConfigMode); | ||
const appConfigMode = computed<appConfig>(() => appStore.getAppConfigMode); | ||
return { appConfigMode }; | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<template> | ||
<el-menu | ||
ref="menu" | ||
:default-active="activeMenyu" | ||
:active="activeMenyu" | ||
class="horizontal-header-menu" | ||
mode="horizontal" | ||
router | ||
> | ||
<app-link | ||
v-for="menusRoute in usePermissionStoreHook().wholeMenus" | ||
:key="menusRoute.path" | ||
:to="menusRoute.path" | ||
> | ||
<el-menu-item :index="menusRoute.path"> | ||
<item | ||
class-name="menu-item-svg" | ||
:icon="menusRoute.meta && menusRoute.meta.icon" | ||
:title="menusRoute.meta?.title" | ||
/> | ||
</el-menu-item> | ||
</app-link> | ||
</el-menu> | ||
</template> | ||
<script setup lang="ts"> | ||
import Item from './Item.vue'; | ||
import AppLink from './Link.vue'; | ||
import { usePermissionStoreHook } from '@/store/modules/permission'; | ||
import { computed } from 'vue'; | ||
import { useRoute } from 'vue-router'; | ||
const route = useRoute(); | ||
const activeMenyu = computed<string>(() => { | ||
const { path } = route; | ||
return '/' + path.split('/')[1]; | ||
}); | ||
</script> |
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
Oops, something went wrong.