Card02.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <script lang="ts" setup>
  2. defineProps<{
  3. title: { type: string, required: false },
  4. customClass: { type: string, required: false },
  5. }>()
  6. </script>
  7. <template>
  8. <div :class="[customClass]" class="card-one">
  9. <div class="card-one-header">
  10. <span class="title-box" v-html="title"></span>
  11. <slot name="headerTool"></slot>
  12. </div>
  13. <div class="card-one-body">
  14. <slot></slot>
  15. </div>
  16. </div>
  17. </template>
  18. <style lang="scss" scoped>
  19. .card-one {
  20. background-image: linear-gradient(180deg,
  21. rgba(0, 28, 53, 0.8) 0%,
  22. rgba(11, 45, 85, 0.8) 100%);
  23. border: 2px solid hsla(0, 0%, 89.8%, .31);
  24. border-radius: 12px;
  25. min-width: 418px;
  26. .card-one-header {
  27. border-radius: 12px 12px 0 0;
  28. background-image: linear-gradient(180deg,
  29. rgba(0, 28, 53, 1) 0%,
  30. rgba(11, 45, 85, 1) 100%);
  31. height: 2.85rem;
  32. line-height: 2.85rem;
  33. font-size: 1.2rem;
  34. font-weight: 600;
  35. color: #fff;
  36. display: flex;
  37. align-items: center;
  38. .title-box {
  39. flex: 1;
  40. }
  41. .title-box:before {
  42. display: inline-block;
  43. content: "";
  44. width: .5rem;
  45. height: 1.4rem;
  46. background: #0cf;
  47. vertical-align: top;
  48. margin: .7rem;
  49. }
  50. .time {
  51. position: absolute;
  52. right: 1rem;
  53. top: -4px;
  54. }
  55. }
  56. .card-one-body {
  57. width: 100%;
  58. height: calc(100% - 2.85rem);
  59. position: relative;
  60. ul {
  61. margin: 0;
  62. padding: 0;
  63. li {
  64. list-style: none;
  65. padding: 0 10px 10px 10px;
  66. }
  67. }
  68. }
  69. &.merge {
  70. border-top: none;
  71. border-bottom: none;
  72. border-radius: 0;
  73. .card-one-header {
  74. border-radius: 0;
  75. }
  76. &:first-child {
  77. border-radius: 12px 12px 0 0;
  78. border-top: 2px solid hsla(0, 0%, 89.8%, .31);
  79. .card-one-header {
  80. border-radius: 12px 12px 0 0;
  81. }
  82. }
  83. }
  84. &:last-child {
  85. &.merge {
  86. border-radius: 0 0 12px 12px;
  87. border-bottom: 2px solid hsla(0, 0%, 89.8%, .31);
  88. }
  89. }
  90. }
  91. .card-one + .card-one {
  92. margin-top: 5px;
  93. }
  94. .card-one.merge + .card-one.merge {
  95. margin-top: 0;
  96. }
  97. .card-one-body {
  98. .dv-scroll-board {
  99. .header {
  100. color: #8ec8f8;
  101. font-size: 1rem;
  102. }
  103. .rows {
  104. .row-item {
  105. color: #CEF0FF;
  106. font-size: 1rem;
  107. }
  108. }
  109. }
  110. }
  111. </style>