index.vue 3.2 KB

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