Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: “/xxx”.
在router/indexjs中添加上以下代码
const originalPush = Router.prototype.push;
Router.prototype.push = function push(location, onResolve, onReject) {
if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject);
return originalPush.call(this, location).catch((err) => err);
};