cwg-label-line-value.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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: var(--bs-emphasis-color);
  35. white-space: nowrap;
  36. }
  37. .line {
  38. flex: 1;
  39. height: 1px;
  40. border-top: 1px dashed var(--bs-border-color);
  41. margin-bottom: px2rpx(1);
  42. }
  43. .value {
  44. display: flex;
  45. align-items: flex-end;
  46. max-width: 50%;
  47. font-weight: 500;
  48. color: var(--bs-emphasis-color) !important;
  49. }
  50. }
  51. </style>