bugfix 0706 doc

This commit is contained in:
lb
2023-07-06 13:57:27 +08:00
parent bea02c6d0d
commit d55614cd6d
5 changed files with 26 additions and 9 deletions

View File

@@ -76,7 +76,7 @@
:value="opt.value">
<span>{{ opt.label }}</span>
<span v-if="col.customLabel" style="display: inline-clock; margin-left: 12px; font-size: 0.9em">
{{ opt[col.customLabel] || "-" }}
{{ opt[col.customLabel] || "无描述" }}
</span>
</el-option>
</el-select>

View File

@@ -94,7 +94,7 @@
:value="opt.value">
<span>{{ opt.label }}</span>
<span v-if="col.customLabel" style="display: inline-clock; margin-left: 12px; font-size: 0.9em">
{{ opt[col.customLabel] || "-" }}
{{ opt[col.customLabel] || "无描述" }}
</span>
</el-option>
</el-select>
@@ -298,9 +298,21 @@ export default {
col,
"options",
"list" in res.data
? res.data.list.map((i) => ({
? "customLabel" in col
? res.data.list.map((i) => ({
label: col.optionLabel ? i[col.optionLabel] : i.name,
value: col.optionValue ? i[col.optionValue] : i.id,
[col.customLabel]: i[col.customLabel],
}))
: res.data.list.map((i) => ({
label: col.optionLabel ? i[col.optionLabel] : i.name,
value: col.optionValue ? i[col.optionValue] : i.id,
}))
: "customLabel" in col
? res.data.map((i) => ({
label: col.optionLabel ? i[col.optionLabel] : i.name,
value: col.optionValue ? i[col.optionValue] : i.id,
[col.customLabel]: i[col.customLabel],
}))
: res.data.map((i) => ({
label: col.optionLabel ? i[col.optionLabel] : i.name,