ModuleContainer.vue 932 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <div class="module-container">
  3. <div class="module-header">
  4. <span class="module-title">{{ title }}</span>
  5. </div>
  6. <div class="module-content">
  7. <slot></slot>
  8. </div>
  9. </div>
  10. </template>
  11. <script setup>
  12. defineProps({
  13. title: {
  14. type: String,
  15. default: ''
  16. }
  17. })
  18. </script>
  19. <style lang="less" scoped>
  20. .module-container {
  21. width: 100%;
  22. height: 100%;
  23. display: flex;
  24. flex-direction: column;
  25. // background: rgba(13, 80, 122, 0.3);
  26. // border: 1px solid rgba(112, 207, 231, 0.3);
  27. // border-radius: 4px;
  28. }
  29. .module-header {
  30. width: 100%;
  31. padding: 10px;
  32. display: flex;
  33. align-items: center;
  34. text-align: center;
  35. border: 1px solid #eee;
  36. justify-content: center;
  37. margin-bottom: 10px;
  38. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  39. }
  40. .module-title {
  41. font-size: 27px;
  42. font-weight: 600;
  43. color: #2E75B6;
  44. text-align: center;
  45. }
  46. .module-content {
  47. flex: 1;
  48. }
  49. </style>