支持vue-router + webpack2 代码分割的路由进度显示
Important
- 如果使用代码分割,异步组件加载需使用
Webpack2
的System.import()
Installation
- via CDN
simple example
Document <!-- 放置进度条组件 --> this is index page go to list this is list page go to index
- via NPM
$ npm install vue-navigation-progress-plugin --save # Or $ yarn add vue-navigation-progress-plugin
simple example
// main.js;;;;Vue;const router = routes: path: "/" System // 注意 必须使用System.import path: "/list" System ;Vue; el: "#app" router ;
<!-- like App.vue --> <!-- 放置进度条组件 -->