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
| <script lang="ts">
| import { defineComponent } from 'vue';
|
| export default defineComponent({
| name: 'HdwCard',
| props: {
| isFull: {
| type: Boolean,
| default: false
| },
| title: {
| type: String,
| default: ''
| }
| }
| });
| </script>
|
| <template>
| <div class="hdw-card" :class="[isFull && 'is-full', title && 'is-has-title']">
| <div v-if="title" class="hdw-card-title">
| <img src="./images/arrow_mark.png" alt="" />
| {{title}}
| <div class="tools">
| <slot name="tools"></slot>
| </div>
| </div>
| <div class="hdw-card-content">
| <slot></slot>
| </div>
| </div>
| </template>
|
| <style scoped lang="scss">
| .hdw-card {
| box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
| padding: 0 8px 8px 8px;
| border-radius: 4px;
|
| &.is-full {
| height: 100%;
|
| .hdw-card-content {
| padding-top: 8px;
| height: 100%;
| }
|
| &.is-has-title {
| .hdw-card-content {
| height: calc(100% - 30px);
| }
| }
| }
|
| .hdw-card-title {
| color: var(--light-color);
| margin-left: -8px;
| margin-right: -8px;
| padding: 8px;
| border-bottom: 1px solid #00feff30;
| font-weight: 700;
| font-size: 14px;
| position: relative;
|
| img {
| width: auto;
| height: 10px;
| }
| .tools {
| position: absolute;
| right: 8px;
| top: 4px;
| }
| }
| }
| </style>
|
|