实现如下效果:在选项旁边显示额外的信息,比如人员所属部门,或者产品的价格信息等。
如下:添加span来显示,且可以为不同的span定义不同的style,以实现文字灰度上的差异。
<el-select v-model="scope.row.nickName"
filterable style="width: 70%"
@change="(newVal) => handleUserChange(newVal,scope.$index)"
>
<el-option
v-for="item in userOptions"
:key="item.userId"
:label="item.nickName"
:value="item.userId">
<span style=