Vue method to pass multiple input values ​​from child component to parent component
P粉476475551
P粉476475551 2024-03-26 20:44:01
0
1
396

** Anyone know how to pass multiple child components. input value**

<template>
  <div>
    <v-row align="center">
      <v-select
        :items="languages"
        v-model="selectedOption"
        @input="changeLanguage()"
        outlined
        solo
        class="m-3"
        cols="12"
        sm="2"
        label="Select Language"
      ></v-select>

      <v-combobox
        @input-content="changeContent()"
        v-model="contents2"
        outlined
        solo
        class="d-inline-flex"
        cols="12"
        sm="2"
        label="Input Content"
      ></v-combobox>
    </v-row>
  </div>
</template>

**The above is my Template folder, please feel free to ask me for more source code**

<Child
        v-for="count in sec"
        :key="count"
        v-model="selectedLanguage"
        :languages="languages"
        :contents="contents"
        :input="onChangeChild"
        :inputContent="onChangeContent"
      />

** This is my parent component source code **

P粉476475551
P粉476475551

reply all(1)
P粉216203545

It seems you already know what you want and need. and possess skills that enhance problem-solving approaches.

Parent properties can be used as v-models on deeper components.

You can also split the component into multiple if you need to thoroughly manage certain values. If this doesn't cost you more testing or any other resources.

when

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template