场景:
提示:相关背景:
query,params中传参。
编程式路由导航:
this.router.push(name:′xx′,query:xx1:xx2,xx3:xx4)this.router.push({
name:'xx',
query:{
xx1:xx2,
xx3:xx4
}
})
this.router.push(name:′xx′,query:xx1:xx2,xx3:xx4)this.$router.repalce({
name:‘xx’,
query:{
xx1:xx2,
xx3:xx4
}
})
两个API,push/replace路由跳转
问题描述
报错:NavigationDuplicated: Avoided redundant navigation to current location:
原因分析:
push/replace路由跳转的路径和参数一样
解决方案:
提示:让push/replace路由跳转的路径和参数不一样