achievements.vue
3.66 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<template>
<div class="cardBox">
<van-tabs v-model="tabsName">
<van-tab title="红色教育"></van-tab>
<van-tab title="劳动教育"></van-tab>
<van-tab title="课外实践"></van-tab>
<van-tab title="研学旅行"></van-tab>
</van-tabs>
<div class="contextBox">
<div class="art_card" @click="toDetails">
<div class="art_title">庆祝中国共产主义青年团成立100年大会</div>
<div class="art_bot">
<div class="redSticky">置顶</div>
<div class="greyTime">发布于2022.5.10</div>
<div class="greyFont">浏览量 2022</div>
</div>
</div>
<div class="art_card_pic">
<div class="art_context">
<div class="art_title">不忘初心 砥砺前行</div>
<div class="art_bot">
<div class="redSticky">置顶</div>
<div class="greyTime">发布于2022.5.10</div>
<div class="greyFont">浏览量 2022</div>
</div>
</div>
<div class="art_pic"></div>
</div>
</div>
<tabbar4 active="fruit"></tabbar4>
</div>
</template>
<script>
import Tabbar4 from "@/component/Tabbar4";
export default {
components: { Tabbar4 },
data() {
return {
tabsName: 1,
};
},
methods: {
//详情新闻
toDetails() {
this.$router.push({ name: "pageDetails" });
},
},
};
</script>
<style lang="scss" scoped>
.cardBox {
padding: 2vw 0;
box-sizing: border-box;
.contextBox {
.art_card {
padding: 28px;
box-sizing: border-box;
.art_title {
width: 100%;
font-size: 34px;
font-weight: bold;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1; //限制行数
overflow: hidden; //超出部分隐藏
text-overflow: ellipsis; //用一个省略号代替超出的内容
}
.art_bot {
padding-top: 22px;
box-sizing: border-box;
display: flex;
align-items: center;
.redSticky {
color: #ff4444;
font-size: 24px;
padding: 2px;
box-sizing: border-box;
border: 1px solid #ff4444;
}
.greyTime {
color: #999;
font-size: 24px;
margin: 0 20px;
}
.greyFont {
color: #999;
font-size: 24px;
}
}
}
.art_card_pic {
padding: 28px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
.art_context {
height: 180px;
display: flex;
align-content: space-between;
flex-wrap: wrap;
.art_title {
width: 100%;
font-size: 34px;
font-weight: bold;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2; //限制行数
overflow: hidden; //超出部分隐藏
text-overflow: ellipsis; //用一个省略号代替超出的内容
}
.art_bot {
padding-top: 22px;
box-sizing: border-box;
display: flex;
align-items: center;
.redSticky {
color: #ff4444;
font-size: 24px;
padding: 2px;
box-sizing: border-box;
border: 1px solid #ff4444;
}
.greyTime {
color: #999;
font-size: 24px;
margin: 0 20px;
}
.greyFont {
color: #999;
font-size: 24px;
}
}
}
.art_pic {
width: 180px;
height: 180px;
flex-shrink: 0;
background-color: #ff4444;
}
}
}
}
</style>