card-wrap.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <div class="card-wrap">
  3. <div class="header">
  4. <div class="h-c-wrap">
  5. <slot name="title"/>
  6. </div>
  7. </div>
  8. <div class="content">
  9. <slot name="content" class="slot"/>
  10. </div>
  11. </div>
  12. </template>
  13. <script>
  14. export default {
  15. name: 'CardWrap',
  16. data() {
  17. return {}
  18. },
  19. watch: {},
  20. created() {
  21. },
  22. methods: {}
  23. }
  24. </script>
  25. <style scoped lang="scss">
  26. .card-wrap {
  27. width: 100%;
  28. height: 100%;
  29. display: flex;
  30. flex-direction: column;
  31. //border: 1px solid teal;
  32. .header {
  33. height: 4vh;
  34. width: 100%;
  35. flex-shrink: 0;
  36. background-image: url("/static/images/biaoti_short@2x.png");
  37. background-repeat: no-repeat;
  38. background-size: auto 2vw;
  39. background-position: left bottom;
  40. font-size: 1vw;
  41. color: white;
  42. padding-left: 2vw;
  43. text-overflow: ellipsis;
  44. white-space: nowrap;
  45. overflow: hidden;
  46. display: flex;
  47. align-items: center;
  48. justify-content: flex-start;
  49. & > .h-c-wrap {
  50. line-height: 1;
  51. cursor: pointer;
  52. }
  53. }
  54. .content {
  55. flex-grow: 1;
  56. width: 100%;
  57. & > div {
  58. height: 100%;
  59. }
  60. }
  61. }
  62. /*控制整个滚动条*/
  63. ::-webkit-scrollbar {
  64. background-color: transparent;
  65. width: 8px;
  66. height: 8px;
  67. background-clip: padding-box;
  68. }
  69. /*滚动条两端方向按钮*/
  70. ::-webkit-scrollbar-button {
  71. height: 0px;
  72. width: 0px;
  73. }
  74. /*滚动条中间滑动部分*/
  75. ::-webkit-scrollbar-thumb {
  76. background-color: #dbdbdb;
  77. border-radius: 4px;
  78. }
  79. /*滚动条右下角区域*/
  80. ::-webkit-scrollbar-corner {
  81. background-color: transparent;
  82. }
  83. </style>