WorkspaceCard.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <div class="workspace-card">
  3. <div class="card-header">
  4. <span class="header-title">
  5. <slot name="header-title">{{ title }}</slot>
  6. </span>
  7. <span class="header-right">
  8. <slot name="header-right"></slot>
  9. </span>
  10. </div>
  11. <div class="card-content">
  12. <slot name="default"></slot>
  13. </div>
  14. </div>
  15. </template>
  16. <script>
  17. export default {
  18. name: 'WorkspaceCard',
  19. props: {
  20. title: {
  21. type: String,
  22. default: ''
  23. }
  24. },
  25. created () {},
  26. methods: {}
  27. }
  28. </script>
  29. <style lang="scss" scoped>
  30. ::v-deep {
  31. .red-dot {
  32. width: 6px;
  33. height: 6px;
  34. background: #fb483d;
  35. border-radius: 50%;
  36. &.invisible {
  37. visibility: hidden;
  38. }
  39. }
  40. }
  41. .workspace-card {
  42. background-color: #fff;
  43. border-radius: 4px;
  44. box-shadow: 0px 0px 18px 0px rgba(0,0,0,0.02);
  45. }
  46. .card-header {
  47. padding: 12px 20px 8px;
  48. display: flex;
  49. align-items: center;
  50. justify-content: space-between;
  51. }
  52. .card-content {
  53. padding: 16px 20px;
  54. }
  55. .header-title {
  56. font-size: 18px;
  57. color: #1D1D1D;
  58. line-height: 28px;
  59. }
  60. .header-right {
  61. margin-left: 20px;
  62. font-size: 12px;
  63. color: #686868;
  64. line-height: 18px;
  65. }
  66. </style>