Skip to content
This repository has been archived by the owner on Dec 25, 2022. It is now read-only.

Releases: imhele/umi-plugin-nprogress

umi-plugin-nprogress@1.1.4

18 Jan 07:15
Compare
Choose a tag to compare
  • fix: Template not found. #1
  • fix: enable: false does not work.

umi-plugin-nprogress@1.1.2

17 Jan 20:36
Compare
Choose a tag to compare

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