Vue dynamically generates several components, how to trigger the parent component

The

project uses vue+iview. I click the button to generate several subcomponents. Now, after filling in the information in these child components, you need to pass the data to the parent component. But now the problem is that only the last filled in can be passed to the parent component. And can only pass on one.

I click the add button to generate several subcomponents. Now, after filling in the information, you can only pass the last piece of data "less than or equal to 13" to the parent component. I want to pass on both the above and the following data.

Mar.18,2021

parent component definition function, child component emmit

<father @click="clickEvent"></father>

<son @click="event"></son>
<script>
...
methods:{
    event(){
        this.$emit("clickEvent",...)
    }
}
</script>

are these dynamic components generated with v-for? If so, you can transfer the data in the $emit of the child component to the item of the parent component v-for, and then click OK to fetch the data in items

Menu