{"id":13396663,"url":"https://github.com/vuejs/vue-router","last_synced_at":"2025-05-13T10:49:44.531Z","repository":{"id":12455183,"uuid":"15116946","full_name":"vuejs/vue-router","owner":"vuejs","description":"🚦 The official router for Vue 2","archived":false,"fork":false,"pushed_at":"2025-03-28T15:00:10.000Z","size":12652,"stargazers_count":18989,"open_issues_count":109,"forks_count":5046,"subscribers_count":504,"default_branch":"dev","last_synced_at":"2025-05-05T20:22:10.368Z","etag":null,"topics":["javascript","router","vue"],"latest_commit_sha":null,"homepage":"http://v3.router.vuejs.org/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vuejs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/funding.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["posva","yyx990803"],"open_collective":"vuejs"}},"created_at":"2013-12-11T19:37:46.000Z","updated_at":"2025-05-05T12:54:42.000Z","dependencies_parsed_at":"2023-01-14T12:18:17.306Z","dependency_job_id":"db809dad-4ae4-4e17-b12c-24f5ff8ecf37","html_url":"https://github.com/vuejs/vue-router","commit_stats":{"total_commits":1443,"total_committers":294,"mean_commits":4.908163265306122,"dds":0.7013167013167013,"last_synced_commit":"cda5709cab0b9064bc04f6ecc7c4233730a9e353"},"previous_names":[],"tags_count":95,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vuejs%2Fvue-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vuejs%2Fvue-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vuejs%2Fvue-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vuejs%2Fvue-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vuejs","download_url":"https://codeload.github.com/vuejs/vue-router/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253004294,"owners_count":21838848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","router","vue"],"created_at":"2024-07-30T18:00:59.226Z","updated_at":"2025-05-13T10:49:44.503Z","avatar_url":"https://github.com/vuejs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/posva","https://github.com/sponsors/yyx990803","https://opencollective.com/vuejs","https://paypal.me/posva"],"categories":["vue","Awesome Vue.js [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)","JavaScript","Pre-packed","框架","Libraries and Plugins","vue 相关库","前端开发框架及项目","UI实用程序","Components \u0026 Libraries","Vue","UI Utilities [🔝](#readme)","UI Utilities","Awesome Vue.js","Uncategorized"],"sub_categories":["Libraries \u0026 Plugins","Plugins","Vue.js","Other","macros","其他_文本生成、文本对话","路由","UI Utilities","Misc","Routing","Uncategorized"],"readme":"# vue-router [![Build Status](https://img.shields.io/circleci/project/github/vuejs/vue-router/dev.svg)](https://circleci.com/gh/vuejs/vue-router)\n\n\u003e This is vue-router 3.0 which works only with Vue 2.0.\n\u003e - For the 1.x router see the [1.0 branch](https://github.com/vuejs/vue-router/tree/1.0).\n\u003e - For Vue Router 4 (for Vue 3) see [vuejs/router](https://github.com/vuejs/router).\n\n\u003ch2 align=\"center\"\u003eSupporting Vue Router\u003c/h2\u003e\n\nVue 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:\n\n- [Become a Sponsor on GitHub](https://github.com/sponsors/posva)\n- [One-time donation via PayPal](https://paypal.me/posva)\n\n\u003c!--sponsors start--\u003e\n\n\u003ch4 align=\"center\"\u003eGold Sponsors\u003c/h4\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://vuejobs.com/?utm_source=vuerouter\u0026utm_campaign=sponsor\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cpicture\u003e\n      \u003csource srcset=\"https://posva-sponsors.pages.dev/logos/vuejobs.svg\" media=\"(prefers-color-scheme: dark)\" height=\"72px\" alt=\"VueJobs\" /\u003e\n      \u003cimg src=\"https://posva-sponsors.pages.dev/logos/vuejobs.svg\" height=\"72px\" alt=\"VueJobs\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch4 align=\"center\"\u003eSilver Sponsors\u003c/h4\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.vuemastery.com/\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cpicture\u003e\n      \u003csource srcset=\"https://posva-sponsors.pages.dev/logos/vuemastery-dark.png\" media=\"(prefers-color-scheme: dark)\" height=\"42px\" alt=\"VueMastery\" /\u003e\n      \u003cimg src=\"https://posva-sponsors.pages.dev/logos/vuemastery-light.svg\" height=\"42px\" alt=\"VueMastery\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n    \u003ca href=\"https://www.prefect.io/\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cpicture\u003e\n      \u003csource srcset=\"https://posva-sponsors.pages.dev/logos/prefectlogo-dark.svg\" media=\"(prefers-color-scheme: dark)\" height=\"42px\" alt=\"Prefect\" /\u003e\n      \u003cimg src=\"https://posva-sponsors.pages.dev/logos/prefectlogo-light.svg\" height=\"42px\" alt=\"Prefect\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch4 align=\"center\"\u003eBronze Sponsors\u003c/h4\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://stormier.ninja\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cpicture\u003e\n      \u003csource srcset=\"https://avatars.githubusercontent.com/u/2486424?u=7b0c73ae5d090ce53bf59473094e9606fe082c59\u0026v=4\" media=\"(prefers-color-scheme: dark)\" height=\"26px\" alt=\"Stanislas OrmiÃ¨res\" /\u003e\n      \u003cimg src=\"https://avatars.githubusercontent.com/u/2486424?u=7b0c73ae5d090ce53bf59473094e9606fe082c59\u0026v=4\" height=\"26px\" alt=\"Stanislas OrmiÃ¨res\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n    \u003ca href=\"www.vuejs.de\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cpicture\u003e\n      \u003csource srcset=\"https://avatars.githubusercontent.com/u/4183726?u=6b50a8ea16de29d2982f43c5640b1db9299ebcd1\u0026v=4\" media=\"(prefers-color-scheme: dark)\" height=\"26px\" alt=\"Antony Konstantinidis\" /\u003e\n      \u003cimg src=\"https://avatars.githubusercontent.com/u/4183726?u=6b50a8ea16de29d2982f43c5640b1db9299ebcd1\u0026v=4\" height=\"26px\" alt=\"Antony Konstantinidis\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n    \u003ca href=\"https://storyblok.com\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cpicture\u003e\n      \u003csource srcset=\"https://posva-sponsors.pages.dev/logos/storyblok.png\" media=\"(prefers-color-scheme: dark)\" height=\"26px\" alt=\"Storyblok\" /\u003e\n      \u003cimg src=\"https://posva-sponsors.pages.dev/logos/storyblok.png\" height=\"26px\" alt=\"Storyblok\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n    \u003ca href=\"https://nuxtjs.org\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cpicture\u003e\n      \u003csource srcset=\"https://posva-sponsors.pages.dev/logos/nuxt-dark.svg\" media=\"(prefers-color-scheme: dark)\" height=\"26px\" alt=\"NuxtJS\" /\u003e\n      \u003cimg src=\"https://posva-sponsors.pages.dev/logos/nuxt-light.svg\" height=\"26px\" alt=\"NuxtJS\" /\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003c!--sponsors end--\u003e\n\n---\n\nGet started with the [documentation](http://v3.router.vuejs.org), or play with the [examples](https://github.com/vuejs/vue-router/tree/dev/examples) (see how to run them below).\n\n### Development Setup\n\n```bash\n# install deps\nyarn\n\n# build dist files\nyarn build\n\n# serve examples at localhost:8080\nyarn dev\n\n# lint \u0026 run all tests\nyarn test\n\n# serve docs at localhost:8080\nyarn docs\n```\n\n## Releasing\n\n- `yarn run release`\n  - Ensure tests are passing `yarn run test`\n  - Build dist files `VERSION=\u003cthe_version\u003e yarn run build`\n  - Build changelog `yarn run changelog`\n  - Commit dist files `git add dist CHANGELOG.md \u0026\u0026 git commit -m \"[build $VERSION]\"`\n  - Publish a new version `npm version $VERSION --message \"[release] $VERSION\"\n  - Push tags `git push origin refs/tags/v$VERSION \u0026\u0026 git push`\n  - Publish to npm `npm publish`\n\n## Questions\n\nFor questions and support please use the [Discord chat server](https://chat.vuejs.org) or [the official forum](http://forum.vuejs.org). The issue list of this repo is **exclusively** for bug reports and feature requests.\n\n## Issues\n\nPlease make sure to read the [Issue Reporting Checklist](https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#issue-reporting-guidelines) before opening an issue. Issues not conforming to the guidelines may be closed immediately.\n\n## Contribution\n\nPlease make sure to read the [Contributing Guide](https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md) before making a pull request.\n\n## Changelog\n\nDetails changes for each release are documented in the [`CHANGELOG.md file`](https://github.com/vuejs/vue-router/blob/dev/CHANGELOG.md).\n\n## Stay In Touch\n\n- For latest releases and announcements, follow on Twitter: [@vuejs](https://twitter.com/vuejs)\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2013-present Evan You\n\n## Special Thanks\n\n\u003ca href=\"https://www.browserstack.com\"\u003e\n  \u003cimg src=\"/assets/browserstack-logo-600x315.png\" height=\"80\" title=\"BrowserStack Logo\" alt=\"BrowserStack Logo\" /\u003e\n\u003c/a\u003e\n\nSpecial thanks to [BrowserStack](https://www.browserstack.com) for letting the maintainers use their service to debug browser specific issues.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvuejs%2Fvue-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvuejs%2Fvue-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvuejs%2Fvue-router/lists"}