commit | author | age
|
41b36f
|
1 |
<template> |
I |
2 |
<div class="swichTag"> |
|
3 |
|
|
4 |
<a-page-header title="归档时间线" style="padding: 0px;" @back="() => this.$router.go(-1)" /> |
|
5 |
|
|
6 |
<a-timeline pending="没有更多了..."> |
|
7 |
<a-icon slot="pendingDot" type="close-circle" style="font-size: 18px;" /> |
|
8 |
<div v-for="yearData in list"> |
|
9 |
<a-divider orientation="left"> |
|
10 |
{{yearData.year}}年 |
|
11 |
</a-divider> |
|
12 |
|
|
13 |
<a-timeline-item v-for="monthData in yearData.monthList" color="green"> |
|
14 |
<a-icon slot="dot" type="clock-circle-o" style="font-size: 18px;" /> |
|
15 |
<h3>{{monthData.month}}</h3> |
|
16 |
<div v-for="article in monthData.list"> |
|
17 |
<span>{{article.name}} </span>{{article.remark}} |
|
18 |
</div> |
|
19 |
</a-timeline-item> |
|
20 |
</div> |
|
21 |
</a-timeline> |
|
22 |
</div> |
|
23 |
</template> |
|
24 |
|
|
25 |
<script> |
|
26 |
export default { |
|
27 |
props: { |
|
28 |
'type': Number, |
|
29 |
}, |
|
30 |
mounted() { |
|
31 |
console.log(this.$route.query) |
|
32 |
}, |
|
33 |
|
|
34 |
data() { |
|
35 |
var tempList = [{ |
|
36 |
"year": "2022", |
|
37 |
"monthList": [{ |
|
38 |
"month": "9月18日", |
|
39 |
"list": [{ |
|
40 |
"name": "陈奕迅-Body Song 歌词1", |
|
41 |
"remark": "随笔" |
|
42 |
}, |
|
43 |
{ |
|
44 |
"name": "vue动态路由异步加载", |
|
45 |
|
|
46 |
} |
|
47 |
] |
|
48 |
}, |
|
49 |
{ |
|
50 |
"month": "9月08日", |
|
51 |
"list": [{ |
|
52 |
"name": "陈奕迅-Body Song 歌词1", |
|
53 |
"remark": "111" |
|
54 |
}] |
|
55 |
}, |
|
56 |
{ |
|
57 |
"month": "8月16日", |
|
58 |
"list": [{ |
|
59 |
"name": "陈奕迅-Body Song 歌词1", |
|
60 |
"remark": "111" |
|
61 |
}, |
|
62 |
{ |
|
63 |
"name": "陈奕迅-Body Song 歌词1", |
|
64 |
|
|
65 |
}, |
|
66 |
{ |
|
67 |
"name": "陈奕迅-Body Song 歌词2", |
|
68 |
"remark": "22" |
|
69 |
} |
|
70 |
] |
|
71 |
} |
|
72 |
] |
|
73 |
}, |
|
74 |
{ |
|
75 |
"year": "2021", |
|
76 |
"monthList": [{ |
|
77 |
"month": "9月18日", |
|
78 |
"list": [{ |
|
79 |
"name": "陈奕迅-Body Song 歌词1", |
|
80 |
"remark": "随笔" |
|
81 |
}, |
|
82 |
{ |
|
83 |
"name": "vue动态路由异步加载", |
|
84 |
|
|
85 |
} |
|
86 |
] |
|
87 |
}, |
|
88 |
{ |
|
89 |
"month": "9月08日", |
|
90 |
"list": [{ |
|
91 |
"name": "陈奕迅-Body Song 歌词1", |
|
92 |
"remark": "111" |
|
93 |
}] |
|
94 |
}, |
|
95 |
{ |
|
96 |
"month": "8月16日", |
|
97 |
"list": [{ |
|
98 |
"name": "陈奕迅-Body Song 歌词1", |
|
99 |
"remark": "111" |
|
100 |
}, |
|
101 |
{ |
|
102 |
"name": "陈奕迅-Body Song 歌词1", |
|
103 |
|
|
104 |
}, |
|
105 |
{ |
|
106 |
"name": "陈奕迅-Body Song 歌词2", |
|
107 |
"remark": "22" |
|
108 |
} |
|
109 |
] |
|
110 |
} |
|
111 |
] |
|
112 |
}, |
|
113 |
{ |
|
114 |
"year": "2020", |
|
115 |
"monthList": [{ |
|
116 |
"month": "9月18日", |
|
117 |
"list": [{ |
|
118 |
"name": "陈奕迅-Body Song 歌词1", |
|
119 |
"remark": "随笔" |
|
120 |
}, |
|
121 |
{ |
|
122 |
"name": "vue动态路由异步加载", |
|
123 |
|
|
124 |
} |
|
125 |
] |
|
126 |
}, |
|
127 |
{ |
|
128 |
"month": "9月08日", |
|
129 |
"list": [{ |
|
130 |
"name": "陈奕迅-Body Song 歌词1", |
|
131 |
"remark": "111" |
|
132 |
}] |
|
133 |
}, |
|
134 |
{ |
|
135 |
"month": "8月16日", |
|
136 |
"list": [{ |
|
137 |
"name": "陈奕迅-Body Song 歌词1", |
|
138 |
"remark": "111" |
|
139 |
}, |
|
140 |
{ |
|
141 |
"name": "陈奕迅-Body Song 歌词1", |
|
142 |
|
|
143 |
}, |
|
144 |
{ |
|
145 |
"name": "陈奕迅-Body Song 歌词2", |
|
146 |
"remark": "22" |
|
147 |
} |
|
148 |
] |
|
149 |
} |
|
150 |
] |
|
151 |
} |
|
152 |
] |
|
153 |
|
|
154 |
var list = []; |
|
155 |
var type = this.$route.query.type; |
|
156 |
if (type == 1) { |
|
157 |
list = tempList; |
|
158 |
} else if (type == 2) { |
|
159 |
list.push(tempList[0]); |
|
160 |
list.push(tempList[1]); |
|
161 |
} else if (type == 3) { |
|
162 |
list.push(tempList[1]); |
|
163 |
} |
|
164 |
|
|
165 |
return { |
|
166 |
list: list |
|
167 |
} |
|
168 |
} |
|
169 |
} |
|
170 |
</script> |
|
171 |
|
|
172 |
|
|
173 |
<style lang="less"> |
|
174 |
.ant-timeline-item-content { |
|
175 |
span { |
|
176 |
line-height: 30px; |
|
177 |
} |
|
178 |
} |
|
179 |
</style> |