vue有個寫法需要注意:
如果是跳轉到默認首頁,router-link 應該寫:
to: "{path: ' / ' } "
如果跳轉到非默認首頁的時候,router-link 應該寫:
to: "{path: ' about ' } "
就是除了跳轉到默認首頁的情況下,其他的都要去掉開始的斜槓 / ,是個坑,我踩了,祝你好運
vue有個寫法需要注意:
如果是跳轉到默認首頁,router-link 應該寫:
to: "{path: ' / ' } "
如果跳轉到非默認首頁的時候,router-link 應該寫:
to: "{path: ' about ' } "
就是除了跳轉到默認首頁的情況下,其他的都要去掉開始的斜槓 / ,是個坑,我踩了,祝你好運