screen-contain.php 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. <template id="screen-contain">
  2. <div id="screen-contain">
  3. <div class="screen-container">
  4. <div class="screen-header">
  5. <div class="header-left">
  6. <img src="/resources/img/dirve/triangle_left.png" class="triangle">
  7. <div class="parallelogram-c">
  8. <div class="parallelogram">
  9. <div class="paral-border paral-border-top"></div>
  10. <div class="paral-border paral-border-right"></div>
  11. <div class="paral-border paral-border-bottom"></div>
  12. <div class="paral-border paral-border-left"></div>
  13. </div>
  14. <div class="text">
  15. <slot v-if="$slots.left" name="left"></slot>
  16. <span v-else>{{textLeft}}</span>
  17. </div>
  18. </div>
  19. </div>
  20. <div class="header-right">
  21. <img src="/resources/img/dirve/triangle_right.png" class="triangle">
  22. <div class="parallelogram-c">
  23. <div class="parallelogram">
  24. <div class="paral-border paral-border-top"></div>
  25. <div class="paral-border paral-border-right"></div>
  26. <div class="paral-border paral-border-bottom"></div>
  27. <div class="paral-border paral-border-left"></div>
  28. </div>
  29. <div class="text">
  30. <slot v-if="$slots.right" name="right"></slot>
  31. <span v-else>{{textRight}}</span>
  32. </div>
  33. </div>
  34. </div>
  35. </div>
  36. <div v-if="isFix" class="isFix"></div>
  37. <!-- 内容 -->
  38. <slot></slot>
  39. </div>
  40. </div>
  41. </template>
  42. <script>
  43. Vue.component('screen-contain', {
  44. name: "screen-contain",
  45. template: '#screen-contain',
  46. props: {
  47. textLeft: {
  48. type: String,
  49. default () {
  50. return "总裁驾驶窗"
  51. }
  52. },
  53. textRight: {
  54. type: String,
  55. default () {
  56. return "总裁驾驶窗"
  57. }
  58. },
  59. // 是否需要填充浮动空白
  60. isFix: {
  61. type: Boolean,
  62. default () {
  63. return true
  64. }
  65. },
  66. },
  67. data() {
  68. return {}
  69. }
  70. })
  71. </script>
  72. <style>
  73. .el-main {
  74. padding: 0;
  75. }
  76. #screen-contain {
  77. min-height: 100%;
  78. min-width: 1620px;
  79. padding: 10px;
  80. background-color: #01021D;
  81. box-sizing: border-box;
  82. }
  83. .screen-container {
  84. position: relative;
  85. min-height: 100%;
  86. border-top: 4px #001A72 solid;
  87. background: url('/resources/img/dirve/dirve_bg.png') no-repeat;
  88. background-size: 100% 100%;
  89. color: #fff;
  90. }
  91. .screen-header {
  92. width: 100%;
  93. position: absolute;
  94. display: flex;
  95. justify-content: space-between;
  96. }
  97. .header-left>.triangle,
  98. .header-right>.triangle {
  99. position: absolute;
  100. top: 0;
  101. left: 0;
  102. width: 70px;
  103. height: 70px;
  104. }
  105. .header-right>.triangle {
  106. left: initial;
  107. right: 0;
  108. }
  109. /* 平行四边形 */
  110. .header-left .parallelogram-c,
  111. .header-right .parallelogram-c {
  112. display: flex;
  113. position: relative;
  114. width: 100%;
  115. height: 100%;
  116. align-items: center;
  117. padding: 0 40px;
  118. }
  119. .parallelogram-c>.text {
  120. position: relative;
  121. z-index: 2;
  122. color: #fff;
  123. }
  124. .header-left .parallelogram,
  125. .header-right .parallelogram {
  126. position: absolute;
  127. }
  128. .header-right .parallelogram {
  129. display: none;
  130. transform: skew(45deg);
  131. }
  132. .header-left .paral-border,
  133. .header-right .paral-border {
  134. position: absolute;
  135. background: #001A72;
  136. }
  137. .header-left .paral-border-top,
  138. .header-right .paral-border-top {
  139. top: 0;
  140. left: 0;
  141. width: 100%;
  142. height: 4px;
  143. }
  144. .header-left .paral-border-right {
  145. bottom: 0;
  146. right: 0;
  147. width: 4px;
  148. height: 75%;
  149. }
  150. .header-right .paral-border-right {
  151. top: 0;
  152. right: 0;
  153. width: 4px;
  154. height: 75%;
  155. }
  156. .header-left .paral-border-bottom,
  157. .header-right .paral-border-bottom {
  158. bottom: 0;
  159. left: 0;
  160. width: 100%;
  161. height: 4px;
  162. }
  163. .header-left .paral-border-left {
  164. top: 0;
  165. left: 0;
  166. width: 4px;
  167. height: 75%;
  168. }
  169. .header-right .paral-border-left {
  170. bottom: 0;
  171. left: 0;
  172. width: 4px;
  173. height: 75%;
  174. }
  175. .header-left .right-top-button{
  176. border-radius: 12px;
  177. font-size: 24px;
  178. padding: 10px 65px;
  179. margin-top: 20px;
  180. margin-left: -15px;
  181. background: url("/resources/img/dirve/header_button.png") no-repeat;
  182. background-size: 100% 100%;
  183. }
  184. .header-right .right-top-button{
  185. position: relative;
  186. border-radius: 12px;
  187. font-size: 24px;
  188. padding: 10px 65px;
  189. margin-top: 20px;
  190. margin-left: -15px;
  191. }
  192. .header-right .right-top-button::before{
  193. content: "";
  194. position: absolute;
  195. width: 100%;
  196. height: 100%;
  197. top: 0;
  198. left: 0;
  199. background: url("/resources/img/dirve/header_button.png") no-repeat;
  200. background-size: 100% 100%;
  201. z-index: -1;
  202. transform: scaleY(-1);
  203. }
  204. </style>