index.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. :style="{
  21. color: navigateTextColor,
  22. }"
  23. >
  24. Solutions
  25. </NuxtLink>
  26. <el-dropdown
  27. popper-class="custom-navigate-dropdown no-dropdown"
  28. @visible-change="(visible) => (catalogsVisible = visible)"
  29. >
  30. <span
  31. class="el-dropdown-link text-16px flex items-center"
  32. :class="[{ '!text-#9B6CFF': catalogsVisible }]"
  33. :style="{
  34. color: navigateTextColor,
  35. }"
  36. @click.stop="toCategories"
  37. >
  38. Catalogs
  39. <el-icon
  40. class="el-icon--right custom-arrow"
  41. :class="catalogsVisible ? 'custom-arrow-up' : 'custom-arrow-down'"
  42. >
  43. <ArrowDown class="text-14px" />
  44. </el-icon>
  45. </span>
  46. </el-dropdown>
  47. <el-dropdown
  48. popper-class="custom-navigate-dropdown "
  49. @visible-change="(visible) => (resourceVisible = visible)"
  50. >
  51. <span
  52. class="el-dropdown-link text-16px flex items-center"
  53. :class="[{ '!text-#9B6CFF': resourceVisible }]"
  54. :style="{
  55. color: navigateTextColor,
  56. }"
  57. >
  58. Resources
  59. <el-icon
  60. class="el-icon--right custom-arrow"
  61. :class="resourceVisible ? 'custom-arrow-up' : 'custom-arrow-down'"
  62. >
  63. <ArrowDown class="text-14px" />
  64. </el-icon>
  65. </span>
  66. <template #dropdown>
  67. <el-dropdown-menu>
  68. <el-dropdown-item>
  69. <NuxtLink to="/blog">
  70. Blog
  71. </NuxtLink>
  72. </el-dropdown-item>
  73. <el-dropdown-item>
  74. <NuxtLink to="/faq">
  75. FAQ
  76. </NuxtLink>
  77. </el-dropdown-item>
  78. </el-dropdown-menu>
  79. </template>
  80. </el-dropdown>
  81. <el-dropdown
  82. popper-class="custom-navigate-dropdown"
  83. @visible-change="(visible) => (aboutVisible = visible)"
  84. >
  85. <span
  86. class="el-dropdown-link text-16px flex items-center"
  87. :class="[{ '!text-#9B6CFF': aboutVisible }]"
  88. :style="{
  89. color: navigateTextColor,
  90. }"
  91. >
  92. About
  93. <el-icon
  94. class="el-icon--right custom-arrow"
  95. :class="aboutVisible ? 'custom-arrow-up' : 'custom-arrow-down'"
  96. >
  97. <ArrowDown class="text-14px" />
  98. </el-icon>
  99. </span>
  100. <template #dropdown>
  101. <el-dropdown-menu>
  102. <el-dropdown-item>
  103. <NuxtLink to="/about-us">
  104. About Us
  105. </NuxtLink>
  106. </el-dropdown-item>
  107. <el-dropdown-item>
  108. <NuxtLink to="/contact">
  109. Contact Us
  110. </NuxtLink>
  111. </el-dropdown-item>
  112. </el-dropdown-menu>
  113. </template>
  114. </el-dropdown>
  115. </div>
  116. </template>
  117. <style lang="less" scoped>
  118. .custom-arrow {
  119. transition: all 0.3s ease-in-out;
  120. }
  121. .custom-arrow-up {
  122. transform: rotate(180deg);
  123. }
  124. .custom-arrow-down {
  125. transform: rotate(0deg);
  126. }
  127. </style>
  128. <style>
  129. .custom-navigate-color {
  130. color: #fff;
  131. }
  132. </style>