update 0625 配方详情
This commit is contained in:
@@ -27,7 +27,10 @@
|
||||
v-bind="col.elparams"
|
||||
@change="handleSelectChange(col, $event)"
|
||||
>
|
||||
<el-option v-for="(opt, optIdx) in col.options" :key="'option_' + optIdx" :label="opt.label" :value="opt.value" />
|
||||
<el-option v-for="(opt, optIdx) in col.options" :key="'option_' + optIdx" :label="opt.label" :value="opt.value">
|
||||
<span>{{ opt.label }}</span>
|
||||
<span v-if="col.customLabel" style="display: inline-clock; margin-left: 12px; font-size: .9em; color: #ccce;">{{ opt[col.customLabel] || '-' }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-switch
|
||||
v-if="col.switch"
|
||||
@@ -95,8 +98,11 @@ export default {
|
||||
this.$set(
|
||||
col,
|
||||
"options",
|
||||
res.data.list.map((item) => ({ label: item.name, value: item.id }))
|
||||
!col.customLabel
|
||||
? res.data.list.map((item) => ({ label: item.name, value: item.id }))
|
||||
: res.data.list.map((item) => ({ label: item.name, value: item.id, [col.customLabel]: item[col.customLabel] }))
|
||||
);
|
||||
console.log(res.data.list.map((item) => ({ label: item.name, value: item.id, [col.customLabel]: item[col.customLabel] })))
|
||||
} else {
|
||||
this.$set(col, "options", []);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user