<el-form-item label="接口分类:" :label-width="formLabelWidth" prop="category"> <el-select v-model="form.category" placeholder="请选择"> <el-option v-for="item in this.category_list" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> </el-form-item>
category_list值为: [ {"id": 20, "name": "交通银行" }, {"id": 2, "name": "招商银行" }]
v-model获取的是<el-option>vaule的值,key和value为id的值,label为name的值
标签:category,name,选择器,注意事项,id,Select From: https://www.cnblogs.com/xianhaiyan/p/18164469