專案的錯誤內容

分析問題
其實可以明顯的看到資訊已經提示是vue-router出了問題。
但我第一次遇到這種問題,屬於小白的我還比較慌張,立馬就去網上查閱資料,然後知道了這個是堆疊溢位,大概意思是遞迴太深,導致棧溢位。
當時正在寫一個css樣式,用到了一個rem.JS裡面的立即執行函式,沒有看報錯的內容就把函式遮蔽掉了,並沒有解決錯誤。
然後就去看報錯的內容,明顯的提示到了vue-router的問題,我就去看我的路由攔截器 發現有一個攔截會跳到404頁面

結果嘞 我的專案中卻沒有404頁面,就產生了報錯!

解決問題

完美解決,大家記得一定要看瀏覽器輸出的錯誤, 不要像我一樣多此一舉~