show.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <!-- @format -->
  2. <script lang="ts" setup>
  3. import { Swiper, SwiperSlide } from 'swiper/vue'
  4. import { Autoplay, EffectCards, Navigation, Pagination } from 'swiper/modules'
  5. import 'swiper/css'
  6. import 'swiper/css/navigation'
  7. import 'swiper/css/autoplay'
  8. import 'swiper/css/pagination'
  9. import 'swiper/css/effect-cards'
  10. import aboutShow01 from '@/assets/images/aboutUs/show_img01.png'
  11. import aboutShow02 from '@/assets/images/aboutUs/show_img02.png'
  12. import aboutShow03 from '@/assets/images/aboutUs/show_img03.png'
  13. import { useUserStore } from '@/stores/modules/user'
  14. // import 'swiper/css/bundle' // 全部css
  15. const modules = [Navigation, Pagination, EffectCards, Autoplay]
  16. const { openLoginModal } = useLoginModal()
  17. const userStore = useUserStore()
  18. const { isLogin } = storeToRefs(userStore)
  19. const swiperVertical = ref<any>(null)
  20. const swiperHorizontal = ref<any>(null)
  21. function onVerticalSwiper(swiper: any) {
  22. swiperVertical.value = swiper
  23. }
  24. function onHorizontalSwiper(swiper: any) {
  25. swiperHorizontal.value = swiper
  26. }
  27. function onSlideChange(swiper: any) {
  28. if (!swiperVertical.value)
  29. return
  30. swiperVertical.value.slideTo(swiper.realIndex)
  31. }
  32. function onSlideChange2(swiper: any) {
  33. if (!swiperHorizontal.value)
  34. return
  35. swiperHorizontal.value.slideTo(swiper.realIndex)
  36. }
  37. const list = ref([
  38. {
  39. img: aboutShow01,
  40. title: 'Insight-Driven Creativity',
  41. description:
  42. 'We believe creativity should be rooted in real consumer insights. Every idea starts with what the new generation truly wants — we turn those insights into inspiring products.Aesthetics Design',
  43. },
  44. {
  45. img: aboutShow02,
  46. title: 'Aesthetics Design',
  47. description:
  48. 'Good design isn’t just about aesthetics — it’s about function, emotion, and experience. Our design approach balances visual appeal with usability to make every product speak for itself.Trend-Driven Picks',
  49. },
  50. {
  51. img: aboutShow03,
  52. title: 'Trend-Driven Picks',
  53. description:
  54. 'We stay ahead of the curve. From fashion to tech, we follow what’s trending globally and transform it into commercial-ready solutions that speak to Gen Z and beyond.',
  55. },
  56. ])
  57. onUnmounted(() => {
  58. if (swiperVertical.value) {
  59. swiperVertical.value.destroy()
  60. swiperVertical.value = null
  61. }
  62. })
  63. </script>
  64. <template>
  65. <div class="bg-#EAE5FA">
  66. <div class="w-1200-auto">
  67. <div class="flex justify-between ">
  68. <div class="w-50% block-left flex user-select justify-center items-center pr-100px">
  69. <Swiper
  70. :modules="modules"
  71. :mousewheel="false"
  72. :loop="true"
  73. effect="cards"
  74. :grab-cursor="true"
  75. :autoplay="{
  76. delay: 3000,
  77. disableOnInteraction: false,
  78. pauseOnMouseEnter: true,
  79. }"
  80. :pagination="{
  81. clickable: true,
  82. }"
  83. class="pos-relative"
  84. @slide-change="onSlideChange2"
  85. @swiper="onVerticalSwiper"
  86. >
  87. <SwiperSlide v-for="(item, index) in list" :key="index">
  88. <img :src="item.img" class="w-480px h-480px object-cover" alt="">
  89. </SwiperSlide>
  90. </Swiper>
  91. </div>
  92. <div class="w-50% h-700px pos-relative block-right">
  93. <Swiper
  94. direction="vertical"
  95. :modules="modules"
  96. :mousewheel="false"
  97. :loop="true"
  98. :allow-touch-move="false"
  99. :pagination="false"
  100. class="pos-relative"
  101. @swiper="onHorizontalSwiper"
  102. >
  103. <SwiperSlide v-for="(item, index) in list" :key="index">
  104. <div class="text-left user-select">
  105. <div class="text-40px fw-800 text-#333 custom-title-font">
  106. {{ item.title }}
  107. </div>
  108. <div class="text-#999 mt-20px lh-24px">
  109. {{ item.description }}
  110. </div>
  111. <el-button class="!bg-#9B6CFF mt-40px !text-#fff !b-#9B6CFF w-160px !b-rd-380px text-16px fw-bold !h-40px px-20px">
  112. <span v-if="!isLogin" @click="openLoginModal">
  113. get started
  114. </span>
  115. <nuxt-link v-else to="/categories">
  116. view catalogs
  117. </nuxt-link>
  118. </el-button>
  119. </div>
  120. </SwiperSlide>
  121. </Swiper>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. </template>
  127. <style lang="less" scoped>
  128. .user-select{
  129. user-select: none;
  130. }
  131. :deep(.block-right) {
  132. .swiper {
  133. position: relative;
  134. width: 100%;
  135. height: 100%;
  136. .swiper-slide {
  137. text-align: center;
  138. font-size: 18px;
  139. display: flex;
  140. justify-content: center;
  141. align-items: center;
  142. }
  143. }
  144. }
  145. :deep(.block-left) {
  146. .swiper {
  147. width: 480px;
  148. height: 480px;
  149. }
  150. .swiper-slide {
  151. display: flex;
  152. align-items: center;
  153. justify-content: center;
  154. border-radius: 18px;
  155. font-size: 22px;
  156. font-weight: bold;
  157. color: #fff;
  158. }
  159. .swiper-pagination{
  160. top: unset;
  161. bottom: -80px;
  162. left: unset;
  163. right: -100px;
  164. display: flex;
  165. justify-content: end;
  166. }
  167. .swiper-slide:nth-child(1n) {
  168. background-color: rgb(206, 17, 17);
  169. }
  170. .swiper-slide:nth-child(2n) {
  171. background-color: rgb(0, 140, 255);
  172. }
  173. .swiper-slide:nth-child(3n) {
  174. background-color: rgb(10, 184, 111);
  175. }
  176. }
  177. </style>