Download dashboard/src/components/shared/StyledMenu.vue from qa1145/astrbbbb: direct link, hf CLI and curl.
- Browser
- Download file 1.87 kB
-
https://huggingface.co/spaces/qa1145/astrbbbb/resolve/main/dashboard/src/components/shared/StyledMenu.vue
- Command line
-
hf download hf://spaces/qa1145/astrbbbb/dashboard/src/components/shared/StyledMenu.vue
-
curl -L -o StyledMenu.vue https://huggingface.co/spaces/qa1145/astrbbbb/resolve/main/dashboard/src/components/shared/StyledMenu.vue
1.87 kB
| <template> | |
| <v-menu v-bind="$attrs" :close-on-content-click="closeOnContentClick"> | |
| <template v-slot:activator="{ props: activatorProps }"> | |
| <slot name="activator" :props="activatorProps"></slot> | |
| </template> | |
| <v-card class="styled-menu-card" elevation="8" rounded="lg"> | |
| <v-list density="compact" class="styled-menu-list pa-1"> | |
| <slot></slot> | |
| </v-list> | |
| </v-card> | |
| </v-menu> | |
| </template> | |
| <script setup lang="ts"> | |
| defineOptions({ | |
| inheritAttrs: false | |
| }) | |
| withDefaults(defineProps<{ | |
| closeOnContentClick?: boolean | |
| }>(), { | |
| closeOnContentClick: true | |
| }) | |
| </script> | |
| <style scoped> | |
| .styled-menu-card { | |
| min-width: 100px; | |
| width: fit-content; | |
| border: 1px solid rgba(94, 53, 177, 0.15) ; | |
| background: #f8f6fc ; | |
| backdrop-filter: blur(10px); | |
| } | |
| .styled-menu-list { | |
| background: transparent ; | |
| } | |
| :deep(.styled-menu-item) { | |
| margin: 2px 0; | |
| transition: all 0.2s ease; | |
| border-radius: 6px; | |
| } | |
| :deep(.styled-menu-item:hover) { | |
| background: rgba(94, 53, 177, 0.08) ; | |
| } | |
| :deep(.styled-menu-item-active) { | |
| background: rgba(94, 53, 177, 0.15) ; | |
| font-weight: 500; | |
| } | |
| :deep(.styled-menu-item-active:hover) { | |
| background: rgba(94, 53, 177, 0.2) ; | |
| } | |
| </style> | |
| <style> | |
| /* 深色模式下的下拉框样式 - 需要全局样式才能检测主题 */ | |
| .v-theme--PurpleThemeDark .styled-menu-card { | |
| background: #2a2733 ; | |
| border: 1px solid rgba(110, 60, 180, 0.692) ; | |
| } | |
| /* 深色模式下的列表项悬停效果 */ | |
| .v-theme--PurpleThemeDark .styled-menu-item:hover { | |
| background: rgba(114, 46, 209, 0.12) ; | |
| } | |
| .v-theme--PurpleThemeDark .styled-menu-item-active { | |
| background: rgba(114, 46, 209, 0.2) ; | |
| } | |
| .v-theme--PurpleThemeDark .styled-menu-item-active:hover { | |
| background: rgba(114, 46, 209, 0.25) ; | |
| } | |
| </style> | |