Download packages/effects/layouts/src/basic/menu/menu.vue from binhugg3/admin: direct link, hf CLI and curl.
- Browser
- Download file 902 Bytes
-
https://huggingface.co/spaces/binhugg3/admin/resolve/main/packages/effects/layouts/src/basic/menu/menu.vue
- Command line
-
hf download hf://spaces/binhugg3/admin/packages/effects/layouts/src/basic/menu/menu.vue
-
curl -L -o menu.vue https://huggingface.co/spaces/binhugg3/admin/resolve/main/packages/effects/layouts/src/basic/menu/menu.vue
902 Bytes
| <script lang="ts" setup> | |
| import type { MenuRecordRaw } from '@vben/types'; | |
| import type { MenuProps } from '@vben-core/menu-ui'; | |
| import { Menu } from '@vben-core/menu-ui'; | |
| interface Props extends MenuProps { | |
| menus: MenuRecordRaw[]; | |
| } | |
| const props = withDefaults(defineProps<Props>(), { | |
| accordion: true, | |
| menus: () => [], | |
| }); | |
| const emit = defineEmits<{ | |
| open: [string, string[]]; | |
| select: [string, string?]; | |
| }>(); | |
| function handleMenuSelect(key: string) { | |
| emit('select', key, props.mode); | |
| } | |
| function handleMenuOpen(key: string, path: string[]) { | |
| emit('open', key, path); | |
| } | |
| </script> | |
| <template> | |
| <Menu | |
| :accordion="accordion" | |
| :collapse="collapse" | |
| :collapse-show-title="collapseShowTitle" | |
| :default-active="defaultActive" | |
| :menus="menus" | |
| :mode="mode" | |
| :rounded="rounded" | |
| :theme="theme" | |
| @open="handleMenuOpen" | |
| @select="handleMenuSelect" | |
| /> | |
| </template> | |