inleft
2022-01-16 aab8119ad66583d65d517e2eb8e574b8794180c9
src/components/mini/tagTime.vue
@@ -10,7 +10,7 @@
               {{yearData.year}}年
            </a-divider>
            <a-timeline-item v-for="monthData in yearData.monthList" color="green">
            <a-timeline-item v-for="monthData in yearData.monthList" color="white">
               <a-icon slot="dot" type="clock-circle-o" style="font-size: 18px;" />
               <h3>{{monthData.month}}</h3>
               <div v-for="article in monthData.list">
@@ -23,6 +23,138 @@
</template>
<script>
   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"
                  }
               ]
            },
            {
               "month": "4月09日",
               "list": [{
                  "name": "陈奕迅-Body Song 歌词1",
                  "remark": "111"
               }]
            },
            {
               "month": "3月18日",
               "list": [{
                  "name": "陈奕迅-Body Song 歌词1",
                  "remark": "111"
               }]
            },
         ]
      },
      {
         "year": "2021",
         "monthList": [{
               "month": "9月18日",
               "list": [{
                     "name": "陈奕迅-Body Song 歌词1",
                     "remark": "随笔"
                  },
                  {
                     "name": "vue动态路由异步加载",
                  }
               ]
            },
            {
               "month": "9月12日",
               "list": [{
                  "name": "陈奕迅-Body Song 歌词1",
                  "remark": "111"
               }]
            },
            {
               "month": "9月09日",
               "list": [{
                  "name": "陈奕迅-Body Song 歌词1",
                  "remark": "111"
               }]
            },
            {
               "month": "9月08日",
               "list": [{
                  "name": "陈奕迅-Body Song 歌词1",
                  "remark": "111"
               }]
            },
         ]
      },
      {
         "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"
                  }
               ]
            }
         ]
      }
   ]
   export default {
      props: {
         'type': Number,
@@ -30,126 +162,25 @@
      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"
                        }
                     ]
                  }
               ]
      watch: {
         '$route'(to, from) {
            var type = this.$route.query.type;
            var list = [];
            if (type == 1) {
               list = tempList;
            } else if (type == 2) {
               list.push(tempList[0]);
            } else if (type == 3) {
               list.push(tempList[1]);
            }
         ]
            this.list = list
         }
      },
      data() {
         var list = [];
         var type = this.$route.query.type;
@@ -157,7 +188,6 @@
            list = tempList;
         } else if (type == 2) {
            list.push(tempList[0]);
            list.push(tempList[1]);
         } else if (type == 3) {
            list.push(tempList[1]);
         }