expericePlaceDesc.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <template>
  2. <div id="place_desc_wrap">
  3. <div class="place_desc_box clearfix">
  4. <div class="place_desc_left">
  5. <div class="place_title_box">
  6. <p class="place_titleC">{{placeDescData.placeDescTitle}}</p>
  7. <p class="place_titleE">{{placeDescData.placeDescTitleE}}</p>
  8. </div>
  9. <div class="place_desc">
  10. <p class="place_descC">{{placeDescData.placeDesc}}</p>
  11. </div>
  12. <div class="place_descE">
  13. <p v-for="(list,index) in placeDescData.placeDescEn" :key="index">{{list}}</p>
  14. </div>
  15. <div class="place_tag_box">
  16. <ul>
  17. <li
  18. class="place_tag_list"
  19. v-for="(item,index) in placeDescData.placeDescImgName"
  20. :key="index"
  21. :class="{active:index == num}"
  22. @click="tabPlace(index)"
  23. >{{item}}</li>
  24. </ul>
  25. </div>
  26. </div>
  27. <div class="place_desc_right">
  28. <transition-group tag="ul" name="experice-place" mode="out-in">
  29. <li
  30. class="place_desc_img"
  31. v-show="index == num"
  32. v-for="(item,index) in placeDescData.placeDescImgSrc"
  33. :key="item"
  34. >
  35. <img :src="item" alt="">
  36. </li>
  37. </transition-group>
  38. </div>
  39. </div>
  40. </div>
  41. </template>
  42. <script>
  43. export default {
  44. name: "expericePlaceDesc",
  45. props: {
  46. placeDescData: Object,
  47. },
  48. data() {
  49. return {
  50. num: 0,
  51. };
  52. },
  53. mounted() {
  54. console.log(this.placeDescData);
  55. },
  56. methods: {
  57. tabPlace(index) {
  58. this.num = index;
  59. },
  60. },
  61. };
  62. </script>
  63. <style scoped>
  64. /*Place description satrt*/
  65. div#place_desc_wrap {
  66. width: 100%;
  67. height: auto;
  68. }
  69. .place_desc_box {
  70. overflow: hidden;
  71. width: 1200px;
  72. height: auto;
  73. margin: 0 auto;
  74. padding: 150px 0;
  75. }
  76. .place_desc_left {
  77. float: left;
  78. width: 475px;
  79. height: auto;
  80. }
  81. .place_title_box {
  82. width: 100%;
  83. }
  84. p.place_titleC {
  85. width: 100%;
  86. height: 42px;
  87. color: #22202b;
  88. font-size: 42px;
  89. font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif",
  90. "source-han-serif-sc", "STZhongsong", "宋体", "serif";
  91. font-weight: 900;
  92. line-height: 42px;
  93. text-align: left;
  94. }
  95. p.place_titleE {
  96. width: 100%;
  97. height: 30px;
  98. color: #858585;
  99. font-size: 14px;
  100. line-height: 30px;
  101. text-align: left;
  102. }
  103. .place_desc {
  104. width: 100%;
  105. padding: 28px 0 55px;
  106. color: #858585;
  107. font-size: 14px;
  108. line-height: 24px;
  109. text-align: left;
  110. }
  111. .place_descE {
  112. overflow: hidden;
  113. width: 100%;
  114. padding-bottom: 82px;
  115. color: #d6d6d6;
  116. font-size: 12px;
  117. line-height: 16px;
  118. text-align: left;
  119. }
  120. .place_tag_box {
  121. position: relative;
  122. width: 100%;
  123. }
  124. li.place_tag_list {
  125. overflow: hidden;
  126. width: 113px;
  127. height: 40px;
  128. margin-bottom: 27px;
  129. border: 3px solid #000;
  130. box-sizing: border-box;
  131. color: #858585;
  132. font-size: 14px;
  133. line-height: 34px;
  134. text-align: center;
  135. cursor: pointer;
  136. -webkit-transition: all 1s ease;
  137. -o-transition: all 1s ease;
  138. transition: all 1s ease;
  139. }
  140. .place_tag_list.active,
  141. .place_tag_list:hover {
  142. color: #feeabd;
  143. background: #000;
  144. }
  145. .place_tag_box::after {
  146. position: absolute;
  147. top: 153px;
  148. right: -75px;
  149. content: "";
  150. width: 340px;
  151. height: 2px;
  152. background: #d5d5d8;
  153. z-index: 22;
  154. }
  155. .place_desc_right {
  156. float: right;
  157. overflow: hidden;
  158. width: 520px;
  159. height: 684px;
  160. }
  161. .experice-place-enter-active,
  162. .experice-place-leave-active {
  163. transition: opacity 0.5s;
  164. }
  165. .experice-place-enter,
  166. .experice-place-leave-to {
  167. opacity: 0;
  168. }
  169. .place_desc_img {
  170. overflow: hidden;
  171. width: 520px;
  172. height: 684px;
  173. }
  174. .place_desc_right img {
  175. width: 100%;
  176. height: 100%;
  177. }
  178. /*Place description satrt*/
  179. </style>