From 4a05f8915ba9fca0c8e7a32ba88f36f9ce7652c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa?= Date: Thu, 21 Aug 2025 11:55:20 +0200 Subject: [PATCH] create product functionality and page --- components/FormInputImage.vue | 9 ++- components/ProductForm.vue | 94 +++++++++++++++++-------- pages/editar/productos/[id].vue | 50 ++++++++----- pages/editar/productos/crear.vue | 117 +++++++++++++++++++++++++++++-- 4 files changed, 212 insertions(+), 58 deletions(-) diff --git a/components/FormInputImage.vue b/components/FormInputImage.vue index 5c1b8b2..fb17c8a 100644 --- a/components/FormInputImage.vue +++ b/components/FormInputImage.vue @@ -10,7 +10,7 @@ :src="croppieImage" :stencil-props="{ aspectRatio: 1 }" /> -
+
@@ -31,7 +31,7 @@ export default { components: { Cropper }, props: { imageUrl: { - type: String, + type: [String, Object], default: null, }, }, @@ -106,5 +106,10 @@ export default { } .input { max-width: 100%; + margin-bottom: 1em; +} + +.buttons { + margin-top: 1em; } diff --git a/components/ProductForm.vue b/components/ProductForm.vue index 22c3781..2dbdefe 100644 --- a/components/ProductForm.vue +++ b/components/ProductForm.vue @@ -1,12 +1,10 @@