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