wupengfei
6 天以前 6968fb6e41787d311addb804b29285aecc553f2d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<template>
  <div class="income-detail-list-item">
    <div class="income-detail-list-item-inner" :class="{ 'border-none': !showBorder }">
      <slot name="title">
        <div class="income-detail-list-item-title">{{ title }}</div>
      </slot>
      <div class="income-detail-list-item-content">
        <div class="income-detail-list-item-content-item">{{ item }}</div>
        <div class="income-detail-list-item-content-value" v-if="showValue">{{ value }}</div>
      </div>
    </div>
  </div>
</template>
 
<script setup lang="ts">
defineOptions({
  name: 'IncomeDetailListItem',
});
 
type Props = {
  title?: string;
  item?: string;
  value?: string;
  showValue?: boolean;
  showBorder?: boolean;
};
 
const props = withDefaults(defineProps<Props>(), {
  showValue: true,
  showBorder: true,
});
</script>
 
<style lang="scss">
@import '@/styles/common.scss';
 
.income-detail-list-item {
  padding: 0 boleGetCssVar('size', 'body-padding-h');
 
  .income-detail-list-item-inner {
    padding: 24px 0 18px;
    border-bottom: 1px solid #f6f6f6;
    display: flex;
    flex-direction: column;
 
    &.border-none {
      border-bottom: none;
    }
 
    .income-detail-list-item-title {
      font-weight: 400;
      font-size: 24px;
      color: boleGetCssVar('text-color', 'primary');
      line-height: 34px;
    }
 
    .income-detail-list-item-content {
      display: flex;
      justify-content: space-between;
      align-items: center;
 
      .income-detail-list-item-content-item {
        font-weight: 400;
        font-size: 20px;
        color: boleGetCssVar('text-color', 'secondary');
        line-height: 44px;
      }
 
      .income-detail-list-item-content-value {
        font-weight: 500;
        font-size: 30px;
        color: boleGetCssVar('text-color', 'primary');
        line-height: 44px;
      }
    }
  }
}
</style>