問題產生的原因:在Vue導航菜單中,重複點擊一個菜單,即重複觸發一個相同的路由,會報錯,但不影響功能
解決:在router的配置文件中加入如下代碼:
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
問題產生的原因:在Vue導航菜單中,重複點擊一個菜單,即重複觸發一個相同的路由,會報錯,但不影響功能
解決:在router的配置文件中加入如下代碼:
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
從其他機器拷貝一個複製到下面的目錄 C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework