CommonBd.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <div class="common-bd">
  3. <div class="basic-bd-top">{{ title }}</div>
  4. <div class="basic-bd-cen">
  5. <slot></slot>
  6. </div>
  7. <div class="basic-bd-bot"></div>
  8. </div>
  9. </template>
  10. <script setup lang="ts">
  11. import { ref } from 'vue';
  12. let props = defineProps({
  13. title: {
  14. type: String,
  15. default: ''
  16. }
  17. });
  18. </script>
  19. <style lang="less" scoped>
  20. @import '/@/design/theme.less';
  21. .common-bd {
  22. --image-box1-top: url('/@/assets/images/vent/box-top-bg.png');
  23. --image-box1-bottom: url('/@/assets/images/vent/box-bottom-bg.png');
  24. --container-image: linear-gradient(#3df6ff00, #3df6ff, #3df6ff00);
  25. position: relative;
  26. width: 100%;
  27. height: 100%;
  28. .basic-bd-top {
  29. display: flex;
  30. align-items: center;
  31. justify-content: center;
  32. color: #fff;
  33. font-weight: 700;
  34. width: 100%;
  35. height: 36px;
  36. background: var(--image-box1-top) no-repeat;
  37. background-size: 100% 100%;
  38. }
  39. .basic-bd-cen {
  40. width: 100%;
  41. height: calc(100% - 36px);
  42. border-left-width: 1px;
  43. border-left-style: solid;
  44. border-right-width: 1px;
  45. border-right-style: solid;
  46. border-image-source: var(--container-image);
  47. border-image-slice: 1;
  48. border-image-repeat: stretch;
  49. }
  50. .basic-bd-bot {
  51. position: absolute;
  52. left: 0;
  53. bottom: 0;
  54. width: 100%;
  55. height: 36px;
  56. background: var(--image-box1-bottom) no-repeat;
  57. background-size: 100% 100%;
  58. }
  59. }
  60. </style>