show-box.vue
2.25 KB
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
<template>
<div class="show-box" :class="{ 'first-box': isFirst, 'last-box': isLast, 'zero-top-margin': zeroTopMargin }">
<slot></slot>
</div>
</template>
<style>
.show-box {
position: relative;
margin-top: 20px;
background: #fff;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
padding: 30px;
word-wrap: break-word;
img {
max-width: 100%;
}
p {
color: #808080;
font-size: 24px;
line-height: 48px;
}
hr {
border: none;
border-bottom: 1px solid #eee;
margin: 32px 0 20px;
}
h2 {
margin: 0;
font-size: 32px;
text-align: left;
color: #000;
font-weight: normal;
display: inline-block;
+ i {
font-size: 14px;
font-style: normal;
color: #b0b0b0;
font-weight: normal;
}
}
.module-title {
position: relative;
}
.switch-icon {
&.icon-sort-up {
position: absolute;
top: 15px;
right: 0;
font-size: 40px;
}
&.icon-sort-down {
position: absolute;
top: -10px;
right: 0;
font-size: 40px;
}
}
ul {
list-style: none;
padding: 0;
}
.image-box {
float: left;
}
.text-box {
float: left;
margin-left: 20px;
text-align: center;
line-height: 36px;
}
.clear-fix {
clear: both;
}
&.first-box {
margin-top: 0;
padding: 0;
}
&.last-box {
margin-bottom: 99px;
}
&.zero-top-margin {
margin-top: 0;
}
}
</style>
<script>
export default {
props: {
isFirst: [Boolean],
isLast: [Boolean],
zeroTopMargin: [Boolean]
},
data() {
return {};
}
};
</script>