bug
zhangzeli
2022-01-25 18e631a28d5b0fc6bb273e9c6e18bb7158d5f83e
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<template>
  <Card
    :padding="0"
    :bordered="bordered"
    :style="{ backgroundColor: backgroundColor }"
  >
    <div
      class="card-content card4"
      :style="{ backgroundImage: backgroundImage }"
    >
      <div class="card-body" :style="{ height: cardHeight }">
        <div
          class="card-title"
          :style="{
            color: titleColor,
            fontSize: titleSize,
            fontWeight: titleWeight,
          }"
        >
          {{ title }}
        </div>
        <div>
          <div
            class="card-time"
            :style="{
              color: timeColor,
              fontSize: timeSize,
              fontWeight: timeWeight,
              marginBottom: timeBottom,
            }"
          >
            {{ time }}
          </div>
          <div
            class="card-description"
            :style="{
              color: descriptionColor,
              fontSize: descriptionSize,
              fontWeight: descriptionWeight,
              marginBottom: descriptionBottom,
            }"
          >
            {{ description }}
          </div>
        </div>
      </div>
    </div>
  </Card>
</template>
 
<script>
export default {
  name: "card4",
  components: {},
  props: {
    cardHeight: {
      type: String,
      default: "102px",
    },
    backgroundColor: String,
    backgroundImage: String,
    bordered: {
      type: Boolean,
      default: true,
    },
    title: String,
    titleColor: {
      type: String,
      default: "#b5b5c5",
    },
    titleSize: {
      type: String,
      default: "16px",
    },
    titleWeight: {
      type: Number,
      default: 500,
    },
    time: String,
    timeColor: {
      type: String,
      default: "#1bc5bd",
    },
    timeSize: {
      type: String,
      default: "12px",
    },
    timeWeight: {
      type: Number,
      default: 500,
    },
    timeBottom: {
      type: String,
      default: "10px",
    },
    description: String,
    descriptionColor: {
      type: String,
      default: "#3f4255",
    },
    descriptionSize: {
      type: String,
      default: "16px",
    },
    descriptionWeight: {
      type: Number,
      default: 600,
    },
    descriptionBottom: {
      type: String,
      default: "0px",
    },
  },
};
</script>
<style lang="less" scoped>
.card-content {
  padding: 26px 30px;
}
.card4 {
  background-position: right top;
  background-size: 30% auto;
  background-repeat: no-repeat;
  .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    .card-description {
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }
  }
}
</style>