diff --git a/components.d.ts b/components.d.ts index 5d89172..5382b34 100644 --- a/components.d.ts +++ b/components.d.ts @@ -22,6 +22,7 @@ declare module 'vue' { CreatePredefinedMessagesSection: typeof import('./src/components/create/CreatePredefinedMessagesSection.vue')['default'] CreateReadySection: typeof import('./src/components/create/CreateReadySection.vue')['default'] CreateSection: typeof import('./src/components/create/CreateSection.vue')['default'] + CreateSectionManager: typeof import('./src/components/create/CreateSectionManager.vue')['default'] CreateSummarySection: typeof import('./src/components/create/CreateSummarySection.vue')['default'] DownloadImageButton: typeof import('./src/components/manage/DownloadImageButton.vue')['default'] DownloadPng: typeof import('./src/components/manage/DownloadImageButton.vue')['default'] diff --git a/src/components/create/CreateSection.vue b/src/components/create/CreateSection.vue index 2ccfd96..adab82e 100644 --- a/src/components/create/CreateSection.vue +++ b/src/components/create/CreateSection.vue @@ -13,13 +13,14 @@ const sectionRef = useTemplateRef('section') // плавная прокрутка при активации секции watch( - () => props.isNextActiveSection, + () => sectionRef.value && props.isNextActiveSection, (isNextActiveSection) => { if (isNextActiveSection) { sectionRef.value?.querySelector('input[type="text"]')?.focus() sectionRef.value?.scrollIntoView({ behavior: 'smooth' }) } }, + { immediate: true }, ) diff --git a/src/components/create/CreateSectionManager.vue b/src/components/create/CreateSectionManager.vue new file mode 100644 index 0000000..89efae8 --- /dev/null +++ b/src/components/create/CreateSectionManager.vue @@ -0,0 +1,118 @@ + + + + + + + + + + Ошибка создания QR‑кода: {{ error }} + + + + + + + + diff --git a/src/views/CreateView.vue b/src/views/CreateView.vue index 46ef59b..8249884 100644 --- a/src/views/CreateView.vue +++ b/src/views/CreateView.vue @@ -1,69 +1,42 @@ - - - - - - - + + + + - - - - + + + - - - - + + + - - - - + + + - - - - - - Ошибка создания QR‑кода: {{ error }} - - - - - + + + +
Ошибка создания QR‑кода: {{ error }}