I would like to ask element-ui how to achieve the effect of loading a linear progress bar at the top of the page.

how to implement https://blog.csdn.net/CodingN.
, please give me a thought, thank you


add


https://github.com/hilongjw/v.


when routing hooks or api requests.

give you a library. nprogress ;

use the hook of vue-router if used in element-ui:

router.beforeEach((to, from, next) => {
    NProgress.start();
});

router.afterEach(() => {
    NProgress.done();
});
Menu