0.0.7 • Published 6 years ago

mp-router-interceptor v0.0.7

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

#Demo

// 定义routes
const router = new mpRouter({
    routes: [
        {
            name: 'policyMain',
            path: '/pages/policy/main'
        }
    ]
})

// 在初始化Vue时引用router
const app = new Vue({
  // 省略若干...
  router
});

// 跳转到指定的路由
this.$router.push({
  name: 'policyMain'
})

//使用路由守卫
router.beforeEach(async (to, from, next)=>{
    //do sth
})

router.afterEach(async (to, from)=>{
    //do sth
})
0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago