1.使用router-link 不会让页面刷新,使用a标签会使页面刷新.2.router-link 里面的to="/路由地址" tag=""自定义标签" 默认为a标签,linkActiveClass 可以更改默认类名.3.在 HTML5 history 模式下,router-link 会拦截点击事件,让浏览器不在重新加载页面.4.当你在 HTML5 history 模式下使用 base 选项之后,所有的 to 属性都不需要写(基路径)了.5.传参:<…
Dynamic Route Matching 动态的 路由 匹配 Very often we will need to map routes with the given pattern to the same component. For example we may have a User component which should be rendered for all users but with different user IDs. In vue-router we can use…