Vue.js router TypeScript
Need help with vue-stack-router?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.
luojilab

Description

Vue Stack Router

141 Stars 11 Forks MIT License 181 Commits 10 Opened issues

Services available

Need anything else?

vue-stack-router

介绍

vue-stack-router 是一个 Vue 路由管理器的社区解决方案,针对移动端而设计,支持对页面进行栈式的管理,主要有以下功能:

  • 栈式的路由管理
  • 声明式的路由配置
  • 路由query、parameter
  • 路由间数据传递
  • 细粒度、可定制的路由过渡效果

安装

npm i vue-stack-router -S

使用

import Vue from 'Vue';
import { Router, BrowserDriver, installer } from 'vue-stack-router';
import Home from './components/Home.vue';
import Detail from './components/Detail.vue';
const routes = [
  {
    name: 'home',
    path: '/',
    component: Home
  },
  {
    name: 'detail',
    path: '/detail',
    component: Detail
  }
];
const driver = new BrowserDriver({ mode: 'hash' });
const router = new Router({ routes }, driver);
Vue.use(installer, { router });

适用场景

  • 移动端、PWA
  • 客户端中由 Web 承担的 hybrid 部分

文档

文档

License

MIT

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.