cwg-label-line-value.vue 1.0 KB

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