mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-19 01:11:07 +00:00
fix: 修复自动生成表格字段冲突问题 (#536)
Co-authored-by: Orange <orangemtony@gmail.com>
This commit is contained in:
@@ -61,8 +61,8 @@ export default {
|
|||||||
generateFieldByType(type, field, fieldMeta) {
|
generateFieldByType(type, field, fieldMeta) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'choice':
|
case 'choice':
|
||||||
if (!fieldMeta.read_only) {
|
|
||||||
type = 'radio-group'
|
type = 'radio-group'
|
||||||
|
if (!fieldMeta.read_only) {
|
||||||
field.options = fieldMeta.choices.map(v => {
|
field.options = fieldMeta.choices.map(v => {
|
||||||
return { label: v.display_name, value: v.value }
|
return { label: v.display_name, value: v.value }
|
||||||
})
|
})
|
||||||
@@ -93,6 +93,7 @@ export default {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
if (type === 'radio-group') {
|
if (type === 'radio-group') {
|
||||||
|
if (!fieldMeta.read_only) {
|
||||||
const options = fieldMeta.choices.map(v => {
|
const options = fieldMeta.choices.map(v => {
|
||||||
return { label: v.display_name, value: v.value }
|
return { label: v.display_name, value: v.value }
|
||||||
})
|
})
|
||||||
@@ -101,6 +102,7 @@ export default {
|
|||||||
field.el.filterable = true
|
field.el.filterable = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
field.type = type
|
field.type = type
|
||||||
return field
|
return field
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user