audio.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <div class="images" :style="{backgroundImage:`url(${require('@/assets/images/project/hotspot_bg.jpg')})`}">
  3. <div class="title">{{hotspot.title}}</div>
  4. <div class="img-con">
  5. <span @click="active-=1" :class="{noshow:active<=0}">上一张</span>
  6. <img :src="hotspot.images[active]" alt="">
  7. <span @click="active+=1" :class="{noshow:active>=hotspot.images.length - 1}">下一张</span>
  8. <ul class="pagna">
  9. <li v-for="(item,i) in hotspot.images" :class="{active:i==active}" :key="i"></li>
  10. </ul>
  11. </div>
  12. <div class="desc" v-html="hotspot.content">
  13. </div>
  14. </div>
  15. </template>
  16. <script>
  17. export default {
  18. props:['hotspot'],
  19. data(){
  20. return {
  21. active:0
  22. }
  23. },
  24. methods:{
  25. }
  26. }
  27. </script>
  28. <style lang="less" scoped>
  29. .noshow{
  30. opacity: 0!important;;
  31. pointer-events: none!important;;
  32. }
  33. .images{
  34. width: 100%;
  35. height: 100%;
  36. background-repeat: no-repeat;
  37. text-align: center;
  38. .title{
  39. padding: 0 80px;
  40. display: inline-block;
  41. color: #DBA761;
  42. font-weight: bold;
  43. font-size: 36px;
  44. height: 70px;
  45. line-height: 70px;
  46. background: #BC1515;
  47. border-radius: 60px;
  48. margin: 45px auto;
  49. }
  50. .img-con{
  51. display: flex;
  52. justify-content: space-around;
  53. align-items: center;
  54. position: relative;
  55. padding-bottom: 40px;
  56. >span{
  57. display: inline-block;
  58. padding: 0 30px;
  59. box-sizing: content-box;
  60. font-size: 20px;
  61. height: 50px;
  62. line-height: 50px;
  63. background: rgba(188, 21, 21, 0.9);
  64. border: 2px solid #DBA761;
  65. border-radius: 37px;
  66. cursor: pointer;
  67. &:hover,&.active{
  68. color: #DBA761;
  69. }
  70. }
  71. >img{
  72. max-width: 1000px;
  73. border: 10px solid #BC1515;
  74. box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
  75. max-height: 600px;
  76. }
  77. .pagna{
  78. position: absolute;
  79. bottom: 0;
  80. text-align: center;
  81. z-index: 999;
  82. >li{
  83. width: 60px;
  84. height: 6px;
  85. background: #BC1515;
  86. display: inline-block;
  87. margin: 0 4px;
  88. &.active{
  89. background: #DBA761;
  90. }
  91. }
  92. }
  93. }
  94. .desc{
  95. max-width: 1000px;
  96. margin: 20px auto 0;
  97. color: #DBA761;
  98. text-align: left;
  99. line-height: 2;
  100. max-height: 200px;
  101. overflow-y: auto;
  102. }
  103. }
  104. </style>