2019-01-27 04:41:41 -06:00
|
|
|
import * as NProgress from 'nprogress';
|
2017-02-18 01:53:46 -06:00
|
|
|
NProgress.configure({
|
|
|
|
trickleSpeed: 500,
|
|
|
|
showSpinner: false
|
|
|
|
});
|
|
|
|
|
|
|
|
const root = document.getElementsByTagName('html')[0];
|
|
|
|
|
2017-03-18 06:05:11 -05:00
|
|
|
export default {
|
2017-02-18 01:53:46 -06:00
|
|
|
start: () => {
|
|
|
|
root.classList.add('progress');
|
|
|
|
NProgress.start();
|
|
|
|
},
|
|
|
|
done: () => {
|
|
|
|
root.classList.remove('progress');
|
|
|
|
NProgress.done();
|
|
|
|
},
|
|
|
|
set: val => {
|
|
|
|
NProgress.set(val);
|
|
|
|
}
|
|
|
|
};
|