vue 避免多次点击导航报错

2020-09-12  本文已影响0人  Hi丶粢醍

// 避免多次点击导航报错

const originalPush = VueRouter.prototype.push;

VueRouter.prototype.push = function push(location) {

  return originalPush.call(this, location).catch(err => err);

};
上一篇下一篇

猜你喜欢

热点阅读