el-select获取选中的value和label(值和id)
作者:互联网
<el-select v-model="form.towerDeptName" placeholder="输入文字后选择" clearable @change="towerChange" > <el-option v-for="item in towerList" :key="item.deptId" :label="item.fullName" :value="item"//注意这里对应change能获取的值 ></el-option> </el-select>
towerChange(e) {//获取的值和id this.form.towerDeptId = e.deptId this.form.towerDeptName = e.fullName },
标签:deptId,el,towerDeptName,form,value,label,获取,id 来源: https://www.cnblogs.com/gyw1996/p/15923923.html