普兆健康管家前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.4 KiB

  1. <template>
  2. <view class="header">
  3. <view class="flex info">
  4. <view class="flex label">
  5. <text>BMI 指数</text>
  6. <text class="highlight">{{ BMI || '-' }}</text>
  7. </view>
  8. <view class="progress" v-if="BMI">
  9. <progressBar :progress="BMI" :total="30"></progressBar>
  10. </view>
  11. </view>
  12. <view class="desc">
  13. * 你的身体质量指数BMI=19.8 kg/m2属于正常范围请继续均衡饮食合理运动
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. import progressBar from '@/pages_order/components/progressBar.vue';
  19. export default {
  20. components: {
  21. progressBar,
  22. },
  23. props: {
  24. BMI: {
  25. type: Number,
  26. default: null,
  27. }
  28. }
  29. }
  30. </script>
  31. <style scoped lang="scss">
  32. .info {
  33. column-gap: 32rpx;
  34. justify-content: flex-start;
  35. }
  36. .label {
  37. font-family: PingFang SC;
  38. font-weight: 400;
  39. font-size: 36rpx;
  40. line-height: 1.2;
  41. color: #252545CC;
  42. .highlight {
  43. margin-left: 8rpx;
  44. font-size: 64rpx;
  45. font-weight: 600;
  46. line-height: 1.4;
  47. font-family: PingFang SC;
  48. color: transparent;
  49. background-image: linear-gradient(to right, #4B348F, #845CFA);
  50. background-clip: text;
  51. display: inline-block;
  52. }
  53. }
  54. .progress {
  55. width: 222rpx;
  56. }
  57. .desc {
  58. margin-top: 4rpx;
  59. font-family: PingFang SC;
  60. font-weight: 400;
  61. font-size: 24rpx;
  62. line-height: 1.5;
  63. color: #989898;
  64. }
  65. </style>