在执行 this.$router.push({name: ‘xxxxxx’}) 时,总是提示超出最大递归限制:
RangeError: Maximum call stack size exceeded
在windows开发机器上就不出现这个问题,在linux开发机上就出这个问题。我比对了下,版本都一致。
我的路由就两行:
const routes = [
{ path: ‘/login’, name: ‘login’, component: () => import(‘pages/auth/Login.vue’) },
{ path: ‘/register’, name: ‘register’, component: () => import(‘pages/auth/Register.vue’) }
];
export default routes;
更详细的浏览器报错信息如下:
log.js?1afd:24 [HMR] Waiting for update signal from WDS…
webpack-internal:///./.quasar/client-entry.js:33 [Quasar] Running SPA with MAT theme.
vue.runtime.esm.js?2b0e:8014 Download the Vue Devtools extension for a better development experience:
GitHub
vuejs/vue-devtools
⚙️ Browser devtools extension for debugging Vue.js applications. - vuejs/vue-devtools
client?f1f8:77 [WDS] Hot Module Replacement enabled.
vue.runtime.esm.js?2b0e:587 [Vue warn]: Error in nextTick: “RangeError: Maximum call stack size exceeded”
warn @ vue.runtime.esm.js?2b0e:587
logError @ vue.runtime.esm.js?2b0e:1737
globalHandleError @ vue.runtime.esm.js?2b0e:1732
handleError @ vue.runtime.esm.js?2b0e:1721
(anonymous) @ vue.runtime.esm.js?2b0e:1839
flushCallbacks @ vue.runtime.esm.js?2b0e:1758
Promise.then (async)
microTimerFunc @ vue.runtime.esm.js?2b0e:1806
nextTick @ vue.runtime.esm.js?2b0e:1850
queueWatcher @ vue.runtime.esm.js?2b0e:3068
update @ vue.runtime.esm.js?2b0e:3209
notify @ vue.runtime.esm.js?2b0e:693
reactiveSetter @ vue.runtime.esm.js?2b0e:1010
(anonymous) @ vue-router.esm.js?8c4f:2508
(anonymous) @ vue-router.esm.js?8c4f:2507
updateRoute @ vue-router.esm.js?8c4f:1997
(anonymous) @ vue-router.esm.js?8c4f:1875
(anonymous) @ vue-router.esm.js?8c4f:1984
step @ vue-router.esm.js?8c4f:1714
step @ vue-router.esm.js?8c4f:1721
runQueue @ vue-router.esm.js?8c4f:1725
(anonymous) @ vue-router.esm.js?8c4f:1979
step @ vue-router.esm.js?8c4f:1714
(anonymous) @ vue-router.esm.js?8c4f:1718
(anonymous) @ vue-router.esm.js?8c4f:1964
(anonymous) @ vue-router.esm.js?8c4f:1757
(anonymous) @ vue-router.esm.js?8c4f:1833
Promise.then (async)
(anonymous) @ vue-router.esm.js?8c4f:1780
(anonymous) @ vue-router.esm.js?8c4f:1801
(anonymous) @ vue-router.esm.js?8c4f:1801
flatMapComponents @ vue-router.esm.js?8c4f:1800
(anonymous) @ vue-router.esm.js?8c4f:1736
iterator @ vue-router.esm.js?8c4f:1943
step @ vue-router.esm.js?8c4f:1717
step @ vue-router.esm.js?8c4f:1721
step @ vue-router.esm.js?8c4f:1721
runQueue @ vue-router.esm.js?8c4f:1725
confirmTransition @ vue-router.esm.js?8c4f:1972
transitionTo @ vue-router.esm.js?8c4f:1874
push @ vue-router.esm.js?8c4f:2273
push @ vue-router.esm.js?8c4f:2534
gotoLogin @ Register.vue?0103:149
invoker @ vue.runtime.esm.js?2b0e:2027
Vue.$emit @ vue.runtime.esm.js?2b0e:2538
trigger @ QBtn.js?c7ec:73
click @ QBtn.js?c7ec:82
invoker @ vue.runtime.esm.js?2b0e:2027
fn._withTask.fn._withTask @ vue.runtime.esm.js?2b0e:1826
vue.runtime.esm.js?2b0e:1741 RangeError: Maximum call stack size exceeded
at Object.reactiveGetter [as blur] (vue.runtime.esm.js?2b0e:981)
at mergeData (vue.runtime.esm.js?2b0e:1130)
at mergeData (vue.runtime.esm.js?2b0e:1139)
at mergeData (vue.runtime.esm.js?2b0e:1139)
at mergeData (vue.runtime.esm.js?2b0e:1139)
at mergeData (vue.runtime.esm.js?2b0e:1139)
at mergeData (vue.runtime.esm.js?2b0e:1139)
at mergeData (vue.runtime.esm.js?2b0e:1139)
at mergeData (vue.runtime.esm.js?2b0e:1139)
at mergeData (vue.runtime.esm.js?2b0e:1139)
logError @ vue.runtime.esm.js?2b0e:1741
globalHandleError @ vue.runtime.esm.js?2b0e:1732
handleError @ vue.runtime.esm.js?2b0e:1721
(anonymous) @ vue.runtime.esm.js?2b0e:1839
flushCallbacks @ vue.runtime.esm.js?2b0e:1758
Promise.then (async)
microTimerFunc @ vue.runtime.esm.js?2b0e:1806
nextTick @ vue.runtime.esm.js?2b0e:1850
queueWatcher @ vue.runtime.esm.js?2b0e:3068
update @ vue.runtime.esm.js?2b0e:3209
notify @ vue.runtime.esm.js?2b0e:693
reactiveSetter @ vue.runtime.esm.js?2b0e:1010
(anonymous) @ vue-router.esm.js?8c4f:2508
(anonymous) @ vue-router.esm.js?8c4f:2507
updateRoute @ vue-router.esm.js?8c4f:1997
(anonymous) @ vue-router.esm.js?8c4f:1875
(anonymous) @ vue-router.esm.js?8c4f:1984
step @ vue-router.esm.js?8c4f:1714
step @ vue-router.esm.js?8c4f:1721
runQueue @ vue-router.esm.js?8c4f:1725
(anonymous) @ vue-router.esm.js?8c4f:1979
step @ vue-router.esm.js?8c4f:1714
(anonymous) @ vue-router.esm.js?8c4f:1718
(anonymous) @ vue-router.esm.js?8c4f:1964
(anonymous) @ vue-router.esm.js?8c4f:1757
(anonymous) @ vue-router.esm.js?8c4f:1833
Promise.then (async)
(anonymous) @ vue-router.esm.js?8c4f:1780
(anonymous) @ vue-router.esm.js?8c4f:1801
(anonymous) @ vue-router.esm.js?8c4f:1801
flatMapComponents @ vue-router.esm.js?8c4f:1800
(anonymous) @ vue-router.esm.js?8c4f:1736
iterator @ vue-router.esm.js?8c4f:1943
step @ vue-router.esm.js?8c4f:1717
step @ vue-router.esm.js?8c4f:1721
step @ vue-router.esm.js?8c4f:1721
runQueue @ vue-router.esm.js?8c4f:1725
confirmTransition @ vue-router.esm.js?8c4f:1972
transitionTo @ vue-router.esm.js?8c4f:1874
push @ vue-router.esm.js?8c4f:2273
push @ vue-router.esm.js?8c4f:2534
gotoLogin @ Register.vue?0103:149
invoker @ vue.runtime.esm.js?2b0e:2027
Vue.$emit @ vue.runtime.esm.js?2b0e:2538
trigger @ QBtn.js?c7ec:73
click @ QBtn.js?c7ec:82
invoker @ vue.runtime.esm.js?2b0e:2027
fn._withTask.fn._withTask @ vue.runtime.esm.js?2b0e:1826