vp-menu-link.vue 640 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <script lang="ts" setup>
  2. import VPLink from '../common/vp-link.vue'
  3. import type { Link } from '../../types'
  4. defineProps<{
  5. item: Link
  6. }>()
  7. </script>
  8. <template>
  9. <VPLink
  10. :class="{
  11. 'is-menu-link': true,
  12. }"
  13. :href="item.link"
  14. :no-icon="true"
  15. >
  16. {{ item.text }}
  17. </VPLink>
  18. </template>
  19. <style scoped lang="scss">
  20. .is-menu-link {
  21. display: block;
  22. font-size: 13px;
  23. font-weight: 500;
  24. line-height: 24px;
  25. color: var(--text-color);
  26. transition: color var(--el-transition-duration);
  27. &.active {
  28. border-bottom: 2px solid var(--brand-color);
  29. }
  30. &:hover {
  31. color: var(--brand-color);
  32. }
  33. }
  34. </style>