index.vue 3.2 KB

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