This repository has been archived by the owner on Dec 25, 2022. It is now read-only.
Releases: imhele/umi-plugin-nprogress
Releases · imhele/umi-plugin-nprogress
umi-plugin-nprogress@1.1.4
umi-plugin-nprogress@1.1.2
Add a top progress bar to your Umi project.
Usage
Before using umi-plugin-nprogress
, please ensure you have enabled dva
.
$ npm install umi-plugin-nprogress
or
$ yarn add umi-plugin-nprogress
Add umi-plugin-nprogress
into .umirc.js
or config.js
of your UmiJS
project. UmiJS - Plugin usage
export default {
plugins: [
'umi-plugin-nprogress',
],
}
Options
interface Options {
configuration?: NProgressConfigureOptions;
effects?: string[] | RegExp;
enable?: boolean;
global?: boolean;
models?: string[] | RegExp;
routeOnly?: boolean;
}
- configuration: Configure nprogress. Link
- effects: Only the matched fields of
effects
will display the progress bar, while the others will not. - enable: Whether to enable this plugin.
- global: Display the progress bar by listening to
loading.global
. - models: Only the matched fields of
models
will display the progress bar, while the others will not. - routeOnly: to display the progress bar only when switching routes.
Example
Visit it at example