我需要在watch方法上调用函数“ getService”和“ getTabs”。问题是当我决定更改$ route时,另一个被调用,但另一个没有被调用。我的代码有问题吗?
watch: {
$route: "getService",
$route: "getTabs"
},
答案 0 :(得分:0)
当路线更改时,您可以调用这两种方法:
watch: {
'$route' () {
this.getService()
this.getTabs()
}
}