mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +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 () {
|
function start () {
|
||||||
clear()
|
clear()
|
||||||
progress.value = 0
|
progress.value = 0
|
||||||
isLoading.value = true
|
if (opts.throttle && process.client) {
|
||||||
if (opts.throttle) {
|
_throttle = setTimeout(() => {
|
||||||
if (process.client) {
|
isLoading.value = true
|
||||||
_throttle = setTimeout(_startTimer, opts.throttle)
|
_startTimer()
|
||||||
}
|
}, opts.throttle)
|
||||||
} else {
|
} else {
|
||||||
|
isLoading.value = true
|
||||||
_startTimer()
|
_startTimer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function finish () {
|
function finish () {
|
||||||
progress.value = 100
|
progress.value = 100
|
||||||
_hide()
|
_hide()
|
||||||
|
Loading…
Reference in New Issue
Block a user