摘要:
命名视图实现经典布局 标签代码结构: <div id="app"> <router-view></router-view> <div class="content"> <router-view name="a"></router-view> <router-view name="b"></route 阅读全文
摘要:
使用 children 属性实现路由嵌套 <div id="app"> <router-link to="/account">Account</router-link> <router-view></router-view> </div> <script> // 父路由中的组件 const 阅读全文
摘要:
设置路由高亮 css: .router-link-active, /* vue-router*/ .myactive { color: red; font-weight: 800; font-style: italic; font-size: 80px; text-decoration: under 阅读全文
摘要:
什么是路由 后端路由:对于普通的网站,所有的超链接都是URL地址,所有的URL地址都对应服务器上对应的资源,这个对应关系就是后端中的路由; 前端路由:对于单页面应用程序来说,主要通过URL中的hash(#号)来实现不同页面之间的切换,同时,hash有一个特点:HTTP请求中不会包含hash相关的内容 阅读全文