A highly scalable routing design
1. pit
On one of my ant-design-pro practical note, the recording process I set to introduce on-demand, but this time I again App.vue content back to the global introduction:
this run error in the browser:main.js?56d7:9 Uncaught ReferenceError: Antd is not defined
Solution: back to the introduction of on-demand
2. Routing lazy loading (loading asynchronous) manner introduction means
Read Vue specific official document: Link .
3. Redirect page:
Page will when accessing / user, it will be automatically redirected to the / user / login
4. Jump page progress bar effect
-
installation:
npm i nprogress
-
In router.js file:
import NProgress from "nprogress";
import 'nprogress/nprogress.css';