给router-view加唯一key

 <router-view :key="key"/>
 

    computed: {
      key() {
        return this.$route.name !== undefined? this.$route.name + 
        +new Date(): this.$route + +new Date()
      }
    },

 

非原创仅仅笔记