@@ -1,22 +1,14 @@
|
||||
<template>
|
||||
<div class="max-w-prose mx-auto py-6 px-4 md:px-6">
|
||||
<section class="content">
|
||||
<div class="max-w-prose mx-auto py-8">
|
||||
<!-- Вывод секций через цикл -->
|
||||
<CreateSection
|
||||
v-for="{ name, isActive, isNextActiveSection } in visibleSections"
|
||||
:key="name"
|
||||
:isActive
|
||||
:isNextActiveSection
|
||||
>
|
||||
<slot :name="name" />
|
||||
</CreateSection>
|
||||
|
||||
<p v-if="error" class="text-red-500 mt-4">Ошибка создания QR‑кода: {{ error }}</p>
|
||||
|
||||
<div class="h-[30dvh] md:h-[10dvh] overflow-hidden"></div>
|
||||
</div>
|
||||
</section>
|
||||
<div>
|
||||
<!-- Вывод секций через цикл -->
|
||||
<CreateSection
|
||||
v-for="{ name, isActive, isNextActiveSection } in visibleSections"
|
||||
:key="name"
|
||||
:isActive
|
||||
:isNextActiveSection
|
||||
>
|
||||
<slot :name="name" />
|
||||
</CreateSection>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -31,9 +23,6 @@ const props = defineProps<{
|
||||
messageDeliveryMethod: null | QRCodeDocument['messageDeliveryMethod']
|
||||
}>()
|
||||
|
||||
// Локальные состояния
|
||||
const error = ref<string | null>(null)
|
||||
|
||||
// Доступные шаги и их условия
|
||||
const steps = [
|
||||
{
|
||||
|
||||
+36
-25
@@ -1,33 +1,44 @@
|
||||
<template>
|
||||
<CreateSectionManager
|
||||
:placement="placement"
|
||||
:selectedActions="selectedActions"
|
||||
:messageDeliveryMethod="messageDeliveryMethod"
|
||||
>
|
||||
<template #placement>
|
||||
<CreatePlacementSection v-model="placement" />
|
||||
</template>
|
||||
<div class="max-w-prose mx-auto py-6 px-4 md:px-6">
|
||||
<section class="content">
|
||||
<div class="max-w-prose mx-auto py-8">
|
||||
<CreateSectionManager
|
||||
:placement="placement"
|
||||
:selectedActions="selectedActions"
|
||||
:messageDeliveryMethod="messageDeliveryMethod"
|
||||
>
|
||||
<template #placement>
|
||||
<CreatePlacementSection v-model="placement" />
|
||||
</template>
|
||||
|
||||
<template #actions>
|
||||
<CreateActionsSection v-model="selectedActions" />
|
||||
</template>
|
||||
<template #actions>
|
||||
<CreateActionsSection v-model="selectedActions" />
|
||||
</template>
|
||||
|
||||
<template #delivery>
|
||||
<CreateMessageDeliveryMethodSection v-model="messageDeliveryMethod" />
|
||||
</template>
|
||||
<template #delivery>
|
||||
<CreateMessageDeliveryMethodSection v-model="messageDeliveryMethod" />
|
||||
</template>
|
||||
|
||||
<template #messages>
|
||||
<CreatePredefinedMessagesSection :placement="placement" v-model="messages" />
|
||||
</template>
|
||||
<template #messages>
|
||||
<CreatePredefinedMessagesSection :placement="placement" v-model="messages" />
|
||||
</template>
|
||||
|
||||
<template #summary>
|
||||
<CreateSummarySection
|
||||
v-model:name="name"
|
||||
buttonLabel="Создать QR‑код"
|
||||
@nextStep="createQrCode"
|
||||
/>
|
||||
</template>
|
||||
</CreateSectionManager>
|
||||
<template #summary>
|
||||
<CreateSummarySection
|
||||
v-model:name="name"
|
||||
buttonLabel="Создать QR‑код"
|
||||
@nextStep="createQrCode"
|
||||
/>
|
||||
</template>
|
||||
</CreateSectionManager>
|
||||
|
||||
<p v-if="error" class="text-red-500 mt-4">Ошибка создания QR‑кода: {{ error }}</p>
|
||||
|
||||
<div class="h-[30dvh] md:h-[10dvh] overflow-hidden"></div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
≈
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
Reference in New Issue
Block a user