<el-select filterable :filter-method="filterSearchName" v-model="actionForm.forcer" value-key="id" placeholder="请选择执行人" clearable> <el-option v-for="item in staffInfo" :key="item.id" :label="item.nickname" :value="item.employeeNumber" style="min-width: 420px" > <span style="float: left;color: blue;font-weight: bold">{{ item.nickname }}</span> <span style="float: right; color: #8492a6; font-size: 13px">{{ item.email }}</span> </el-option> <slot> <el-pagination small background layout="prev,next,total" @current-change="changePageStaffInfo" :total="pageInfo.total" > </el-pagination> </slot> </el-select>
如上述代码,假如我数据库存的是编码,页面要显示姓名。由于select 赋值的是编码。
那么此时我想要看姓名 就不要加
@change="$forceUpdate()"
刷新数据