panel-sand.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <div class="com-panel-sand">
  3. <div class="com-panel-sand-header font-sm white">
  4. {{ title }}<span class="com-panel-sand-sub-title font-sm gray">{{ subTitle }}</span>
  5. </div>
  6. <div class="com-panel-body">
  7. <slot></slot>
  8. </div>
  9. </div>
  10. </template>
  11. <script>
  12. export default {
  13. name: "com-panel-sand",
  14. componentName: "com-panel-sand",
  15. props: {
  16. // 标题
  17. title: {
  18. type: String,
  19. default: "",
  20. },
  21. // 副标题
  22. subTitle: {
  23. type: String,
  24. default: "",
  25. },
  26. },
  27. };
  28. </script>
  29. <style lang="less">
  30. .com-panel-sand {
  31. background: #53626826;
  32. padding: 0 1.481vh 1.481vh 1.481vh;
  33. border-top: 1px solid #15a952;
  34. position: relative;
  35. &::after {
  36. content: "";
  37. position: absolute;
  38. width: 5px;
  39. height: 5px;
  40. background: #15a952;
  41. right: -2.5px;
  42. top: -2.5px;
  43. }
  44. .com-panel-sand-header {
  45. text-align: center;
  46. position: relative;
  47. padding: 0.833vh 0;
  48. border-bottom: 1px solid #15a95266;
  49. &::after,
  50. &::before {
  51. content: "";
  52. position: absolute;
  53. bottom: -1px;
  54. width: 15px;
  55. height: 1px;
  56. background: #15a952;
  57. }
  58. &::after {
  59. left: 0;
  60. }
  61. &::before {
  62. right: 0;
  63. }
  64. .com-panel-sand-sub-title {
  65. position: absolute;
  66. right: 0;
  67. top: 0.833vh;
  68. }
  69. }
  70. }
  71. </style>