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
139
140
141
142
143
144
145
| <template>
| <Card
| :padding="0"
| :bordered="bordered"
| :style="{ backgroundColor: backgroundColor }"
| >
| <div
| class="card-content card3"
| :style="{ backgroundImage: backgroundImage }"
| >
| <div class="card-body" :style="{ height: cardHeight }">
| <Icon
| :type="icon"
| :color="iconColor"
| :size="iconSize"
| v-if="icon"
| ></Icon>
| <img :src="image" :width="width" :height="height" v-else />
| <div>
| <div
| class="card-title"
| :style="{
| color: titleColor,
| fontSize: titleSize,
| fontWeight: titleWeight,
| marginBottom: titleBottom,
| }"
| >
| {{ title }}
| </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: "card3",
| components: {},
| props: {
| cardHeight: {
| type: String,
| default: "102px",
| },
| backgroundColor: String,
| backgroundImage: String,
| bordered: {
| type: Boolean,
| default: true,
| },
| icon: String,
| iconSize: {
| type: Number,
| default: 36,
| },
| iconColor: {
| type: String,
| default: "#478ef9",
| },
| image: String,
| width: {
| type: String,
| default: "30px",
| },
| height: {
| type: String,
| default: "30px",
| },
| title: String,
| titleColor: {
| type: String,
| default: "#3f4255",
| },
| titleSize: {
| type: String,
| default: "18px",
| },
| titleWeight: {
| type: Number,
| default: 600,
| },
| titleBottom: {
| type: String,
| default: "0px",
| },
| description: String,
| descriptionColor: {
| type: String,
| default: "#3f4255",
| },
| descriptionSize: {
| type: String,
| default: "12px",
| },
| descriptionWeight: {
| type: Number,
| default: 500,
| },
| descriptionBottom: {
| type: String,
| default: "0px",
| },
| },
| };
| </script>
| <style lang="less" scoped>
| .card-content {
| padding: 26px 30px;
| }
| .card3 {
| 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-title {
| overflow: hidden;
| text-overflow: ellipsis;
| white-space: nowrap;
| }
| .card-description {
| overflow: hidden;
| text-overflow: ellipsis;
| display: -webkit-box;
| -webkit-line-clamp: 2;
| -webkit-box-orient: vertical;
| }
| }
| }
| </style>
|
|