commit | author | age
|
ad2b70
|
1 |
<template> |
41b36f
|
2 |
<div class="blog-container "> |
4b854c
|
3 |
<span class="blog-pigeonhole"> |
I |
4 |
<router-link :to="{path:'/articleList'}"> |
|
5 |
分类 |
|
6 |
</router-link> |
|
7 |
</span> |
ad2b70
|
8 |
<div class="blog-scroll "> |
L |
9 |
<div class="blog-log-list"> |
|
10 |
<div class="blog-log-item" v-for="item in list1"> |
4b854c
|
11 |
<router-link :to="{path:'/articleList',query:{typeId:item.id}}"> |
63af45
|
12 |
<span>{{item.typeName}}</span> |
56a4b8
|
13 |
</router-link> |
I |
14 |
|
63f511
|
15 |
<span>{{item.count==null?'--':item.count+'篇'}}</span> |
ad2b70
|
16 |
</div> |
L |
17 |
</div> |
|
18 |
<div class="blog-log-list"> |
|
19 |
<div class="blog-log-item" v-for="item in list2"> |
4b854c
|
20 |
<router-link :to="{path:'/articleList',query:{typeId:item.id}}"> |
63af45
|
21 |
<span>{{item.typeName}}</span> |
56a4b8
|
22 |
</router-link> |
63f511
|
23 |
<span>{{item.count==null?'--':item.count+'篇'}}</span> |
56a4b8
|
24 |
|
ad2b70
|
25 |
</div> |
L |
26 |
</div> |
|
27 |
</div> |
|
28 |
</div> |
|
29 |
|
|
30 |
</template> |
|
31 |
|
|
32 |
<script> |
63af45
|
33 |
import { |
I |
34 |
queryBlogArticleType |
|
35 |
} from '../../api/blogArticleType.js' |
ad2b70
|
36 |
export default { |
63af45
|
37 |
beforeMount() { |
63f511
|
38 |
this.$message.info('loading',0.3); |
63af45
|
39 |
queryBlogArticleType({}).then((res) => { |
4b854c
|
40 |
this.list1 = res.data.slice(0, 3) |
I |
41 |
this.list2 = res.data.slice(4) |
63af45
|
42 |
}) |
I |
43 |
}, |
ad2b70
|
44 |
data() { |
L |
45 |
return { |
4b854c
|
46 |
list1: [], |
I |
47 |
list2: [], |
ad2b70
|
48 |
} |
L |
49 |
} |
|
50 |
} |
|
51 |
</script> |
|
52 |
|
|
53 |
</script> |
|
54 |
|
|
55 |
<style lang="less"> |
4b854c
|
56 |
.blog-pigeonhole { |
I |
57 |
a { |
|
58 |
color: black; |
|
59 |
} |
|
60 |
} |
|
61 |
|
ad2b70
|
62 |
/*日志部分*/ |
L |
63 |
.blog-log-list { |
|
64 |
line-height: 1.6; |
|
65 |
padding-left: 3%; |
|
66 |
padding-right: 3%; |
|
67 |
|
|
68 |
flex-wrap: wrap; |
|
69 |
/*让弹性盒元素在必要的时候拆行:*/ |
|
70 |
display: -webkit-flex; |
|
71 |
display: flex; |
|
72 |
-webkit-justify-content: center; |
|
73 |
justify-content: center; |
|
74 |
} |
|
75 |
|
|
76 |
.blog-log-item { |
|
77 |
border-left: 2px solid rgba(222, 229, 231, .45); |
|
78 |
width: 23%; |
|
79 |
margin-bottom: 10px; |
|
80 |
|
|
81 |
:first-child { |
|
82 |
border-left: none; |
|
83 |
} |
|
84 |
|
d629d9
|
85 |
a { |
L |
86 |
color: black; |
|
87 |
} |
|
88 |
|
56a4b8
|
89 |
.link span:first-child { |
ad2b70
|
90 |
color: #999; |
L |
91 |
} |
|
92 |
|
56a4b8
|
93 |
.link span:last-child { |
ad2b70
|
94 |
font-weight: 600; |
L |
95 |
font-size: 15px; |
|
96 |
} |
|
97 |
|
|
98 |
span { |
|
99 |
display: block; |
|
100 |
} |
|
101 |
} |
|
102 |
</style> |