mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-16 03:50:54 +08:00
20 lines
401 B
TypeScript
20 lines
401 B
TypeScript
import NProgress from 'nprogress'
|
|
import 'nprogress/nprogress.css'
|
|
import { defineNuxtPlugin } from 'nuxt/app'
|
|
|
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
NProgress.configure({ showSpinner: false })
|
|
|
|
nuxtApp.hook('page:start', () => {
|
|
NProgress.start()
|
|
})
|
|
|
|
nuxtApp.hook('page:finish', () => {
|
|
NProgress.done()
|
|
})
|
|
|
|
nuxtApp.hook('app:error', () => {
|
|
NProgress.done()
|
|
})
|
|
})
|