<el-form-item label="生效标记" prop="enableSign" label-width="17rem"><el-select v-model="dialog.elForm.enableSign" placeholder="请选择内容"><el-option v-for="item in enableSignList":key="item.infoCode":label="item.infoName":value="item.infoCode"></el-option></el-select></el-form-item>
视图并没有显示名称,还是显示了原数据
在查询数据后整体数据绑定后,再单独把使用el-option的数据转字符串类型后赋值
//数据数组elForm: {enableSign: "", //生效标记}//根据id查询单条记录getOneData(id) {this.$axios.get(myApi.getOneChartInfo + '?id=' + id).then(res => {if (res.data.code === myConst.code.success) {this.dialog.elForm = res.data.datathis.dialog.elForm.enableSign = this.dialog.elForm.enableSign + ""}})},