index.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <!-- @format -->
  2. <script lang="ts" setup>
  3. import { ArrowDown } from '@element-plus/icons-vue'
  4. import IconGroup from './icon-group.vue'
  5. import { useCommonStore } from '@/stores/modules/common'
  6. const router = useRouter()
  7. const commonStore = useCommonStore()
  8. const { navigateTextColor, navigateBgColor } = storeToRefs(commonStore)
  9. const catalogsVisible = ref<boolean>(false)
  10. const resourceVisible = ref<boolean>(false)
  11. const aboutVisible = ref<boolean>(false)
  12. const list = ref<any>([
  13. {
  14. key: 'trend',
  15. name: 'Trend Toys',
  16. },
  17. {
  18. key: 'tech',
  19. name: 'Tech Gadgets',
  20. },
  21. {
  22. key: 'lifeStyle',
  23. name: 'Lifestyle & Wellness',
  24. },
  25. {
  26. key: 'stationery',
  27. name: 'Stationery & Office',
  28. },
  29. {
  30. key: 'fashion',
  31. name: 'Fashion Accessories',
  32. },
  33. {
  34. key: 'gifts',
  35. name: 'Gifts & Seasonal',
  36. },
  37. {
  38. key: 'creative',
  39. name: 'Creative Home Products',
  40. },
  41. {
  42. key: 'beauty',
  43. name: 'Beauty & Persoanl Care',
  44. },
  45. ])
  46. const TrendList = [
  47. {
  48. image: 'https://picsum.photos/220/136',
  49. name: 'Trend Toys',
  50. slug: 'trend-toys',
  51. id: 'trend-toys',
  52. },
  53. {
  54. image: 'https://picsum.photos/220/136',
  55. name: 'Trend Toys',
  56. slug: 'trend-toys',
  57. id: 'trend-toys',
  58. },
  59. {
  60. image: 'https://picsum.photos/220/136',
  61. name: 'Trend Toys',
  62. slug: 'trend-toys',
  63. id: 'trend-toys',
  64. },
  65. ]
  66. function toCategories() {
  67. router.push('/categories')
  68. }
  69. </script>
  70. <template>
  71. <div class="flex gap-80px">
  72. <NuxtLink
  73. to="/solutions"
  74. class="!hover:text-#9B6CFF cursor-pointer"
  75. :style="{
  76. color: navigateTextColor,
  77. }"
  78. >
  79. Solutions
  80. </NuxtLink>
  81. <el-dropdown
  82. popper-class="custom-navigate-dropdown2"
  83. @visible-change="(visible) => (catalogsVisible = visible)"
  84. >
  85. <span
  86. class="el-dropdown-link text-16px flex items-center"
  87. :class="[{ '!text-#9B6CFF': catalogsVisible }]"
  88. :style="{
  89. color: navigateTextColor,
  90. }"
  91. @click.stop="toCategories"
  92. >
  93. Catalogs
  94. <el-icon
  95. class="el-icon--right custom-arrow"
  96. :class="catalogsVisible ? 'custom-arrow-up' : 'custom-arrow-down'"
  97. >
  98. <ArrowDown class="text-14px" />
  99. </el-icon>
  100. </span>
  101. <template #dropdown>
  102. <div class="w-1200px p-30px flex items-center justify-center">
  103. <div class="pr-10px b-r-1px b-r-solid b-r-#E0E4EA">
  104. <div class="mb-20px text-16px fw-800 text-#333">
  105. By Category
  106. </div>
  107. <div class="grid grid-cols-2 grid-gap-x-15px grid-gap-y-10px">
  108. <div v-for="(item, index) in list" :key="item.id" class="a-link-out hover:text-#9B6CFF hover:bg-#F3F4FB py-8px pl-10px b-rd-6px flex items-center cursor-pointer text-#999">
  109. <IconGroup :icon="item.key" />
  110. <NuxtLink
  111. :to="`/categories/${item.id}`"
  112. class="text-#333 ml-10px text-14px"
  113. >
  114. {{ item.name }}
  115. </NuxtLink>
  116. </div>
  117. </div>
  118. </div>
  119. <div class="pl-30px">
  120. <div class="mb-20px text-16px fw-800 text-#333">
  121. By Category
  122. </div>
  123. <div class="grid grid-cols-3 grid-gap-x-20px">
  124. <div
  125. v-for="(item, index) in TrendList"
  126. :key="index"
  127. class="cursor-pointer"
  128. >
  129. <NuxtLink
  130. :to="`/categories/${item.slug}`"
  131. >
  132. <img
  133. :src="item.image"
  134. alt=""
  135. class="w-220px h-136px mb-10px b-rd-4px"
  136. >
  137. <div class="text-14px fw-800 custom-title-font text-#333 line-clamp-1">
  138. {{ item.name }}
  139. </div>
  140. </NuxtLink>
  141. </div>
  142. </div>
  143. </div>
  144. </div>
  145. </template>
  146. </el-dropdown>
  147. <el-dropdown
  148. popper-class="custom-navigate-dropdown"
  149. @visible-change="(visible) => (resourceVisible = visible)"
  150. >
  151. <span
  152. class="el-dropdown-link text-16px flex items-center"
  153. :class="[{ '!text-#9B6CFF': resourceVisible }]"
  154. :style="{
  155. color: navigateTextColor,
  156. }"
  157. >
  158. Resources
  159. <el-icon
  160. class="el-icon--right custom-arrow"
  161. :class="resourceVisible ? 'custom-arrow-up' : 'custom-arrow-down'"
  162. >
  163. <ArrowDown class="text-14px" />
  164. </el-icon>
  165. </span>
  166. <template #dropdown>
  167. <el-dropdown-menu>
  168. <el-dropdown-item>
  169. <NuxtLink to="/blog">
  170. Blog
  171. </NuxtLink>
  172. </el-dropdown-item>
  173. <el-dropdown-item>
  174. <NuxtLink to="/faq">
  175. FAQ
  176. </NuxtLink>
  177. </el-dropdown-item>
  178. </el-dropdown-menu>
  179. </template>
  180. </el-dropdown>
  181. <el-dropdown
  182. popper-class="custom-navigate-dropdown"
  183. @visible-change="(visible) => (aboutVisible = visible)"
  184. >
  185. <span
  186. class="el-dropdown-link text-16px flex items-center"
  187. :class="[{ '!text-#9B6CFF': aboutVisible }]"
  188. :style="{
  189. color: navigateTextColor,
  190. }"
  191. >
  192. About
  193. <el-icon
  194. class="el-icon--right custom-arrow"
  195. :class="aboutVisible ? 'custom-arrow-up' : 'custom-arrow-down'"
  196. >
  197. <ArrowDown class="text-14px" />
  198. </el-icon>
  199. </span>
  200. <template #dropdown>
  201. <el-dropdown-menu>
  202. <el-dropdown-item>
  203. <NuxtLink to="/about-us">
  204. About Us
  205. </NuxtLink>
  206. </el-dropdown-item>
  207. <el-dropdown-item>
  208. <NuxtLink to="/contact">
  209. Contact Us
  210. </NuxtLink>
  211. </el-dropdown-item>
  212. </el-dropdown-menu>
  213. </template>
  214. </el-dropdown>
  215. </div>
  216. </template>
  217. <style lang="less" scoped>
  218. .custom-arrow {
  219. transition: all 0.3s ease-in-out;
  220. }
  221. .custom-arrow-up {
  222. transform: rotate(180deg);
  223. }
  224. .custom-arrow-down {
  225. transform: rotate(0deg);
  226. }
  227. .a-link-out:hover a{
  228. color: #9B6CFF;
  229. }
  230. </style>
  231. <style lang="less">
  232. .custom-navigate-color {
  233. color: #fff;
  234. }
  235. .custom-navigate-dropdown2{
  236. margin-top: 14px;
  237. padding:0px!important;
  238. border-width: 0px!important;
  239. background-color: #fff!important;
  240. opacity: 0.9;
  241. border-radius: 6px!important;
  242. inset: unset!important;
  243. // left: 50%!important;
  244. top:58px!important;
  245. // transition: all 0.3s ease-in-out;
  246. // transform: translateX(-50%);
  247. backdrop-filter: blur(5px)!important;
  248. box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.1)!important;
  249. .el-popper__arrow {
  250. display: none;
  251. }
  252. }
  253. </style>