vue路由的传参问题:NavigationDuplicated: Avoided redundant navigation to current location

vue路由的传参问题:NavigationDuplicated: Avoided redundant navigation to current location,第1张

场景: 提示:相关背景:
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路由跳转的路径和参数不一样

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1296550.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-10
下一篇 2022-06-10

发表评论

登录后才能评论

评论列表(0条)

保存