tpl_title.vue 871 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <div class="layout">
  3. <div class="background">
  4. <div class="title" :style="{ color: res.list[0].color }">
  5. {{ res.list[0].title }}
  6. </div>
  7. </div>
  8. </div>
  9. </template>
  10. <script>
  11. export default {
  12. title: "标题栏",
  13. props: ["res"],
  14. mounted() {},
  15. };
  16. </script>
  17. <style lang="scss" scoped>
  18. @import "./tpl.scss";
  19. .background {
  20. background: url("/static/title.png") no-repeat;
  21. position: absolute;
  22. z-index: 2;
  23. width: 100%;
  24. height: 84rpx;
  25. background-position-x: center;
  26. background-position-y: center;
  27. background-size: cover;
  28. }
  29. .layout {
  30. text-align: center;
  31. position: relative;
  32. height: 84rpx;
  33. display: flex;
  34. align-items: center;
  35. justify-content: center;
  36. background: #ffffff;
  37. }
  38. .title {
  39. line-height: 84rpx;
  40. font-size: 30rpx;
  41. font-weight: bold;
  42. }
  43. </style>