mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +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
|
||||||
|
if (opts.throttle && process.client) {
|
||||||
|
_throttle = setTimeout(() => {
|
||||||
isLoading.value = true
|
isLoading.value = true
|
||||||
if (opts.throttle) {
|
_startTimer()
|
||||||
if (process.client) {
|
}, opts.throttle)
|
||||||
_throttle = setTimeout(_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