popCard.vue 939 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <script setup>
  2. </script>
  3. <template>
  4. <div class="p-card">
  5. <div class="p-header mx-1.5 h-16 text-2xl flex border-b items-center py-1.5">
  6. <div class="icon-btn-group">
  7. <slot name="close-group"></slot>
  8. </div>
  9. <slot name="header"></slot>
  10. </div>
  11. <div class="p-con w-full px-1">
  12. <slot></slot>
  13. </div>
  14. <div class="p-header w-full mt-2 h-4">
  15. <slot name="footer"></slot>
  16. </div>
  17. </div>
  18. </template>
  19. <style scoped>
  20. .p-header{
  21. height:35px;
  22. position: relative;
  23. cursor: default;
  24. }
  25. .p-con {
  26. height: calc(100% - 80px);
  27. }
  28. .icon-btn-group{
  29. position: absolute;
  30. right: 0;
  31. top: 0;
  32. height: 100%;
  33. display: flex;
  34. align-content: center;
  35. }
  36. .p-card{
  37. position: relative;
  38. width: 66%;
  39. height: 83%;
  40. border-radius: 0.5rem;
  41. display: flex;
  42. flex-direction: column;
  43. justify-content: center;
  44. background-color: #fff;
  45. box-sizing: border-box;
  46. padding: 0.5rem;
  47. }
  48. </style>