SectionTitle.vue 940 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <div class="section-wrapper">
  3. <div class="section-header">
  4. <div class="section-title">{{ title }}</div>
  5. <div class="section-header-right">
  6. <slot name="header-right"></slot>
  7. </div>
  8. </div>
  9. <div class="section-body">
  10. <slot></slot>
  11. </div>
  12. </div>
  13. </template>
  14. <script>
  15. export default {
  16. name: 'SectionTitle',
  17. props: {
  18. title: {
  19. type: String,
  20. default: ''
  21. }
  22. }
  23. }
  24. </script>
  25. <style lang="scss" scoped>
  26. .section-wrapper {
  27. background: rgba(45, 42, 85, 0.9);
  28. border-radius: 24rpx;
  29. padding: 32rpx;
  30. margin-bottom: 32rpx;
  31. box-shadow: 0 8rpx 30rpx rgba(0, 0, 0, 0.2);
  32. }
  33. .section-header {
  34. display: flex;
  35. justify-content: space-between;
  36. align-items: center;
  37. margin-bottom: 24rpx;
  38. }
  39. .section-title {
  40. font-size: 28rpx;
  41. font-weight: 500;
  42. color: #A78BFA;
  43. }
  44. .section-header-right {
  45. font-size: 24rpx;
  46. color: rgba(255, 255, 255, 0.5);
  47. }
  48. </style>