// 选择数据
user:[
{name:"小白",id:1,money:"100",love:"蛋糕"},
{name:"小黑",id:2,money:"200",love:"奶茶"},
{name:"小红",id:3,money:"300",love:"烧烤"},
]
<div>
<el-select v-model="order_obj.teacher" :loading="loading" value-key="name" :remote-method="getuser" filterable remote remote-show-suffix reserve-keyword>
<el-option v-for=" item in user" :key="item.id" :label="item.name" :value="item" />
</el-select>
</div>
在获取对象的时候必需加 value-key="name" 这个是设置显示的值,设置了才不会显示错
里面的name就是获取的那个对象里面的name属性值