dv-border-content.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <script>
  2. export default {
  3. name: "dv-border-box",
  4. props: {
  5. objD: {
  6. type: Object,
  7. default: () => {
  8. }
  9. }
  10. },
  11. data() {
  12. return {}
  13. },
  14. created() {
  15. }
  16. }
  17. </script>
  18. <template>
  19. <div class="box-content">
  20. <div class="box-top">
  21. <span class="box-top-name">{{ objD.titleName }}</span>
  22. <span class="box-top-unit">{{ objD.titleUnit }}</span>
  23. </div>
  24. <div class="box-footer">
  25. <span class="box-footer-value">{{ objD.value }}</span>
  26. </div>
  27. </div>
  28. </template>
  29. <style scoped lang="scss">
  30. .box-content {
  31. width: 100%;
  32. height: 100%;
  33. display: flex;
  34. flex-direction: column;
  35. color: #ffffff;
  36. .box-top {
  37. width: 100%;
  38. height:17%;
  39. display: flex;
  40. justify-content: center;
  41. align-items: flex-end;
  42. .box-top-name {
  43. display: inline-block;
  44. font-size: 1rem;
  45. letter-spacing:2px;
  46. font-weight: bold;
  47. // color: #f4d29c;
  48. }
  49. .box-top-unit {
  50. display: inline-block;
  51. font-size:0.55rem;
  52. transform: translate(0px, -30%);
  53. letter-spacing:1px;
  54. font-weight: bold;
  55. }
  56. }
  57. .box-footer {
  58. flex: 1;
  59. display: flex;
  60. justify-content: center;
  61. align-items: center;
  62. .box-footer-value {
  63. font-family: 'LCD2B';
  64. display: inline-block;
  65. font-size: 2rem;
  66. }
  67. }
  68. }
  69. </style>