diff --git a/components/InputEmail.vue b/components/InputEmail.vue index be0cf45..c20588e 100644 --- a/components/InputEmail.vue +++ b/components/InputEmail.vue @@ -12,7 +12,7 @@ :placeholder="placeholder[langcode]" /> -

{{ error }}

+

{{ error[langcode] }}

@@ -44,7 +44,9 @@ export default { updateEmail(email) { const pattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; if (pattern.test(String(email).toLowerCase())) { - this.$emit('input-value', email); + //this.$emit('input-value', email); + this.$emit('input-value', { email: email }) + } else { this.error = { es: 'Por favor, introduce una dirección de correo electrónico válida.', diff --git a/components/InputRadio.vue b/components/InputRadio.vue index 2e7f834..dbc9982 100644 --- a/components/InputRadio.vue +++ b/components/InputRadio.vue @@ -30,6 +30,7 @@ import { mapGetters } from 'vuex'; export default { props: { + id: { type: String, required: true }, type: { type: String, default: 'radio' }, label: { type: Object, default: () => ({}) }, options: { type: Array, default: () => [] }, diff --git a/components/InputText.vue b/components/InputText.vue index ab12aaa..bb38c36 100644 --- a/components/InputText.vue +++ b/components/InputText.vue @@ -20,6 +20,10 @@ import { mapGetters } from 'vuex'; export default { props: { + id: { + type: String, + required: true + }, label: { type: Object, default: () => ({}) @@ -43,7 +47,7 @@ export default { }, methods: { updateValue(event) { - this.$emit('input-value', event.target.value) + this.$emit('input-value', { [this.id]: event.target.value }); } }, } diff --git a/components/SliceEnd.vue b/components/SliceEnd.vue index 5359131..0265c5d 100644 --- a/components/SliceEnd.vue +++ b/components/SliceEnd.vue @@ -1,5 +1,6 @@