url参数发生变化,根据变化需要进行一定的操作,需要监听该url中的参数:
watch:{
"$route.query.id":(newValue,oldValue)=>{
this.id = newValue
this.getDetail();
},
},
url参数发生变化,根据变化需要进行一定的操作,需要监听该url中的参数:
watch:{
"$route.query.id":(newValue,oldValue)=>{
this.id = newValue
this.getDetail();
},
},