HeadInfo.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <div class="head-info" :class="center && 'left'">
  3. <p>¥{{ content }}</p>
  4. <em v-if="bordered" />
  5. </div>
  6. </template>
  7. <script>
  8. export default {
  9. name: 'HeadInfo',
  10. props: {
  11. title: {
  12. type: String,
  13. default: '',
  14. },
  15. content: {
  16. type: Number,
  17. default: '',
  18. },
  19. bordered: {
  20. type: Boolean,
  21. default: false,
  22. },
  23. center: {
  24. type: Boolean,
  25. default: true,
  26. },
  27. },
  28. }
  29. </script>
  30. <style lang="less" scoped>
  31. .head-info {
  32. position: relative;
  33. text-align: left;
  34. padding: 0 32px 0 0;
  35. min-width: 125px;
  36. &.center {
  37. text-align: center;
  38. padding: 0 32px;
  39. }
  40. span {
  41. color: rgba(0, 0, 0, 0.45);
  42. display: inline-block;
  43. font-size: 14px;
  44. line-height: 22px;
  45. margin-bottom: 4px;
  46. }
  47. p {
  48. color: rgba(0, 0, 0, 0.85);
  49. font-size: 28px;
  50. line-height: 32px;
  51. margin: 0;
  52. }
  53. em {
  54. background-color: #e8e8e8;
  55. position: absolute;
  56. height: 56px;
  57. width: 1px;
  58. top: 0;
  59. right: 0;
  60. }
  61. }
  62. </style>