Написание движка для интерактивного обучения
This commit is contained in:
@@ -179,16 +179,15 @@ const onChangeDepartment = (departmentId) => {
|
||||
}
|
||||
|
||||
const onboarding = useOnboardingStore()
|
||||
const onAfterEnter = () => {
|
||||
const onAfterEnter = async () => {
|
||||
// Если онбординг активен и текущий шаг имеет opensModal, переходим к следующему
|
||||
if (onboarding.isActive) {
|
||||
const currentSteps = onboarding.currentTourSteps
|
||||
const currentStep = currentSteps[onboarding.activeStepIndex]
|
||||
if (currentStep?.opensModal) {
|
||||
console.log(currentStep)
|
||||
onboarding.setStep(onboarding.activeStepIndex + 1) // переходим на шаг внутри модалки
|
||||
}
|
||||
}
|
||||
if (!onboarding.isActive) return
|
||||
|
||||
await nextTick()
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
onboarding.setStep(onboarding.activeStepIndex + 1)
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user