阅读 72

获取el-radio-group的索引

<span  v-for="(value,key) in schoolList">
     <el-radio-group v-model="searchForm.schoolId" @change="changeGrade(value,key)" >
         <el-radio-button :label="value.schoolId" :key="key" >{{value.schoolName}} </el-radio-button>
     </el-radio-group>
</span>
复制代码
 changeGrade(val,key){
        console.log(val,key,'key')
   }
复制代码
数据结构
[
{schoolId:11,shchoolName:'aa'},
{schoolId:22,shchoolName:'bb'},
]
复制代码
文章分类
前端
文章标签