報錯:[Vue warn]: Error in render: "TypeError: Cannot read property 'matched' of undefined"

如圖所示: 源碼: 錯誤原因: 在new Vue()的實例中對路由名稱的識別是唯一的,所以 route 並不能被識別,所以需要修改爲【router】   另外,在配置路由的時候,還需要注意routes這個也是固定的,如圖:
相關文章
相關標籤/搜索