NavigationDuplicated 导航到当前位置 (“/search") 是不允许的 [英] NavigationDuplicated Navigating to current location ("/search") is not allowed

查看:27
本文介绍了NavigationDuplicated 导航到当前位置 (“/search") 是不允许的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我想多次搜索时,它会向我显示 NavigationDuplicated 错误.我的搜索在导航栏中,我配置搜索的方式是使用模型获取值,然后将该值作为参数传递给 ContentSearched 组件,然后在该组件中接收搜索值.

我知道正确的方法是使用发射器,但我仍然不知道如何学习使用它.访问发射是 context.emit('', someValue)

NavigationDuplicated {_name: "NavigationDuplicated", name: "NavigationDuplicated", message: "Navigate to current location ("/search") is not allowed";, stack: Error↵ at new NavigationDuplicated (webpack-int…node_modules/vue/dist/vue.runtime.esm.js:1853:26)"}

NavBar.vue