pageHeader.vue 695 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <div class="page-header" >
  3. <div class="title" >{{title}}</div>
  4. <div class="desc" >{{desc}}</div>
  5. <slot></slot>
  6. </div>
  7. </template>
  8. <script lang="ts" setup >
  9. import { defineProps } from 'vue'
  10. interface IProps {
  11. title: string
  12. desc: string
  13. }
  14. const props = defineProps<IProps>()
  15. </script>
  16. <style lang="less" scoped >
  17. .page-header {
  18. width: 100%;
  19. height: 144px;
  20. background-color: #fff;
  21. padding: 20px;
  22. border-radius: 8px;
  23. .title {
  24. color: rgba(0, 0, 0, 0.88);
  25. font-weight: 600;
  26. font-size: 20px;
  27. line-height: 32px;
  28. overflow: hidden;
  29. white-space: nowrap;
  30. text-overflow: ellipsis;
  31. }
  32. .desc {
  33. margin-top: 38px;
  34. }
  35. }
  36. </style>