zhuangjie
ZhuangJie
与method同级的:
 
    watch: {//监听路由变化
        $route(to,from){
           if(!(this.$route.params && this.$route.params.id)) {
              this.courseInfo = {}  //清空
           }
        }
    },

 

posted on 2021-02-24 14:42  zhuangjie  阅读(86)  评论(0)    收藏  举报