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
| <template>
| <div class="home-card">
| <div class="home-card-container">
| <div class="home-card-header">
| <span class="home-card-title" :class="{'red': isRedTitle}">{{ title }}</span>
| <div class="tools">
| <slot name="tools"></slot>
| </div>
| </div>
| <div :class="['home-card-body', contentClass]">
| <slot></slot>
| </div>
| </div>
| </div>
| </template>
|
| <script>
| export default {
| name: "home_card",
| props: {
| title: {
| type: String,
| default: ""
| },
| contentClass: {
| type: [String, Array],
| default() {
| return []
| }
| },
| isRedTitle: {
| type: Boolean,
| default: false
| }
| },
| data() {
| return {};
| },
| methods: {}
| }
| </script>
|
| <style scoped>
| .home-card {
| height: 100%;
| box-sizing: border-box;
| padding-bottom: 8px;
| }
| .home-card-container {
| display: flex;
| flex-direction: column;
| height: 100%;
| /* background-color: #023752; */
| }
| .home-card-header {
| padding: 8px;
| position: relative;
| }
| .tools {
| position: absolute;
| top: 8px;
| right: 8px;
| display: flex;
| }
| .home-card-header img {
| height: 16px;
| vertical-align: middle;
| }
| .home-card-title {
| margin-left: 8px;
| color: #00feff;
| font-size: 20px;
| font-weight: bold;
| }
| .home-card-title.red {
| color: #ff0000;
| }
| .home-card-body {
| flex: 1;
| position: relative;
| }
| .home-card-title-sub {
| font-size: 16px;
| }
| </style>
|
|