vue-cli-plugin-cobra-router
v1.1.5
Published
Vue CLI plugin, Support automatic generation of international routing table and dynamic update of meta information
Downloads
561
Maintainers
Readme
Vue CLI plugin for Router
Features
:watermelon: Support history mode and hash mode
:pushpin: Automatically generate routing and dynamic nested routing based on the file tree of the Vue file in the directory
:doughnut: Custom routing meta information in the component
:hammer: Support asynchronous authentication routing (route guard)
:pizza: Multi-language seamless routing, asynchronous loading of translation
:violin: URL localization
:gun: Support setting the default language (there is no language prefix in the URL)
:meat_on_bone: load the last used language when you visit the website again
:sake: routing jump is simple and convenient
Overview
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