@change事件传参
@change="(value)=>handleChange(value, item,index)"
这样可以接收index参数区分是哪一个组件事件,又可以接收子组件传的value值
<div class="boxItem" v-for="(item, index) in checkPeopleList" :key="index">
<div class="boxItem-title">审核人员 {{ index + 1 }}</div>
<div class="selectPeople">
<el-select v-model="item.selectedValues" placeholder="选择审核人员" size="large" style="width: 240px">
<template #empty="{}">
<AreaTree @change="(value)=>handleChange(value, item,index)" />
</template>
</el-select>
<!-- <el-cascader v-model="item.selectedValues" :options="options" :show-all-levels="false" /> -->
</div>
<!-- 新增删除按钮 -->
<div class="delete-button-container">
<el-button v-if="index !== 0" @click="removeCheckPeople(index)" type="danger" circle size="small"
icon="Delete"></el-button>
</div>
<!-- 新增的容器 -->
<div class="bottom-center-line-container">
<el-button v-if="!item.hideAddButton" @click="addCheckPeople()" class="add-button" type="primary" circle
size="small"><el-icon>
<Plus color="#ffffff" size="" />
</el-icon></el-button>
</div>
</div>
如果在模板中直接这样接收value参数,那么就value就拿不到
@change="handleChange(value, item,index)