主要原因是Vue 重复点击相同路由造成的:

解决方案:

      第一种:在 router 文件夹下里面的文件index.js里面找到如下位置:

        // src/router/index.js

         Vue.use(Router)

        const router = new Router({

             routes

        })

        找到上面位置,在下面增加这段代码即可。

        const VueRouterPush = Router.prototype.push

        Router.prototype.push = function push (to) {

              return VueRouterPush.call(this, to).catch(err => err)

        }

 

 

参考链接:https://blog.csdn.net/qq_36437172/article/details/108269846

相关文章:

  • 2022-12-23
  • 2021-12-18
  • 2021-04-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-15
  • 2021-07-02
猜你喜欢
  • 2022-02-05
  • 2022-12-23
  • 2022-02-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-16
相关资源
相似解决方案