index.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <!-- @format -->
  2. <script lang="ts" setup>
  3. import { ArrowDown } from '@element-plus/icons-vue'
  4. import { useCommonStore } from '@/stores/modules/common'
  5. const router = useRouter()
  6. const commonStore = useCommonStore()
  7. const { navigateTextColor } = storeToRefs(commonStore)
  8. const catalogsVisible = ref<boolean>(false)
  9. const resourceVisible = ref<boolean>(false)
  10. const aboutVisible = ref<boolean>(false)
  11. function toCategories() {
  12. router.push('/categories')
  13. }
  14. </script>
  15. <template>
  16. <div class="flex gap-80px">
  17. <NuxtLink
  18. to="/solutions"
  19. class="hover:text-#9B6CFF cursor-pointer"
  20. :class="navigateTextColor"
  21. >
  22. Solutions
  23. </NuxtLink>
  24. <el-dropdown
  25. popper-class="custom-navigate-dropdown no-dropdown"
  26. @visible-change="(visible) => (catalogsVisible = visible)"
  27. >
  28. <span
  29. class="el-dropdown-link text-16px flex items-center"
  30. :class="[{ '!text-#9B6CFF': catalogsVisible }, navigateTextColor]"
  31. @click.stop="toCategories"
  32. >
  33. Catalogs
  34. <el-icon
  35. class="el-icon--right custom-arrow"
  36. :class="catalogsVisible ? 'custom-arrow-up' : 'custom-arrow-down'"
  37. >
  38. <ArrowDown class="text-14px" />
  39. </el-icon>
  40. </span>
  41. </el-dropdown>
  42. <el-dropdown
  43. popper-class="custom-navigate-dropdown "
  44. @visible-change="(visible) => (resourceVisible = visible)"
  45. >
  46. <span
  47. class="el-dropdown-link text-16px flex items-center"
  48. :class="[{ '!text-#9B6CFF': resourceVisible }, navigateTextColor]"
  49. >
  50. Resources
  51. <el-icon
  52. class="el-icon--right custom-arrow"
  53. :class="resourceVisible ? 'custom-arrow-up' : 'custom-arrow-down'"
  54. >
  55. <ArrowDown class="text-14px" />
  56. </el-icon>
  57. </span>
  58. <template #dropdown>
  59. <el-dropdown-menu>
  60. <el-dropdown-item>
  61. <NuxtLink to="/blog">
  62. Blog
  63. </NuxtLink>
  64. </el-dropdown-item>
  65. <el-dropdown-item>
  66. <NuxtLink to="/faq">
  67. FAQ
  68. </NuxtLink>
  69. </el-dropdown-item>
  70. </el-dropdown-menu>
  71. </template>
  72. </el-dropdown>
  73. <el-dropdown
  74. popper-class="custom-navigate-dropdown"
  75. @visible-change="(visible) => (aboutVisible = visible)"
  76. >
  77. <span
  78. class="el-dropdown-link text-16px flex items-center"
  79. :class="[{ '!text-#9B6CFF': aboutVisible }, navigateTextColor]"
  80. >
  81. About
  82. <el-icon
  83. class="el-icon--right custom-arrow"
  84. :class="aboutVisible ? 'custom-arrow-up' : 'custom-arrow-down'"
  85. >
  86. <ArrowDown class="text-14px" />
  87. </el-icon>
  88. </span>
  89. <template #dropdown>
  90. <el-dropdown-menu>
  91. <el-dropdown-item>
  92. <NuxtLink to="/about-us">
  93. About Us
  94. </NuxtLink>
  95. </el-dropdown-item>
  96. <el-dropdown-item>
  97. <NuxtLink to="/contact">
  98. Contact Us
  99. </NuxtLink>
  100. </el-dropdown-item>
  101. </el-dropdown-menu>
  102. </template>
  103. </el-dropdown>
  104. </div>
  105. </template>
  106. <style lang="less" scoped>
  107. .custom-arrow {
  108. transition: all 0.3s ease-in-out;
  109. }
  110. .custom-arrow-up {
  111. transform: rotate(180deg);
  112. }
  113. .custom-arrow-down {
  114. transform: rotate(0deg);
  115. }
  116. </style>
  117. <style>
  118. .custom-navigate-color {
  119. color: #fff;
  120. }
  121. </style>