mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
fix(nuxt): set is loading state for <NuxtLoadingIndicator>
after throttle (#9832)
This commit is contained in:
parent
f3263ebb9d
commit
7f4f10a733
@ -68,16 +68,16 @@ function useLoadingIndicator (opts: {
|
||||
function start () {
|
||||
clear()
|
||||
progress.value = 0
|
||||
if (opts.throttle && process.client) {
|
||||
_throttle = setTimeout(() => {
|
||||
isLoading.value = true
|
||||
if (opts.throttle) {
|
||||
if (process.client) {
|
||||
_throttle = setTimeout(_startTimer, opts.throttle)
|
||||
}
|
||||
_startTimer()
|
||||
}, opts.throttle)
|
||||
} else {
|
||||
isLoading.value = true
|
||||
_startTimer()
|
||||
}
|
||||
}
|
||||
|
||||
function finish () {
|
||||
progress.value = 100
|
||||
_hide()
|
||||
|
Loading…
Reference in New Issue
Block a user