BatteryInfo.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <view class="info-left">
  3. <view class="info-electric">
  4. <view><text>{{num}}</text></view>
  5. <view>{{unit}}</view>
  6. </view>
  7. <view class="line"><text></text><text></text></view>
  8. <view class="info-text">{{text}}</view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. name: "BatteryInfo",
  14. props:["num","unit","text"]
  15. };
  16. </script>
  17. <style lang="scss" scoped>
  18. .info-left {
  19. display: flex;
  20. flex-direction: column;
  21. width: 46%;
  22. margin-bottom: 12px;
  23. .info-electric {
  24. width: 100%;
  25. display: flex;
  26. justify-content: space-between;
  27. height: 10px;
  28. view:first-child {
  29. border: #1a222f solid 1px;
  30. background-color: #0e1420;
  31. height: 10px;
  32. color: white;
  33. border-radius: 8px;
  34. font-size: 16px;
  35. font-weight: 600;
  36. width: 80%;
  37. text {
  38. position: relative;
  39. bottom: 5px;
  40. }
  41. }
  42. view:last-child {
  43. position: relative;
  44. bottom: 1px;
  45. font-weight: 600;
  46. font-size: 16px;
  47. }
  48. }
  49. .line {
  50. display: flex;
  51. margin-top: 5px;
  52. :first-child {
  53. width: 2%;
  54. background-color: white;
  55. height: 2px;
  56. }
  57. :last-child {
  58. height: 2px;
  59. width: 96%;
  60. background-color: #14172a;
  61. margin-left: 5px;
  62. }
  63. }
  64. .info-text {
  65. width: 100%;
  66. margin-top: 3px;
  67. }
  68. }
  69. </style>