@bassist/progress
Simple slim progress bars base on NProgress.
Usage
With npm(or yarn, or pnpm):
npm install @bassist/progress
In .js
/ .ts
or other files:
import progress from '@bassist/progress'
router.beforeEach(() => {
progress.start()
})
router.afterEach(() => {
progress.done()
})
All configurations and options of NProgress are supported.
Set Color
This plugin extends NProgress's API and adds a setColor
method.
export interface Progress extends NProgress {
setColor: (color: string) => void
}
import progress from '@bassist/progress'
progress.setColor('#ff0000')
router.beforeEach(() => {
progress.start()
})
router.afterEach(() => {
progress.done()
})
Release Notes
Please refer to CHANGELOG for details.
License
MIT License © 2022-PRESENT chengpeiquan