🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

vue-router-interceptor

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-router-interceptor

Effortlessly interceptor your router

1.0.1
latest
Source
npm
Version published
Weekly downloads
3
-57.14%
Maintainers
1
Weekly downloads
 
Created
Source

vue-router-interceptor

travis-ci npm-version

帮你轻松管理路由的轻型拦截器

在大型单页(SPA)应用中,路由起着举足轻重的作用,在遇到复杂场景的时候,通常需要在进入路由时进行各种验证拦截操作、数据前置等等,这款插件就是为这种复杂场景而生

安装

npm install vue-router-interceptor --save-dev

快速开始

import router from 'router'
import VueRouterInterceptor from 'vue-router-interceptor'

const interceptor = VueRouterInterceptor.Create(router)
const requireAuth = interceptor.register('requireAuth')

function middlewre () {
  // ...
}

requireAuth.use(middleware)
requireAuth.listen()

更多细节请查阅 在线文档

Lisence

MIT

Keywords

vue-router

FAQs

Package last updated on 03 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts