fix: Corregir nombres de componentes para auto-import de Nuxt
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 36s

- Cambiar prop modelValue a open para UModal
- Usar PreviewPaperSimulator en vez de PaperSimulator
- Usar PreviewModal en vez de PreviewPreviewModal
This commit is contained in:
2025-11-26 17:34:10 -06:00
parent 413ec6d27e
commit 1027e1ece6
2 changed files with 9 additions and 7 deletions

View File

@@ -5,11 +5,11 @@ import { usePreview, CHAR_LIMITS } from '~/composables/usePreview'
const props = defineProps<{
template: PrintTemplate | null
modelValue: boolean
open: boolean
}>()
const emit = defineEmits<{
'update:modelValue': [value: boolean]
'update:open': [value: boolean]
'print': [operations: Operation[], variables: Record<string, string>]
}>()
@@ -27,7 +27,7 @@ const variables = computed(() => {
})
// Inicializar preview cuando se abre el modal
watch(() => props.modelValue, (isOpen) => {
watch(() => props.open, (isOpen) => {
if (isOpen && props.template) {
// Inicializar valores de variables con defaults
const initialValues: Record<string, string> = {}
@@ -73,7 +73,7 @@ function handleKeydown(event: KeyboardEvent) {
// Cerrar modal
function closeModal() {
emit('update:modelValue', false)
emit('update:open', false)
}
// Imprimir
@@ -99,8 +99,10 @@ const previewInfo = computed(() => {
<template>
<UModal
:model-value="modelValue"
@update:model-value="$emit('update:modelValue', $event)"
:open="open"
@update:open="$emit('update:open', $event)"
title="Vista Previa"
:description="template?.name || ''"
:ui="{
width: 'max-w-2xl'
}"

View File

@@ -150,7 +150,7 @@ async function handlePrintFromPreview(operations: Operation[], variables: Record
<!-- Modal de vista previa -->
<PreviewModal
v-model="previewModalOpen"
v-model:open="previewModalOpen"
:template="previewTemplate"
@print="handlePrintFromPreview"
/>