🍉 Support history mode and hash mode
📌 Automatically generate routing and dynamic nested routing based on the file tree of the Vue file in the directory
🍩 Custom routing meta information in the component
🔨 Support asynchronous authentication routing (route guard)
🍕 Multi-language seamless routing, asynchronous loading of translation
🎻 URL localization
🔫 Support setting the default language (there is no language prefix in the URL)
🍖 load the last used language when you visit the website again
🍶 routing jump is simple and convenient
Ensure you are in a project generated by Vue CLI v3. You install this plugin by running the following command:
# init project
$ vue create hello-world
# enter the catalog
$ cd hello-world
# If you did not install router plugin yet
$ vue add router
# Install vue-cli-plugin-cobra-router
$ vue add cobra-router
After adding the plugin, the file structure will be the below.
src/
├── lang/
├──── locallized-urls/
├──── translations/
├── layouts/
├── pages/
└── router.js