vue-router README

The project's README from github.com/vuejs/vue-router. As one markdown file: README.md.

vue-router Build Status

This is vue-router 3.0 which works only with Vue 2.0. and both have reached end of life.

Supporting Vue Router

Vue Router is part of the Vue Ecosystem and is an MIT-licensed open source project with its ongoing development made possible entirely by the support of Sponsors. If you would like to become a sponsor, please consider:

Gold Sponsors

VueJobs

Silver Sponsors

VueMastery Prefect

Bronze Sponsors

Stanislas Ormières Antony Konstantinidis Storyblok NuxtJS


Get started with the documentation, or play with the examples (see how to run them below).

Development Setup

# install deps
yarn

# build dist files
yarn build

# serve examples at localhost:8080
yarn dev

# lint & run all tests
yarn test

# serve docs at localhost:8080
yarn docs

Releasing

Questions

For questions and support please use the Discord chat server or the official forum. The issue list of this repo is exclusively for bug reports and feature requests.

Issues

Please make sure to read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.

Contribution

Please make sure to read the Contributing Guide before making a pull request.

Changelog

Details changes for each release are documented in the CHANGELOG.md file.

Stay In Touch

License

MIT

Copyright (c) 2013-present Evan You

Special Thanks

BrowserStack Logo

Special thanks to BrowserStack for letting the maintainers use their service to debug browser specific issues.

vue-router (vuejs/vue-router)

Searching Database…

这是什么?它是 vue-router 3.x,Vue 2 的官方路由器——把 URL 映射到组件,让 Vue 2 单页应用能够在不同页面视图之间切换。它属于 Vue Ecosystem(Vue 生态)的一部分。
这是一个我可以运行的应用,还是一个要加进项目里的库?是一个 JavaScript 库,不是独立应用:你把它安装到 Vue 2 项目里,它会接入 Vue Ecosystem(Vue 生态),和 Vue 本身一起工作。
怎么把它添加到我的 Vue 2 应用里?从 npm 安装 vue-router 包(3.x 系列),然后按照 README 里链接的文档操作;仓库里还带有可以直接在本地跑起来的示例。
除了 Vue 本身,使用它还需要别的东西吗?只需要 Vue 2 本身——这条 3.x 线路就是为配合 Vue 2.0 设计的,而且 npm 包本身不带任何运行时依赖。
Vue 2 已经停止维护了,新项目还适合用它吗?新项目不适合:vue-router 3 和 Vue 2 都已停止维护(end of life)。Vue 3 应用请使用 vuejs/router 仓库中的 Vue Router 4;这条线路仅供现有的 Vue 2 应用继续使用。
仓库自带的示例怎么运行?运行 yarn run dev——它会启动 node examples/server.js,在本地提供示例应用。生产环境的 dist 构建产物则用 yarn run build 生成。
参与路由器本身的开发需要做什么?yarn run test 会依次执行 ESLint、Flow 检查、Jasmine 单元测试和一个 Node e2e 运行器,一条命令就能完成对你所做改动的代码检查、类型检查和测试。
Creator
vuejs
Size
13.1 MB
Stars
18.9K
Age
12y
Commits · 90 Days