panel-sand-toolbar.vue 1.5 KB

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