infoBox.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <div class="info-box-bg">
  3. <div class="box-top">
  4. <div class="title">
  5. <slot name="title"></slot>
  6. </div>
  7. </div>
  8. <div class="box-center">
  9. <div class="box-container">
  10. <slot name="container"></slot>
  11. </div>
  12. </div>
  13. </div>
  14. </template>
  15. <script lang="ts" setup></script>
  16. <style lang="less" scoped>
  17. @font-face {
  18. font-family: 'douyuFont';
  19. src: url('@/assets/font/douyuFont.otf');
  20. }
  21. @import '/@/design/theme.less';
  22. .info-box-bg {
  23. --image-border1: url('/@/assets/images/dataCenter/infoCenter/info-border1.png');
  24. --image-border2: url('/@/assets/images/dataCenter/infoCenter/info-border2.png');
  25. --image-border3: url('/@/assets/images/dataCenter/infoCenter/info-border3.png');
  26. --image-border4: url('/@/assets/images/dataCenter/infoCenter/info-border4.png');
  27. --image-title: url('/@/assets/images/dataCenter/infoCenter/info-title.png');
  28. --container-color: #00213236;
  29. --container-image: linear-gradient(#3df6ff00, #3df6ff, #3df6ff00);
  30. width: 100%;
  31. height: 100%;
  32. min-height: 80px;
  33. position: relative;
  34. background: var(--image-border4) no-repeat;
  35. background-size: 100% 100%;
  36. overflow: hidden;
  37. .box-top {
  38. width: 220px;
  39. height: 35px;
  40. .title {
  41. width: 100%;
  42. height: 35px;
  43. display: flex;
  44. background-image: var(--image-title);
  45. background-size: 100% 100%;
  46. justify-content: center;
  47. align-items: center;
  48. color: #66ffff;
  49. font-family: 'douyuFont';
  50. padding-top: 5px;
  51. }
  52. }
  53. .box-center {
  54. width: calc(100% + 0.5px);
  55. height: calc(100% - 50px);
  56. position: relative;
  57. .box-container {
  58. width: calc(100% - 2px);
  59. height: 100%;
  60. min-height: 50px;
  61. padding: 5px 25px;
  62. color: #fff;
  63. overflow-y: scroll;
  64. }
  65. }
  66. }
  67. </style>