Написание движка для интерактивного обучения
This commit is contained in:
@@ -19,8 +19,8 @@ const onboarding = useOnboardingStore()
|
||||
const userStore = useAuthStore()
|
||||
const modalStore = useModalStore()
|
||||
|
||||
// if (userStore.user.role.slug === 'dej')
|
||||
// onboarding.startTour('welcomeDuty', 0)
|
||||
if (userStore.user.role.slug === 'dej')
|
||||
onboarding.start("welcomeDuty")
|
||||
|
||||
const authStore = useAuthStore()
|
||||
const themeVars = useThemeVars()
|
||||
|
||||
@@ -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