中等Vue路由
0 1

请解释:Vue的前端路由?如何实现 是什么?

【概念释义】

前端路由 在 SPA 内监听 URL 变化(hashhistory),映射到组件,无整页刷新。实现:Vue Router 维护 route 表 + matcher + history 栈 + 视图 <router-view>

【基础使用】

javascript
const router = new VueRouter({
  mode: "history",
  routes: [
    { path: "/", component: Home },

登录查看完整 725

回答讨论

暂无讨论,登录后可抢先发言

本题库更多题目(50)