How to dynamically add subcomponents and take values through click events

clipboard.png
as shown in the figure, the content of the parent component is shown. The requirement now is that every time you click to add a professional qualification certificate, the parent component will have more content as shown in the red area. I write the red area as a component, reference it within the parent component, want to know how to refer to it more than once per click, and the most important thing is how I get the value of a child component that has been referenced multiple times (for example, I have referenced this component three times. How to get all the values)

Sep.18,2021

vue is data-driven, and your component content should be traversed by v-for:

<template>
    <div v-for='item in arr'>
            <select v-model='item.a'></select>
            ....
    </div>
</template>
<script>
    ...
        arr:[{},{}]//arr
    ...
</script>

in this way, your click event can only add the value in the array arr, and finally take arr is the data you want.


upstairs dei

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3af1f-2c281.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3af1f-2c281.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?