提示:相关背景:
query,params中传参。
编程式路由导航:
this. r o u t e r . p u s h ( n a m e : ′ x x ′ , q u e r y : x x 1 : x x 2 , x x 3 : x x 4 ) t h i s . 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路由跳转的路径和参数不一样
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)