$route
为当前跳转路由
可以通过$router
来拿到 $router.path
$router.query
$router.path
watch: {
'$route.params.keyWords': {
handler (newVal) {
console.log(newVal)
},
immediate: true,
deep: true
}
}
$route
为当前跳转路由
可以通过$router
来拿到 $router.path
$router.query
$router.path
watch: {
'$route.params.keyWords': {
handler (newVal) {
console.log(newVal)
},
immediate: true,
deep: true
}
}