面包屑

188 阅读1分钟
 watch: {
     $route() {
         //[{name: 'home'},{name: 'list'}]
         console.log(this.$route.matched);
         //['home','list']
        this.crumbData = this.$route.matched.map(m => m.name)
     }
 }