diff --git a/app/components/preview/PreviewModal.vue b/app/components/preview/PreviewModal.vue index 2cbda98..86494cf 100644 --- a/app/components/preview/PreviewModal.vue +++ b/app/components/preview/PreviewModal.vue @@ -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] }>() @@ -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 = {} @@ -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(() => {