mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-25 17:22:55 +00:00
fix: The dropdown data of subsequent nodes in the form cannot be displayed back (#3131)
This commit is contained in:
parent
8f7d91798b
commit
9d7a383348
|
|
@ -7,18 +7,22 @@ class FormNode extends AppNode {
|
|||
get_node_field_list() {
|
||||
const result = []
|
||||
const fields = this.props.model.properties?.config?.fields || []
|
||||
let otherFields = []
|
||||
|
||||
try {
|
||||
otherFields = this.props.model.properties.node_data.form_field_list.map((item: any) => ({
|
||||
label: typeof item.label == 'string' ? item.label : item.label.label,
|
||||
value: item.field
|
||||
}))
|
||||
this.props.model.properties.node_data.form_field_list.forEach((item: any) => {
|
||||
if (!fields.some((f: any) => f.value === item.field)) {
|
||||
fields.push({
|
||||
value: item.field,
|
||||
label: typeof item.label == 'string' ? item.label : item.label.label
|
||||
})
|
||||
}
|
||||
})
|
||||
} catch (e) {}
|
||||
result.push({
|
||||
value: this.props.model.id,
|
||||
label: this.props.model.properties.stepName,
|
||||
type: this.props.model.type,
|
||||
children: [...fields, ...otherFields]
|
||||
children: fields
|
||||
})
|
||||
return result
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue