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
| <template>
| <div class="my-card">
| <div class="my-card-header">
| <div class="card-title">
| <img src="@/assets/images/card-title.png" class="card-title-img">
| {{title}}
| </div>
| <div class="my-card-tools">
| <slot name="card-tools"></slot>
| </div>
| </div>
| <div class="my-card-body">
| <slot></slot>
| </div>
| <div class="my-card-footer">
| <slot name="card-footer"></slot>
| </div>
| </div>
| </template>
|
| <script>
| export default {
| name: 'MyCard',
| props: {
| title: {
| type: String,
| default: '卡片描述'
| }
| },
| }
| </script>
|
| <style scoped>
| .my-card {
| position: relative;
| display: flex;
| flex-direction: column;
| /* background: url(../assets/images/box_bg.png) no-repeat 0 0; */
| /* background-size: 100% 100%; */
| padding-bottom: 24px;
| min-height: 200px;
| height: 100%;
| box-sizing:border-box;
| border: 1px solid #0ff;
| border-radius: 6px;
| }
| .my-card-header {
| display: flex;
| font-size: 16px;
| margin: 8px;
| padding: 8px;
| }
| .card-title-img {
| vertical-align: middle;
| margin-right: 4px;
| }
| .card-title {
| color: #00feff;
| font-weight: bold;
| line-height: 32px;
| }
| .my-card-tools {
| flex: 1;
| text-align: right;
| }
| .my-card-body {
| flex: 1;
| overflow-y: auto;
| }
| </style>
|
|