BaseBanner.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <script setup lang="ts">
  2. import "animate.css";
  3. defineProps<{
  4. type?: string;
  5. bannerTitle: string;
  6. bannerTitleLangKey: string;
  7. btnLangKey:string;
  8. imgTitleUrl: string;
  9. videoUrl?: string;
  10. btnVal?: string;
  11. href?: string;
  12. tabsData?: object[];
  13. subTitleList?: {val: string, langKey: string}[];
  14. }>();
  15. const handleClickTab = (tab: any) => {
  16. console.log(tab);
  17. };
  18. </script>
  19. <template>
  20. <div :class='["banner-wrapper", type]'>
  21. <div class="video-content">
  22. <video autoplay loop muted playsinline preload="auto" :src="videoUrl"
  23. class="video" v-if="videoUrl">
  24. </video>
  25. </div>
  26. <!-- sm:items-start -->
  27. <div class="banner-content flex flex-col items-center justify-center ">
  28. <p class="banner-text animate__animated animate__fadeInUp animate__slow animate__repeat-1">{{ $t(bannerTitleLangKey) }}</p>
  29. <p
  30. class="
  31. text-[16px]
  32. md:text-[24px]
  33. animate__animated animate__fadeInUp animate__delay-1s animate__slow animate__repeat-1
  34. "
  35. v-for="item, index in subTitleList"
  36. :key="index"
  37. >
  38. {{ $t(item.langKey) }}
  39. </p>
  40. <div class="btn animate__animated animate__fadeInUp animate__delay-1s animate__slow animate__repeat-1"
  41. v-if="btnVal">
  42. <NuxtLink :to="href" target="_blank"><span>{{ $t(btnLangKey) }}</span></NuxtLink>
  43. </div>
  44. </div>
  45. <div class="tabs-wrapper">
  46. <slot></slot>
  47. </div>
  48. </div>
  49. </template>
  50. <style scoped lang="scss">
  51. .banner-wrapper {
  52. position: relative;
  53. height: 586px;
  54. // background: #4a4a4a;
  55. .video-content {
  56. position: absolute;
  57. width: 100%;
  58. height: 100%;
  59. .video {
  60. display: block;
  61. width: 100%;
  62. height: 100%;
  63. object-fit: cover;
  64. outline: none;
  65. mix-blend-mode: darken;
  66. }
  67. }
  68. .banner-content {
  69. position: relative;
  70. max-width: 1080px;
  71. height: 100%;
  72. margin: 0 auto;
  73. text-align: center;
  74. font-size: 24px;
  75. line-height: 34px;
  76. color: #fff;
  77. z-index: 1;
  78. .banner-text {
  79. margin-bottom: 20px;
  80. line-height: 50px;
  81. font-family: AlimamaShuHeiTi;
  82. font-size: 40px;
  83. color: #fff;
  84. }
  85. }
  86. .btn {
  87. display: flex;
  88. align-items: center;
  89. justify-content: center;
  90. width: 144px;
  91. height: 48px;
  92. margin-top: 20px;
  93. border-radius: 8px;
  94. background: linear-gradient(81.92deg, #3996FF 3.18%, #384CFF 22.8%, #2A68FF 51.16%, #227EFF 76.22%, #41BDFF 97.59%);
  95. font-size: 18px;
  96. text-align: center;
  97. line-height: 48px;
  98. color: #fff;
  99. cursor: pointer;
  100. a {
  101. width: 100%;
  102. height: 100%;
  103. text-decoration: none;
  104. }
  105. }
  106. .tabs-wrapper {
  107. position: absolute;
  108. left: 0;
  109. bottom: 0;
  110. z-index: 2;
  111. }
  112. }
  113. .deal {
  114. background: url("@/assets/image/banner/bg-banner-deal.png") center center no-repeat;
  115. background-size: cover;
  116. .banner-img-text {
  117. width: 120px;
  118. }
  119. }
  120. @media screen and (max-width: 932px) {
  121. .en{
  122. .banner-wrapper{
  123. height: 786px;
  124. .banner-content{
  125. height: 88%;
  126. }
  127. }
  128. }
  129. }
  130. </style>