cwg-label-line-value.vue 995 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <view class="info-item">
  3. <view class="label">{{ label }}</view>
  4. <view class="line"></view>
  5. <view class="value">
  6. <view>{{ value }}</view>
  7. <slot name="operation" />
  8. </view>
  9. </view>
  10. </template>
  11. <script setup>
  12. const props = defineProps({
  13. label: {
  14. type: String,
  15. required: ""
  16. },
  17. value: {
  18. type: String,
  19. required: "--"
  20. },
  21. });
  22. </script>
  23. <style scoped lang="scss">
  24. @import "@/uni.scss";
  25. .info-item {
  26. width: 100%;
  27. display: flex;
  28. justify-content: space-between;
  29. align-items: flex-end;
  30. font-size: px2rpx(14);
  31. line-height: px2rpx(24);
  32. .label {
  33. color: #6c8595;
  34. }
  35. .line {
  36. flex: 1;
  37. height: 1px;
  38. border-top: 1px dashed rgba(20, 29, 34, .122);
  39. margin-bottom: px2rpx(1);
  40. }
  41. .value {
  42. display: flex;
  43. align-items: flex-end;
  44. font-weight: 500;
  45. color: #2e3a47;
  46. }
  47. }
  48. </style>