hjyd
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

234 lines
6.6 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="wrap">
  3. <div class="case_detail_container" id="hardware_detail_container">
  4. <div class="empty" v-if="showEmpty"></div>
  5. <div class="content">
  6. <Tabs />
  7. <Trumbs />
  8. <div class="content_detail">
  9. <div class="left_swiper">
  10. <div class="header_intro">
  11. <p>
  12. {{
  13. case_detail_list[hardware_id] &&
  14. case_detail_list[hardware_id][hardwareExampleId]?.title
  15. }}
  16. </p>
  17. <!-- <p class="p_text">PICTURE</p> -->
  18. </div>
  19. <swiper
  20. :pagination="true"
  21. :modules="modules"
  22. class="case_detail_swiper"
  23. >
  24. <swiper-slide
  25. v-for="item in case_detail_list[hardware_id] &&
  26. case_detail_list[hardware_id][hardwareExampleId]?.swiperList"
  27. :key="item.id"
  28. >
  29. <img :src="item.picUrl" class="img_swiper" alt="" />
  30. </swiper-slide>
  31. </swiper>
  32. </div>
  33. <div class="placeholder"></div>
  34. <div
  35. class="right_detail"
  36. v-on:mouseover="mouseover"
  37. v-on:mouseleave="mouseleave"
  38. >
  39. <div class="detail_header">
  40. <div>详情页</div>
  41. <div class="right">
  42. <p class="en">DETAILS PAGE</p>
  43. </div>
  44. </div>
  45. <div class="article">
  46. <Paragraph
  47. :text="
  48. case_detail_list[hardware_id] &&
  49. case_detail_list[hardware_id][hardwareExampleId]?.detailList
  50. ?.topText
  51. "
  52. />
  53. <div
  54. class="card_container"
  55. v-for="(item, index) in case_detail_list[hardware_id] &&
  56. case_detail_list[hardware_id][hardwareExampleId]?.detailList
  57. ?.card"
  58. :key="index"
  59. >
  60. <CardTitle
  61. :title="item?.cardTitle"
  62. :blue_title="item?.cardBlueTitle"
  63. :en="item?.en"
  64. />
  65. <IMG
  66. :double="item?.isDouble"
  67. :pic1="item?.pic1"
  68. :pic2="item?.pic2"
  69. />
  70. <Paragraph v-if="item?.cardText" :text="item?.cardText" />
  71. <Intro v-if="item?.cardIntro" :cardIntro="item?.cardIntro" />
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </template>
  80. <script setup>
  81. import { ref, onMounted } from 'vue'
  82. import { handleScreenAuto } from '@/common/utils'
  83. // Import Swiper Vue.js components
  84. import { Swiper, SwiperSlide } from 'swiper/vue'
  85. import { Pagination } from 'swiper'
  86. import { case_detail_list } from '@/mock/hardware'
  87. import { useDetailStore, useSwiperStore } from '@/store'
  88. import { storeToRefs } from 'pinia'
  89. import 'swiper/css'
  90. import 'swiper/css/pagination'
  91. import Paragraph from 'cpns/Paragraph'
  92. import IMG from 'cpns/Img'
  93. import CardTitle from 'cpns/CardTitle'
  94. import Tabs from 'cpns/Tabs'
  95. import Trumbs from 'cpns/Trumbs'
  96. import Intro from 'cpns/Intro'
  97. const showEmpty = ref(false)
  98. const modules = ref([Pagination])
  99. const detailStore = useDetailStore()
  100. const swiperStore = useSwiperStore()
  101. const { hardware_id, hardwareExampleId } = storeToRefs(detailStore)
  102. onMounted(() => {
  103. handleScreenAuto(showEmpty, '#hardware_detail_container')
  104. window.onresize = handleScreenAuto(showEmpty, '#hardware_detail_container')
  105. })
  106. const mouseover = function () {
  107. swiperStore.swiper.disable()
  108. }
  109. const mouseleave = function () {
  110. swiperStore.swiper.enable()
  111. }
  112. </script>
  113. <style lang="scss" scoped>
  114. .wrap {
  115. width: 100vw;
  116. height: 100vh;
  117. background: $common_bg;
  118. position: relative;
  119. .case_detail_container {
  120. width: 100%;
  121. height: 100%;
  122. .empty {
  123. min-height: 90px;
  124. }
  125. .content {
  126. box-sizing: border-box;
  127. width: 100%;
  128. height: 100%;
  129. padding: 77px 153px 130px 153px;
  130. .content_detail {
  131. height: 100%;
  132. width: 100%;
  133. box-sizing: border-box;
  134. margin-top: 30px;
  135. display: flex;
  136. justify-content: space-between;
  137. position: relative;
  138. .left_swiper {
  139. width: 1024px;
  140. height: 100%;
  141. position: relative;
  142. .img_swiper {
  143. width: 100%;
  144. height: 100%;
  145. }
  146. .header_intro {
  147. position: absolute;
  148. top: 0;
  149. min-height: 80px;
  150. left: 0;
  151. right: 0;
  152. z-index: 99;
  153. padding: 26px 43px;
  154. display: flex;
  155. justify-content: space-between;
  156. align-items: center;
  157. font-size: 28px;
  158. font-family: DFPYuanW7-GB;
  159. box-sizing: border-box;
  160. font-weight: 400;
  161. background: linear-gradient(90deg, #283fe7, #4b17e1);
  162. color: #fafafa;
  163. .p_text {
  164. font-size: 22px;
  165. font-family: 'ZonaPro';
  166. font-weight: 800;
  167. }
  168. }
  169. }
  170. .placeholder {
  171. flex: 1;
  172. height: 100%;
  173. }
  174. .right_detail {
  175. transition-property: all;
  176. transition-duration: 0.7s;
  177. animation-fill-mode: forwards;
  178. position: absolute;
  179. top: 0;
  180. right: 0;
  181. width: 591px;
  182. overflow: scroll;
  183. z-index: 100;
  184. height: 100%;
  185. scrollbar-width: none; /* firefox */
  186. overflow-x: auto;
  187. .detail_header {
  188. position: sticky;
  189. top: 0;
  190. left: 0;
  191. right: 0;
  192. width: 100%;
  193. padding: 30px 25px;
  194. background: linear-gradient(90deg, #283fe7, #4b17e1);
  195. font-size: 20px;
  196. font-family: DFPYuanW7-GB;
  197. font-weight: 400;
  198. color: #ffffff;
  199. display: flex;
  200. justify-content: space-between;
  201. align-items: center;
  202. box-sizing: border-box;
  203. .right {
  204. display: flex;
  205. align-items: center;
  206. font-size: 18px;
  207. font-family: Alibaba PuHuiTi;
  208. .en {
  209. font-size: 10px;
  210. font-family: ' ZonaPro';
  211. }
  212. }
  213. }
  214. .article {
  215. min-height: 100%;
  216. background: #fff;
  217. .card_container {
  218. background: linear-gradient(#f9f9f9, #fff);
  219. }
  220. }
  221. }
  222. .right_detail:hover {
  223. z-index: 120;
  224. width: 1000px;
  225. }
  226. }
  227. }
  228. }
  229. }
  230. </style>