Download packages/effects/layouts/src/basic/menu/extra-menu.vue from binhugg3/admin: direct link, hf CLI and curl.
- Browser
- Download file 834 Bytes
-
https://huggingface.co/spaces/binhugg3/admin/resolve/main/packages/effects/layouts/src/basic/menu/extra-menu.vue
- Command line
-
hf download hf://spaces/binhugg3/admin/packages/effects/layouts/src/basic/menu/extra-menu.vue
-
curl -L -o extra-menu.vue https://huggingface.co/spaces/binhugg3/admin/resolve/main/packages/effects/layouts/src/basic/menu/extra-menu.vue
834 Bytes
| <script lang="ts" setup> | |
| import type { MenuRecordRaw } from '@vben/types'; | |
| import type { MenuProps } from '@vben-core/menu-ui'; | |
| import { useRoute } from 'vue-router'; | |
| import { Menu } from '@vben-core/menu-ui'; | |
| import { useNavigation } from './use-navigation'; | |
| interface Props extends MenuProps { | |
| collapse?: boolean; | |
| menus: MenuRecordRaw[]; | |
| } | |
| withDefaults(defineProps<Props>(), { | |
| accordion: true, | |
| menus: () => [], | |
| }); | |
| const route = useRoute(); | |
| const { navigation } = useNavigation(); | |
| async function handleSelect(key: string) { | |
| await navigation(key); | |
| } | |
| </script> | |
| <template> | |
| <Menu | |
| :accordion="accordion" | |
| :collapse="collapse" | |
| :default-active="route.meta?.activePath || route.path" | |
| :menus="menus" | |
| :rounded="rounded" | |
| :theme="theme" | |
| mode="vertical" | |
| @select="handleSelect" | |
| /> | |
| </template> | |