borderTemplate.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <div class="borderTemplate">
  3. <div class="title">
  4. <div class="icon"></div>
  5. <span>{{ titleName }}</span>
  6. <slot name="title"></slot>
  7. </div>
  8. <div class="borderContent">
  9. <slot></slot>
  10. </div>
  11. </div>
  12. </template>
  13. <script>
  14. export default {
  15. name: "borderTemplate",
  16. props: {
  17. titleName: "",
  18. },
  19. data() {
  20. return {};
  21. },
  22. mounted() {},
  23. methods: {},
  24. };
  25. </script>
  26. <style lang="scss" scoped>
  27. .borderTemplate {
  28. border-width: 0px;
  29. position: absolute;
  30. right: 10px;
  31. top: 68%;
  32. width: 21.6%; //416px
  33. height: calc((100% - 52px) / 3);
  34. display: -ms-flexbox;
  35. display: flex;
  36. }
  37. .title {
  38. border-width: 0px;
  39. width: 100%;
  40. height: 40px;
  41. // font-family: 'Arial Negreta', 'Arial Normal', 'Arial';
  42. // font-weight: 700;
  43. // font-style: normal;
  44. // color: #fff;
  45. // padding: 2%;
  46. background: no-repeat;
  47. background-image: url("/static/images/overview/标题框.png");
  48. .icon {
  49. background: no-repeat;
  50. background-image: url("/static/images/overview/icon_标题框装饰.png");
  51. display: inline-block;
  52. width: 30px;
  53. height: 30px;
  54. background-position: 14px 7px;
  55. }
  56. span {
  57. color: #fff;
  58. font-size: 14px;
  59. font-weight: bold;
  60. position: relative;
  61. bottom: 0.5rem;
  62. }
  63. }
  64. .borderContent {
  65. // border: #00FFFF 1px solid;
  66. position: absolute;
  67. left: 5%;
  68. width: 100%;
  69. height: calc(100% - 50px);
  70. top: 40px;
  71. }
  72. </style>