iframe.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <div class="images">
  3. <div class="img-con">
  4. <iframe :src="g_dealUrl(hotspot.iframe[active]||hotspot.model[active])" frameborder="0"></iframe>
  5. </div>
  6. <div class="title" v-html="hotspot.title"></div>
  7. <div class="desc" v-if="hotspot.content" v-html="hotspot.content"></div>
  8. </div>
  9. </template>
  10. <script>
  11. export default {
  12. props:['hotspot'],
  13. data(){
  14. return {
  15. active:0
  16. }
  17. },
  18. mounted(){
  19. console.log(this.hotspot);
  20. },
  21. methods:{
  22. }
  23. }
  24. </script>
  25. <style lang="less" scoped>
  26. .noshow{
  27. opacity: 0!important;;
  28. pointer-events: none!important;;
  29. }
  30. .images{
  31. width: 1410px;
  32. height: 800px;
  33. text-align: center;
  34. margin: 0 auto;
  35. position: fixed;
  36. top: 50%;
  37. left: 50%;
  38. transform: translate(-50%,-50%);
  39. border-radius: 5px;
  40. text-align: left;
  41. .img-con{
  42. display: flex;
  43. justify-content: space-around;
  44. align-items: center;
  45. position: relative;
  46. padding-bottom: 40px;
  47. height: calc(100% - 130px);
  48. >iframe{
  49. width: 100%;
  50. height: 100%;
  51. }
  52. }
  53. .title {
  54. font-weight: bold;
  55. font-size: 30px;
  56. width: 100%;
  57. padding: 0 50px;
  58. text-align: center;
  59. margin-bottom: 10px;
  60. }
  61. .desc{
  62. margin: 0 auto;
  63. width: 70%;
  64. color: #fff;
  65. text-align: center;
  66. line-height: 1.5;
  67. max-height: 250px;
  68. overflow-y: auto;
  69. font-size: 16px;
  70. padding: 0 50px;
  71. }
  72. }
  73. .close{
  74. position: absolute;
  75. top: 20px;
  76. right: 40px;
  77. width: 20px;
  78. height: 20px;
  79. cursor: pointer;
  80. z-index: 9999999;
  81. }
  82. </style>