From 2f397c88d4cecfe87d66fe83a8c277413ac44941 Mon Sep 17 00:00:00 2001 From: Ale Date: Mon, 28 Feb 2022 13:08:03 -0300 Subject: [PATCH] Agregados botones para cantidad en el modal de agregar producto --- public/css/productos.css | 8 +++- public/js/productos.js | 86 ++++++++++++++++++++++++++-------------- 2 files changed, 63 insertions(+), 31 deletions(-) diff --git a/public/css/productos.css b/public/css/productos.css index 83aa0b1..11d3eb8 100644 --- a/public/css/productos.css +++ b/public/css/productos.css @@ -1,4 +1,10 @@ figure.image.icono { float: right; margin: 4px; -} \ No newline at end of file +} + +.is-thin-centered { + width: 50%; + margin-left: auto; + margin-right: auto; +} diff --git a/public/js/productos.js b/public/js/productos.js index 3d58f65..6202472 100644 --- a/public/js/productos.js +++ b/public/js/productos.js @@ -110,41 +110,64 @@ Vue.component('productos-container', { Vue.component('producto-container', { template: ` -
+
-
`, +
`, data() { return { producto: null, - visible: false + visible: false, + cant: 0 } }, computed: { @@ -159,6 +182,9 @@ Vue.component('producto-container', { cerrar() { this.visible = false; Event.$emit("migas-pop"); + }, + agregarProducto() { + Event.$emit("producto-add"); } }, mounted() { @@ -168,4 +194,4 @@ Vue.component('producto-container', { Event.$emit("migas-agregar",this.miga); }); } -}); \ No newline at end of file +});