inleft
2022-01-15 41b36f013d4103ffc59fd58feb6b6177ee5b04f7
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<template>
    <div class="swichTag">
 
        <a-page-header title="归档时间线" style="padding: 0px;" @back="() => this.$router.go(-1)" />
 
        <a-timeline pending="没有更多了...">
            <a-icon slot="pendingDot" type="close-circle" style="font-size: 18px;" />
            <div v-for="yearData in list">
                <a-divider orientation="left">
                    {{yearData.year}}年
                </a-divider>
 
                <a-timeline-item v-for="monthData in yearData.monthList" color="green">
                    <a-icon slot="dot" type="clock-circle-o" style="font-size: 18px;" />
                    <h3>{{monthData.month}}</h3>
                    <div v-for="article in monthData.list">
                        <span>{{article.name}} </span>{{article.remark}}
                    </div>
                </a-timeline-item>
            </div>
        </a-timeline>
    </div>
</template>
 
<script>
    export default {
        props: {
            'type': Number,
        },
        mounted() {
            console.log(this.$route.query)
        },
        
        data() {
            var tempList = [{
                    "year": "2022",
                    "monthList": [{
                            "month": "9月18日",
                            "list": [{
                                    "name": "陈奕迅-Body Song 歌词1",
                                    "remark": "随笔"
                                },
                                {
                                    "name": "vue动态路由异步加载",
 
                                }
                            ]
                        },
                        {
                            "month": "9月08日",
                            "list": [{
                                "name": "陈奕迅-Body Song 歌词1",
                                "remark": "111"
                            }]
                        },
                        {
                            "month": "8月16日",
                            "list": [{
                                    "name": "陈奕迅-Body Song 歌词1",
                                    "remark": "111"
                                },
                                {
                                    "name": "陈奕迅-Body Song 歌词1",
 
                                },
                                {
                                    "name": "陈奕迅-Body Song 歌词2",
                                    "remark": "22"
                                }
                            ]
                        }
                    ]
                },
                {
                    "year": "2021",
                    "monthList": [{
                            "month": "9月18日",
                            "list": [{
                                    "name": "陈奕迅-Body Song 歌词1",
                                    "remark": "随笔"
                                },
                                {
                                    "name": "vue动态路由异步加载",
 
                                }
                            ]
                        },
                        {
                            "month": "9月08日",
                            "list": [{
                                "name": "陈奕迅-Body Song 歌词1",
                                "remark": "111"
                            }]
                        },
                        {
                            "month": "8月16日",
                            "list": [{
                                    "name": "陈奕迅-Body Song 歌词1",
                                    "remark": "111"
                                },
                                {
                                    "name": "陈奕迅-Body Song 歌词1",
 
                                },
                                {
                                    "name": "陈奕迅-Body Song 歌词2",
                                    "remark": "22"
                                }
                            ]
                        }
                    ]
                },
                {
                    "year": "2020",
                    "monthList": [{
                            "month": "9月18日",
                            "list": [{
                                    "name": "陈奕迅-Body Song 歌词1",
                                    "remark": "随笔"
                                },
                                {
                                    "name": "vue动态路由异步加载",
 
                                }
                            ]
                        },
                        {
                            "month": "9月08日",
                            "list": [{
                                "name": "陈奕迅-Body Song 歌词1",
                                "remark": "111"
                            }]
                        },
                        {
                            "month": "8月16日",
                            "list": [{
                                    "name": "陈奕迅-Body Song 歌词1",
                                    "remark": "111"
                                },
                                {
                                    "name": "陈奕迅-Body Song 歌词1",
 
                                },
                                {
                                    "name": "陈奕迅-Body Song 歌词2",
                                    "remark": "22"
                                }
                            ]
                        }
                    ]
                }
            ]
 
            var list = [];
            var type = this.$route.query.type;
            if (type == 1) {
                list = tempList;
            } else if (type == 2) {
                list.push(tempList[0]);
                list.push(tempList[1]);
            } else if (type == 3) {
                list.push(tempList[1]);
            }
 
            return {
                list: list
            }
        }
    }
</script>
 
 
<style lang="less">
    .ant-timeline-item-content {
        span {
            line-height: 30px;
        }
    }
</style>