Files
railwaysystem/RuoYi-Vue/ruoyi-ui/node_modules1/vue-router/src/util/async.js
T
2026-09-10 15:40:10 +08:00

19 lines
349 B
JavaScript

/* @flow */
export function runQueue (queue: Array<?NavigationGuard>, fn: Function, cb: Function) {
const step = index => {
if (index >= queue.length) {
cb()
} else {
if (queue[index]) {
fn(queue[index], () => {
step(index + 1)
})
} else {
step(index + 1)
}
}
}
step(0)
}