vue中$route和$router的區別:
1.$router是路由實例,而$route為當前router跳轉對象;
2.$route包括path、params、hash、query、fullPath、matched、name等路由信息參數,而$router包括了路由的跳轉方法,鉤子函數等,在script標簽中想要導航到不同的URL,可使用$router.push方法。