[Vuejs]-Pass props from parent to child using a method

0👍

You would just create a method that updates the value of the props that you are passing into the child

<script setup>
const name = ref('')
const email = ref('')
const date = ref('')

function handleUpdate() {
  name.value = /* ... */
  email.value = /* ... */
  date.value = /* ... */
}
</script>

<template>
  <ChildComponent :name="name" :email="email" :date="date" />
  <button @click="handleUpdate">OK</button>
</template>

It’s a bit hard to see what you mean but are you sure you can’t use a form here to group the values together if you have 4 selects?

Leave a comment