index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. /*DetailLayout*/
  2. <template>
  3. <div class="details">
  4. <div class="footer-img">
  5. <img src="@/assets/match/litibj.png" />
  6. </div>
  7. <div class="content">
  8. <div class="title">
  9. <div class="back" @click="back">
  10. <img src="@/assets/match/r.png" alt="图片" />
  11. </div>
  12. <h3>{{ title }}</h3>
  13. </div>
  14. <div class="container">
  15. <div class="container-bg">
  16. <img src="@/assets/match/content.png" />
  17. </div>
  18. <div class="container-box">
  19. <div class="slot-container">
  20. <slot></slot>
  21. </div>
  22. </div>
  23. </div>
  24. </div>
  25. </div>
  26. </template>
  27. <script>
  28. export default {
  29. name: 'DetailLayout',
  30. props: {
  31. title: {
  32. type: String,
  33. default: () => '标题',
  34. },
  35. },
  36. methods: {
  37. back() {
  38. this.$router.go(-1)
  39. },
  40. },
  41. }
  42. </script>
  43. <style lang="scss" scoped>
  44. @import '@/styles/variables.scss';
  45. @import '@/styles/mixin.scss';
  46. .details {
  47. @include w_h(100%, 100%);
  48. @include flex(center);
  49. position: relative;
  50. background: $color_0;
  51. .footer-img {
  52. @include w_h(100%);
  53. @include position(fixed, auto, -3px, 0, 0);
  54. background: $color_0;
  55. img {
  56. @include w_h(100%);
  57. }
  58. }
  59. .content {
  60. @include w_h(95%, 90%);
  61. min-width: 900px;
  62. min-height: 560px;
  63. .title {
  64. @include w_h(100%, 60px);
  65. @include flex();
  66. .back {
  67. transition: all 0.3s;
  68. &:hover {
  69. cursor: pointer;
  70. opacity: 0.8;
  71. }
  72. }
  73. h3 {
  74. @include w_h(100%);
  75. font-size: 28px;
  76. text-align: center;
  77. color: #007af9;
  78. }
  79. }
  80. .container {
  81. @include w_h(100%, calc(100% - 60px));
  82. position: relative;
  83. overflow: hidden;
  84. &-bg {
  85. @include position(absolute, 0, 0, 0, 0);
  86. img {
  87. @include w_h(100%, 100%);
  88. }
  89. }
  90. &-box {
  91. @include w_h(100%, 100%);
  92. position: relative;
  93. padding: 40px 3.8%;
  94. overflow: hidden;
  95. .slot-container {
  96. @include w_h(100%, 100%);
  97. padding: 0 30px;
  98. overflow: auto;
  99. /*谷歌、safari、qq浏览器、360浏览器滚动条样式*/
  100. /*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
  101. &::-webkit-scrollbar {
  102. width: 8px;
  103. height: 3px;
  104. background: transparent;
  105. }
  106. /*定义滚动条轨道 内阴影+圆角*/
  107. &::-webkit-scrollbar-track {
  108. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  109. border-radius: 10px;
  110. background: transparent;
  111. }
  112. /*定义滑块 内阴影+圆角*/
  113. &::-webkit-scrollbar-thumb {
  114. border-radius: 10px;
  115. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  116. background: #0196fb;
  117. }
  118. /*滑块效果*/
  119. &::-webkit-scrollbar-thumb:hover {
  120. border-radius: 5px;
  121. -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  122. background: rgba(0, 139, 250, 0.9);
  123. }
  124. }
  125. .detail {
  126. @include w_h();
  127. @include flex(space-between, flex-start);
  128. .content-left {
  129. @include w_h(70%);
  130. color: $color_f;
  131. padding: 15px 0;
  132. .title {
  133. font-size: 22px;
  134. color: $color_f;
  135. }
  136. .dec {
  137. font-size: 16px;
  138. line-height: 26px;
  139. img {
  140. vertical-align: middle;
  141. }
  142. }
  143. .imgs {
  144. padding: 10px 0;
  145. text-align: center;
  146. img {
  147. max-width: 100%;
  148. }
  149. p {
  150. font-size: 12px;
  151. line-height: 28px;
  152. }
  153. }
  154. }
  155. .content-right {
  156. @include w_h(26%);
  157. .title {
  158. font-size: 22px;
  159. color: #fde800;
  160. }
  161. }
  162. }
  163. }
  164. }
  165. }
  166. }
  167. </style>