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
| <template>
| <div class="card-box-wrapper">
| <div class="card-box">
| <div class="card-box-header">
| <div class="card-box-icon">
| <i class="iconfont" :class="icon"></i>
| </div>
| <div class="card-box-text">
| {{text}}
| </div>
| </div>
| <div class="card-box-content">
| <slot>0</slot>
| </div>
| </div>
| </div>
| </template>
|
| <script>
| export default {
| name: "CardBox",
| props: {
| icon: {
| type: String,
| default: 'el-icon-2shi'
| },
| text: {
| type: String,
| default: "文本内容"
| }
| }
| }
| </script>
|
| <style scoped>
| .card-box {
| display: inline-block;
| box-sizing: border-box;
| border-radius: 5px;
| overflow: hidden;
| background-color: #105678;
| }
| .card-box-header {
| min-width: 50px;
| padding: 8px;
| background-color: #0081FF;
| text-align: center;
| }
| .card-box-icon .iconfont {
| font-size: 36px;
| }
| .card-box-text {
| margin-top: 4px;
| font-size: 14px;
| }
| .card-box-content {
| padding: 4px;
| text-align: center;
|
| }
| </style>
|
|